Class BasicRibbonGalleryUI
java.lang.Object
javax.swing.plaf.ComponentUI
org.pushingpixels.radiance.component.internal.ui.ribbon.RibbonGalleryUI
org.pushingpixels.radiance.component.internal.ui.ribbon.BasicRibbonGalleryUI
- Direct Known Subclasses:
RadianceRibbonGalleryUI
Basic UI for ribbon gallery
JRibbonGallery
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
Layout for the ribbon gallery. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate JComponent
Contains the scroll down, scroll up and show popup buttons.private Command
private CommandMenuContentModel
private ChangeListener
private int
The index of the first visible button.private ChangeListener
private CommandGroup
protected Insets
Ribbon gallery margin.static final String
protected JRibbonGallery
The associated ribbon gallery.private Command
private Command
private int
private int
The count of visible buttons. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected LayoutManager
Invoked byinstallUI
to create a layout manager object to manage the ribbon gallery.protected int
Returns the layout gap for the controls in the associated ribbon gallery.int
getPreferredWidth
(int buttonCount, int availableHeight) Returns the preferred width of the ribbon gallery for the specified parameters.private int
protected void
Installs subcomponents on the associated ribbon gallery.protected void
Installs defaults on the associated ribbon gallery.protected void
Installs listeners on the associated ribbon gallery.void
void
paint
(Graphics g, JComponent c) protected abstract void
paintRibbonGalleryBorder
(Graphics graphics) Paints ribbon gallery border.private void
Scrolls the contents of this ribbon gallery one row down.private void
Scrolls the contents of this ribbon gallery one row up.private void
Scrolls the contents of this ribbon gallery to reveal the currently selected button.protected void
Uninstalls subcomponents from the associated ribbon gallery.protected void
Uninstalls defaults from the associated ribbon gallery.protected void
Uninstalls listeners from the associated ribbon gallery.void
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, update
-
Field Details
-
RIBBON_GALLERY_EXPAND_BUTTON
- See Also:
-
ribbonGallery
The associated ribbon gallery. -
firstVisibleButtonIndex
private int firstVisibleButtonIndexThe index of the first visible button. -
visibleButtonsInEachRow
private int visibleButtonsInEachRowThe count of visible buttons. -
visibleButtonRowNumber
private int visibleButtonRowNumber -
scrollDownCommand
-
scrollUpCommand
-
expandCommand
-
galleryScrollerCommands
-
buttonStrip
Contains the scroll down, scroll up and show popup buttons. -
expandedGalleryContentModel
-
galleryCommandSelectionListener
-
galleryModelChangeListener
-
expandedGalleryModelChangeListener
-
margin
Ribbon gallery margin.
-
-
Constructor Details
-
BasicRibbonGalleryUI
public BasicRibbonGalleryUI()
-
-
Method Details
-
installUI
- Overrides:
installUI
in classComponentUI
-
installComponents
protected void installComponents()Installs subcomponents on the associated ribbon gallery. -
uninstallComponents
protected void uninstallComponents()Uninstalls subcomponents from the associated ribbon gallery. -
installDefaults
protected void installDefaults()Installs defaults on the associated ribbon gallery. -
uninstallDefaults
protected void uninstallDefaults()Uninstalls defaults from the associated ribbon gallery. -
installListeners
protected void installListeners()Installs listeners on the associated ribbon gallery. -
uninstallListeners
protected void uninstallListeners()Uninstalls listeners from the associated ribbon gallery. -
uninstallUI
- Overrides:
uninstallUI
in classComponentUI
-
createLayoutManager
Invoked byinstallUI
to create a layout manager object to manage the ribbon gallery.- Returns:
- a layout manager object
-
paint
- Overrides:
paint
in classComponentUI
-
paintRibbonGalleryBorder
Paints ribbon gallery border.- Parameters:
graphics
- Graphics context.
-
getLayoutGap
protected int getLayoutGap()Returns the layout gap for the controls in the associated ribbon gallery.- Returns:
- The layout gap for the controls in the associated ribbon gallery.
-
getPreferredWidth
public int getPreferredWidth(int buttonCount, int availableHeight) Returns the preferred width of the ribbon gallery for the specified parameters.- Parameters:
buttonCount
- Button count.availableHeight
- Available height in pixels.- Returns:
- The preferred width of the ribbon gallery for the specified parameters.
-
getScrollerButtonWidth
private int getScrollerButtonWidth() -
scrollOneRowDown
private void scrollOneRowDown()Scrolls the contents of this ribbon gallery one row down. -
scrollOneRowUp
private void scrollOneRowUp()Scrolls the contents of this ribbon gallery one row up. -
scrollToSelected
private void scrollToSelected()Scrolls the contents of this ribbon gallery to reveal the currently selected button.
-