Class BasicRibbonBandUI
java.lang.Object
javax.swing.plaf.ComponentUI
org.pushingpixels.radiance.component.internal.ui.ribbon.RibbonBandUI
org.pushingpixels.radiance.component.internal.ui.ribbon.BasicRibbonBandUI
- Direct Known Subclasses:
RadianceRibbonBandUI
Basic UI for ribbon band
JRibbonBand
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
Event listener to handle global ribbon events.private static class
private static class
private static class
private static class
static class
private static class
private static class
private class
Layout for the ribbon band. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate JCommandButton
The button for collapsed state.protected JCommandButton
The band expand button.protected Command
private MouseListener
Mouse listener on the associated ribbon band.private Dimension
private PropertyChangeListener
Listens to property changes on the associated ribbon band.protected AbstractRibbonBand
The associated ribbon band. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract JCommandButton
Creates the expand button for the associated ribbon band.protected abstract Command
createExpandCommand
(ComponentOrientation componentOrientation) protected LayoutManager
Invoked byinstallUI
to create a layout manager object to manage the ribbon band.int
protected void
Installs subcomponents on the associated ribbon band.protected void
Installs default parameters on the associated ribbon band.protected void
Installs listeners on the associated ribbon band.void
void
paint
(Graphics g, JComponent c) protected abstract void
paintBandTitle
(Graphics g, Rectangle titleRectangle, String title) Paints band title pane.protected abstract void
paintBandTrailingSeparator
(Graphics graphics, Rectangle toFill) Paints band background.private void
private void
protected void
Uninstalls components from the associated ribbon band.protected void
Uninstalls default parameters from the associated ribbon band.protected void
Uninstalls listeners from the associated ribbon band.void
Methods inherited from class org.pushingpixels.radiance.component.internal.ui.ribbon.RibbonBandUI
getBandTitleHeight
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, update
-
Field Details
-
ribbonBand
The associated ribbon band. -
collapsedButton
The button for collapsed state. -
expandButton
The band expand button. Is visible when theAbstractRibbonBand.getExpandCommandListener()
of the associated ribbon band is notnull
. -
expandCommand
-
popupContentSize
-
mouseListener
Mouse listener on the associated ribbon band. -
propertyChangeListener
Listens to property changes on the associated ribbon band.
-
-
Constructor Details
-
BasicRibbonBandUI
public BasicRibbonBandUI()
-
-
Method Details
-
installUI
- Overrides:
installUI
in classComponentUI
-
uninstallUI
- Overrides:
uninstallUI
in classComponentUI
-
installDefaults
protected void installDefaults()Installs default parameters on the associated ribbon band. -
installComponents
protected void installComponents()Installs subcomponents on the associated ribbon band. -
syncExpandButton
private void syncExpandButton() -
syncCollapsedButton
private void syncCollapsedButton() -
createExpandButton
Creates the expand button for the associated ribbon band.- Returns:
- Expand button for the associated ribbon band.
-
createExpandCommand
-
installListeners
protected void installListeners()Installs listeners on the associated ribbon band. -
uninstallDefaults
protected void uninstallDefaults()Uninstalls default parameters from the associated ribbon band. -
uninstallComponents
protected void uninstallComponents()Uninstalls components from the associated ribbon band. -
uninstallListeners
protected void uninstallListeners()Uninstalls listeners from the associated ribbon band. -
createLayoutManager
Invoked byinstallUI
to create a layout manager object to manage the ribbon band.- Returns:
- a layout manager object
-
paint
- Overrides:
paint
in classComponentUI
-
paintBandTitle
Paints band title pane.- Parameters:
g
- Graphics context.titleRectangle
- Rectangle for the title pane.title
- Title string.
-
paintBandTrailingSeparator
Paints band background.- Parameters:
graphics
- Graphics context.toFill
- Rectangle for the background.
-
getPreferredCollapsedWidth
public int getPreferredCollapsedWidth()- Specified by:
getPreferredCollapsedWidth
in classRibbonBandUI
-