Class BasicCommandButtonPanelUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.PanelUI
org.pushingpixels.flamingo.internal.ui.common.CommandButtonPanelUI
org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonPanelUI
Basic UI for command button panel
JCommandButtonPanel.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classColumn-fill layout for the button panel.protected classRow-fill layout for the button panel. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JCommandButtonPanelThe associated command button panel.protected ChangeListenerChange listener onbuttonPanel.protected static final InsetsDefault insets of button panel groups.protected JLabel[]Labels of the button panel groups.protected Rectangle[]Bounds of button panel groups.protected PropertyChangeListenerProperty change listener onbuttonPanel. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected LayoutManagerReturns the layout manager for the associated button panel.static ComponentUIprotected InsetsReturns the insets of button panel groups.protected intgetGroupTitleHeight(int groupIndex) Returns the height of the group title strip.protected intReturns the layout gap for button panel components.intgetPreferredHeight(int buttonVisibleRows, int titleVisibleRows) Returns the preferred size of the associated button panel for the specified parameters.protected voidInstalls sub-components on the associated button panel.protected voidInstalls defaults on the associated button panel.protected voidInstalls listeners on the associated button panel.voidvoidpaint(Graphics g, JComponent c) protected voidpaintGroupBackground(Graphics g, int groupIndex, int x, int y, int width, int height) Paints the background of the specified button panel group.protected voidpaintGroupTitleBackground(Graphics g, int groupIndex, int x, int y, int width, int height) Paints the background of the title of specified button panel group.protected voidRecomputes the components for button group headers.protected voidUninstalls sub-components from the associated button panel.protected voidUninstalls defaults from the associated button panel.protected voidUninstalls listeners from the associated button panel.voidMethods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, update
-
Field Details
-
buttonPanel
The associated command button panel. -
groupLabels
Labels of the button panel groups. -
groupRects
Bounds of button panel groups. -
propertyChangeListener
Property change listener onbuttonPanel. -
changeListener
Change listener onbuttonPanel. -
GROUP_INSETS
Default insets of button panel groups.
-
-
Constructor Details
-
BasicCommandButtonPanelUI
public BasicCommandButtonPanelUI()
-
-
Method Details
-
createUI
-
installUI
- Overrides:
installUIin classComponentUI
-
installDefaults
protected void installDefaults()Installs defaults on the associated button panel. -
installComponents
protected void installComponents()Installs sub-components on the associated button panel. -
installListeners
protected void installListeners()Installs listeners on the associated button panel. -
uninstallUI
- Overrides:
uninstallUIin classComponentUI
-
uninstallDefaults
protected void uninstallDefaults()Uninstalls defaults from the associated button panel. -
uninstallComponents
protected void uninstallComponents()Uninstalls sub-components from the associated button panel. -
uninstallListeners
protected void uninstallListeners()Uninstalls listeners from the associated button panel. -
createLayoutManager
Returns the layout manager for the associated button panel.- Returns:
- The layout manager for the associated button panel.
-
paint
- Overrides:
paintin classComponentUI
-
paintGroupBackground
protected void paintGroupBackground(Graphics g, int groupIndex, int x, int y, int width, int height) Paints the background of the specified button panel group.- Parameters:
g- Graphics context.groupIndex- Group index.x- X coordinate of the button group bounds.y- Y coordinate of the button group bounds.width- Width of the button group bounds.height- Height of the button group bounds.
-
paintGroupTitleBackground
protected void paintGroupTitleBackground(Graphics g, int groupIndex, int x, int y, int width, int height) Paints the background of the title of specified button panel group.- Parameters:
g- Graphics context.groupIndex- Group index.x- X coordinate of the button group title bounds.y- Y coordinate of the button group title bounds.width- Width of the button group title bounds.height- Height of the button group title bounds.
-
getGroupTitleHeight
protected int getGroupTitleHeight(int groupIndex) Returns the height of the group title strip.- Parameters:
groupIndex- Group index.- Returns:
- The height of the title strip of the specified group.
-
getGroupInsets
Returns the insets of button panel groups.- Returns:
- The insets of button panel groups.
-
getLayoutGap
protected int getLayoutGap()Returns the layout gap for button panel components.- Returns:
- The layout gap for button panel components.
-
recomputeGroupHeaders
protected void recomputeGroupHeaders()Recomputes the components for button group headers. -
getPreferredHeight
public int getPreferredHeight(int buttonVisibleRows, int titleVisibleRows) Returns the preferred size of the associated button panel for the specified parameters.- Parameters:
buttonVisibleRows- Target number of visible button rows.titleVisibleRows- Target number of visible group title rows.- Returns:
- The preferred size of the associated button panel for the specified parameters.
-