java.lang.Object | |
↳ | sun.swing.MenuItemLayoutHelper |
Calculates preferred size and layouts menu items.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MenuItemLayoutHelper.ColumnAlignment | |||||||||||
MenuItemLayoutHelper.LayoutResult | |||||||||||
MenuItemLayoutHelper.RectSize |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MAX_ACC_WIDTH | |||||||||||
MAX_ARROW_WIDTH | |||||||||||
MAX_CHECK_WIDTH | |||||||||||
MAX_ICON_WIDTH | |||||||||||
MAX_LABEL_WIDTH | |||||||||||
MAX_TEXT_WIDTH |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
The empty protected constructor is necessary for derived classes.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Calculates and returns maximal value through specified parent component
client property.
| |||||||||||
Returns parent client property as int.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
The empty protected constructor is necessary for derived classes.
Returns parent of this component if it is not a top-level menu Otherwise returns null.
menuItem | the menu item whose parent will be returned. |
---|
Answers should we do column layout for a menu item or not. We do it when a user doesn't set any alignments and text positions manually, except the vertical alignment.
Layout icon, text, check icon, accelerator text and arrow icon in the viewRect and return their positions. If horizontalAlignment, verticalTextPosition and horizontalTextPosition are default (user doesn't set any manually) the layouting algorithm is: Elements are layouted in the five columns: check icon + icon + text + accelerator text + arrow icon In the other case elements are layouted in the four columns: check icon + label + accelerator text + arrow icon Label is union of icon and text. The order of columns can be reversed. It depends on the menu item orientation.
Finds and returns maximal integer value in the given array.
values | array where the search will be performed. |
---|
Returns false if the component is a JMenu and it is a top level menu (on the menubar).
Calculates and returns maximal value through specified parent component client property.
propertyName | name of the property, which stores the maximal value. |
---|---|
value | a value which pretends to be maximal |
Returns parent client property as int.
propertyName | name of the parent property. |
---|