public class JRibbonGallery
extends javax.swing.JComponent
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.List<JCommandToggleButton> |
buttons |
The buttons of
this gallery. |
protected CommandToggleButtonGroup |
buttonSelectionGroup |
Button group for ensuring that only one button is selected.
|
protected java.util.List<StringValuePair<java.util.List<FlamingoCommand>>> |
commandGroups |
Gallery command groups.
|
protected java.util.List<FlamingoCommand> |
commands |
The commands of
this gallery. |
protected RibbonElementPriority |
displayPriority |
The current display priority of
this in-ribbon gallery. |
protected boolean |
isShowingPopupPanel |
Indication whether the ribbon gallery is showing the popup panel.
|
protected JRibbonBand.RibbonGalleryPopupCallback |
popupCallback |
|
protected int |
preferredPopupMaxButtonColumns |
Preferred maximum number of button columns for the popup panel.
|
protected int |
preferredPopupMaxVisibleButtonRows |
Preferred maximum number of visible button rows for the popup panel.
|
protected java.util.Map<RibbonElementPriority,java.lang.Integer> |
preferredVisibleIconCount |
Preferred widths for each possible display state (set in the user code according to design
preferences).
|
static java.lang.String |
uiClassID |
The UI class ID string.
|
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT| Constructor | Description |
|---|---|
JRibbonGallery() |
Creates new in-ribbon gallery.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addRibbonGalleryCommands(java.lang.String commandGroupName,
FlamingoCommand... commands) |
Adds commands to the specified command group in this ribbon gallery.
|
JCommandToggleButton |
getButtonAt(int index) |
Returns the gallery button at specified index.
|
CommandButtonDisplayState |
getButtonDisplayState() |
|
JCommandToggleButton |
getButtonForCommand(FlamingoCommand command) |
|
FlamingoCommand |
getCommandAt(int index) |
Returns the gallery command at specified index.
|
int |
getCommandCount() |
Returns the number of gallery commands in
this in-ribbon gallery. |
java.util.List<FlamingoCommand> |
getCommandGroup(java.lang.String commandGroupName) |
Returns the list of commands in the specified command group.
|
int |
getCommandGroupCount() |
Returns the number of command groups in
this in-ribbon gallery. |
RibbonElementPriority |
getDisplayPriority() |
Returns the current display priority for
this in-ribbon gallery. |
java.lang.String |
getExpandKeyTip() |
|
JCommandButtonPanel |
getPopupButtonPanel() |
Returns the associated popup gallery.
|
JRibbonBand.RibbonGalleryPopupCallback |
getPopupCallback() |
|
int |
getPreferredPopupMaxButtonColumns() |
|
int |
getPreferredPopupMaxVisibleButtonRows() |
|
int |
getPreferredWidth(RibbonElementPriority state,
int availableHeight) |
Returns the preferred width of
this in-ribbon gallery for the specified display
state. |
JCommandToggleButton |
getSelectedButton() |
Returns the currently selected gallery button.
|
FlamingoCommand |
getSelectedCommand() |
Returns the currently selected gallery command.
|
RibbonGalleryUI |
getUI() |
Returns the UI object which implements the L&F for this component.
|
java.lang.String |
getUIClassID() |
Returns the name of the UI class that implements the L&F for this component.
|
boolean |
isShowingPopupPanel() |
Returns indication whether the popup panel is showing.
|
void |
removeRibbonGalleryCommands(FlamingoCommand... commands) |
Removes the specified commands from this ribbon gallery.
|
void |
setCommandDisplayState(CommandButtonDisplayState commandDisplayState) |
|
void |
setDisplayPriority(RibbonElementPriority displayPriority) |
Sets new display priority for
this in-ribbon gallery. |
void |
setExpandKeyTip(java.lang.String expandKeyTip) |
|
void |
setGroupMapping(java.util.List<StringValuePair<java.util.List<FlamingoCommand>>> commands) |
Sets the command groups for this ribbon gallery.
|
void |
setPopupCallback(JRibbonBand.RibbonGalleryPopupCallback popupCallback) |
|
void |
setPreferredPopupPanelDimension(int preferredPopupMaxButtonColumns,
int preferredPopupMaxVisibleButtonRows) |
Sets the preferred dimension of the popup panel.
|
void |
setPreferredVisibleButtonCount(RibbonElementPriority state,
int visibleButtonCount) |
Set preferred width of
this in-ribbon gallery for the specified display state. |
void |
setSelectedButton(JCommandToggleButton selectedButton) |
Changes the selection to the specified button.
|
void |
setSelectedCommand(FlamingoCommand selectedCommand) |
Changes the selection to the specified button.
|
void |
setShowingPopupPanel(boolean isShowingPopupPanel) |
Sets indication whether the popup panel is showing.
|
void |
setUI(RibbonGalleryUI ui) |
Sets the new UI delegate.
|
void |
updateUI() |
Resets the UI property to a value from the current look and feel.
|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateprotected java.util.List<JCommandToggleButton> buttons
this gallery.protected java.util.List<FlamingoCommand> commands
this gallery.protected CommandToggleButtonGroup buttonSelectionGroup
protected RibbonElementPriority displayPriority
this in-ribbon gallery.protected java.util.Map<RibbonElementPriority,java.lang.Integer> preferredVisibleIconCount
protected java.util.List<StringValuePair<java.util.List<FlamingoCommand>>> commandGroups
protected int preferredPopupMaxButtonColumns
protected int preferredPopupMaxVisibleButtonRows
protected boolean isShowingPopupPanel
protected JRibbonBand.RibbonGalleryPopupCallback popupCallback
public static final java.lang.String uiClassID
public void setUI(RibbonGalleryUI ui)
ui - New UI delegate.public void updateUI()
updateUI in class javax.swing.JComponentJComponent.updateUI()public RibbonGalleryUI getUI()
getUI in class javax.swing.JComponentRibbonGalleryUI objectsetUI(org.pushingpixels.flamingo.internal.ui.ribbon.RibbonGalleryUI)public java.lang.String getUIClassID()
getUIClassID in class javax.swing.JComponentJComponent.getUIClassID(),
UIDefaults.getUI(javax.swing.JComponent)public void setPreferredVisibleButtonCount(RibbonElementPriority state, int visibleButtonCount)
this in-ribbon gallery for the specified display state.state - Display state.visibleButtonCount - Preferred width for the specified state.public int getPreferredWidth(RibbonElementPriority state, int availableHeight)
this in-ribbon gallery for the specified display
state.state - Display state.availableHeight - Available height in pixels.this in-ribbon gallery for the specified display
state.public void setDisplayPriority(RibbonElementPriority displayPriority)
this in-ribbon gallery.displayPriority - New display priority for this in-ribbon gallery.public RibbonElementPriority getDisplayPriority()
this in-ribbon gallery.this in-ribbon gallery.public int getCommandGroupCount()
this in-ribbon gallery.this in-ribbon gallery.public java.util.List<FlamingoCommand> getCommandGroup(java.lang.String commandGroupName)
commandGroupName - Command group name.public int getCommandCount()
this in-ribbon gallery.this in-ribbon gallery.public FlamingoCommand getCommandAt(int index)
index - Gallery command index.public JCommandToggleButton getButtonAt(int index)
index - Gallery button index.public JCommandToggleButton getButtonForCommand(FlamingoCommand command)
public JCommandToggleButton getSelectedButton()
public FlamingoCommand getSelectedCommand()
public void setSelectedButton(JCommandToggleButton selectedButton)
selectedButton - New value for the currently selected gallery button.public void setSelectedCommand(FlamingoCommand selectedCommand)
selectedCommand - New value for the currently selected gallery command.public JCommandButtonPanel getPopupButtonPanel()
public void setShowingPopupPanel(boolean isShowingPopupPanel)
isShowingPopupPanel - Indication whether the popup panel is showing.public boolean isShowingPopupPanel()
true if the popup panel is showing, false otherwise.public void setGroupMapping(java.util.List<StringValuePair<java.util.List<FlamingoCommand>>> commands)
commands - Command groups.public void addRibbonGalleryCommands(java.lang.String commandGroupName,
FlamingoCommand... commands)
commandGroupName - Command group name.commands - Commands to add to the specified command group.public void removeRibbonGalleryCommands(FlamingoCommand... commands)
commands - Commands to remove from this gallery.public void setPreferredPopupPanelDimension(int preferredPopupMaxButtonColumns,
int preferredPopupMaxVisibleButtonRows)
preferredPopupMaxButtonColumns - Preferred maximum number of button columns for
the popup panel.preferredPopupMaxVisibleButtonRows - Preferred maximum number of visible button rows
for the popup panel.public void setPopupCallback(JRibbonBand.RibbonGalleryPopupCallback popupCallback)
public JRibbonBand.RibbonGalleryPopupCallback getPopupCallback()
public int getPreferredPopupMaxButtonColumns()
public int getPreferredPopupMaxVisibleButtonRows()
public void setExpandKeyTip(java.lang.String expandKeyTip)
public java.lang.String getExpandKeyTip()
public CommandButtonDisplayState getButtonDisplayState()
public void setCommandDisplayState(CommandButtonDisplayState commandDisplayState)