public class BasicRibbonGalleryUI extends RibbonGalleryUI
JRibbonGallery
.Modifier and Type | Class and Description |
---|---|
protected static class |
BasicRibbonGalleryUI.ExpandCommandButton |
protected static class |
BasicRibbonGalleryUI.JButtonStripUIResource
Button strip as a UI resource.
|
Modifier and Type | Field and Description |
---|---|
protected JCommandButtonStrip |
buttonStrip
Contains the scroll down, scroll up and show popup buttons.
|
protected BasicRibbonGalleryUI.ExpandCommandButton |
expandActionButton
The button that shows the associated popup gallery.
|
protected java.awt.event.ActionListener |
expandListener
Listener on the gallery expand button.
|
protected int |
firstVisibleButtonIndex
The index of the first visible button.
|
protected java.awt.Insets |
margin
Ribbon gallery margin.
|
protected PopupPanelManager.PopupListener |
popupListener
Listener on the
PopupPanelManager changes to sync the
JRibbonGallery.setShowingPopupPanel(boolean) once the popup
gallery is dismissed by the user. |
protected java.beans.PropertyChangeListener |
propertyChangeListener
Property change listener.
|
protected JRibbonGallery |
ribbonGallery
The associated ribbon gallery.
|
protected JCommandButton |
scrollDownButton
The button that scrolls down the associated
ribbonGallery . |
protected java.awt.event.ActionListener |
scrollDownListener
Listener on the gallery scroll-down button.
|
protected JCommandButton |
scrollUpButton
The button that scrolls up the associated
ribbonGallery . |
protected java.awt.event.ActionListener |
scrollUpListener
Listener on the gallery scroll-up button.
|
protected int |
visibleButtonRowNumber |
protected int |
visibleButtonsInEachRow
The count of visible buttons.
|
Constructor and Description |
---|
BasicRibbonGalleryUI() |
Modifier and Type | Method and Description |
---|---|
protected BasicRibbonGalleryUI.ExpandCommandButton |
createExpandButton()
Creates the expand button.
|
protected java.awt.LayoutManager |
createLayoutManager()
Invoked by
installUI to create a layout manager object to
manage the JCommandButtonStrip . |
protected JCommandButton |
createScrollDownButton()
Creates the scroll-down button.
|
protected JCommandButton |
createScrollUpButton()
Creates the scroll-up button.
|
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c) |
protected int |
getLayoutGap()
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.
|
protected void |
installComponents()
Installs subcomponents on the associated ribbon gallery.
|
protected void |
installDefaults()
Installs defaults on the associated ribbon gallery.
|
protected void |
installListeners()
Installs listeners on the associated ribbon gallery.
|
void |
installUI(javax.swing.JComponent c) |
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c) |
protected void |
paintRibbonGalleryBorder(java.awt.Graphics graphics)
Paints ribbon gallery border.
|
protected void |
scrollOneRowDown()
Scrolls the contents of this ribbon gallery one row down.
|
protected void |
scrollOneRowUp()
Scrolls the contents of this ribbon gallery one row up.
|
protected void |
scrollToSelected()
Scrolls the contents of this ribbon gallery to reveal the currently
selected button.
|
protected void |
syncExpandKeyTip() |
protected void |
uninstallComponents()
Uninstalls subcomponents from the associated ribbon gallery.
|
protected void |
uninstallDefaults()
Uninstalls defaults from the associated ribbon gallery.
|
protected void |
uninstallListeners()
Uninstalls listeners from the associated ribbon gallery.
|
void |
uninstallUI(javax.swing.JComponent c) |
protected JRibbonGallery ribbonGallery
protected int firstVisibleButtonIndex
protected int visibleButtonsInEachRow
protected int visibleButtonRowNumber
protected JCommandButton scrollDownButton
ribbonGallery
.protected JCommandButton scrollUpButton
ribbonGallery
.protected BasicRibbonGalleryUI.ExpandCommandButton expandActionButton
protected JCommandButtonStrip buttonStrip
scrollDownButton
,
scrollUpButton
,
expandActionButton
protected java.awt.event.ActionListener scrollDownListener
protected java.awt.event.ActionListener scrollUpListener
protected java.awt.event.ActionListener expandListener
protected PopupPanelManager.PopupListener popupListener
PopupPanelManager
changes to sync the
JRibbonGallery.setShowingPopupPanel(boolean)
once the popup
gallery is dismissed by the user.protected java.beans.PropertyChangeListener propertyChangeListener
protected java.awt.Insets margin
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
public void installUI(javax.swing.JComponent c)
installUI
in class javax.swing.plaf.ComponentUI
protected void installComponents()
protected JCommandButton createScrollDownButton()
protected JCommandButton createScrollUpButton()
protected BasicRibbonGalleryUI.ExpandCommandButton createExpandButton()
protected void uninstallComponents()
protected void installDefaults()
protected void uninstallDefaults()
protected void installListeners()
protected void uninstallListeners()
public void uninstallUI(javax.swing.JComponent c)
uninstallUI
in class javax.swing.plaf.ComponentUI
protected java.awt.LayoutManager createLayoutManager()
installUI
to create a layout manager object to
manage the JCommandButtonStrip
.public void paint(java.awt.Graphics g, javax.swing.JComponent c)
paint
in class javax.swing.plaf.ComponentUI
protected void paintRibbonGalleryBorder(java.awt.Graphics graphics)
graphics
- Graphics context.protected int getLayoutGap()
public int getPreferredWidth(int buttonCount, int availableHeight)
buttonCount
- Button count.availableHeight
- Available height in pixels.protected void scrollOneRowDown()
protected void scrollOneRowUp()
protected void scrollToSelected()
protected void syncExpandKeyTip()