org.pushingpixels.flamingo.internal.ui.common
public class BasicCommandButtonPanelUI extends CommandButtonPanelUI
JCommandButtonPanel
.Modifier and Type | Class and Description |
---|---|
protected class |
BasicCommandButtonPanelUI.ColumnFillLayout
Column-fill layout for the button panel.
|
protected class |
BasicCommandButtonPanelUI.RowFillLayout
Row-fill layout for the button panel.
|
Modifier and Type | Field and Description |
---|---|
protected JCommandButtonPanel |
buttonPanel
The associated command button panel.
|
protected ChangeListener |
changeListener
Change listener on
buttonPanel . |
protected static Insets |
GROUP_INSETS
Default insets of button panel groups.
|
protected JLabel[] |
groupLabels
Labels of the button panel groups.
|
protected Rectangle[] |
groupRects
Bounds of button panel groups.
|
protected PropertyChangeListener |
propertyChangeListener
Property change listener on
buttonPanel . |
Constructor and Description |
---|
BasicCommandButtonPanelUI() |
Modifier and Type | Method and Description |
---|---|
protected LayoutManager |
createLayoutManager()
Returns the layout manager for the associated button panel.
|
static ComponentUI |
createUI(JComponent c) |
protected Insets |
getGroupInsets()
Returns the insets of button panel groups.
|
protected int |
getGroupTitleHeight(int groupIndex)
Returns the height of the group title strip.
|
protected int |
getLayoutGap()
Returns the layout gap for button panel components.
|
int |
getPreferredHeight(int buttonVisibleRows,
int titleVisibleRows)
Returns the preferred size of the associated button panel for the
specified parameters.
|
protected void |
installComponents()
Installs sub-components on the associated button panel.
|
protected void |
installDefaults()
Installs defaults on the associated button panel.
|
protected void |
installListeners()
Installs listeners on the associated button panel.
|
void |
installUI(JComponent c) |
void |
paint(Graphics g,
JComponent c) |
protected void |
paintGroupBackground(Graphics g,
int groupIndex,
int x,
int y,
int width,
int height)
Paints the background of the specified button panel group.
|
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.
|
protected void |
recomputeGroupHeaders()
Recomputes the components for button group headers.
|
protected void |
uninstallComponents()
Uninstalls sub-components from the associated button panel.
|
protected void |
uninstallDefaults()
Uninstalls defaults from the associated button panel.
|
protected void |
uninstallListeners()
Uninstalls listeners from the associated button panel.
|
void |
uninstallUI(JComponent c) |
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, update
protected JCommandButtonPanel buttonPanel
protected JLabel[] groupLabels
protected Rectangle[] groupRects
protected PropertyChangeListener propertyChangeListener
buttonPanel
.protected ChangeListener changeListener
buttonPanel
.protected static final Insets GROUP_INSETS
public static ComponentUI createUI(JComponent c)
public void installUI(JComponent c)
installUI
in class ComponentUI
protected void installDefaults()
protected void installComponents()
protected void installListeners()
public void uninstallUI(JComponent c)
uninstallUI
in class ComponentUI
protected void uninstallDefaults()
protected void uninstallComponents()
protected void uninstallListeners()
protected LayoutManager createLayoutManager()
public void paint(Graphics g, JComponent c)
paint
in class ComponentUI
protected void paintGroupBackground(Graphics g, int groupIndex, int x, int y, int width, int height)
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.protected void paintGroupTitleBackground(Graphics g, int groupIndex, int x, int y, int width, int height)
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.protected int getGroupTitleHeight(int groupIndex)
groupIndex
- Group index.protected Insets getGroupInsets()
protected int getLayoutGap()
protected void recomputeGroupHeaders()
public int getPreferredHeight(int buttonVisibleRows, int titleVisibleRows)
buttonVisibleRows
- Target number of visible button rows.titleVisibleRows
- Target number of visible group title rows.