Class JRibbon
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- org.pushingpixels.flamingo.api.ribbon.JRibbon
-
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable
public class JRibbon extends JComponent
The ribbon component.The ribbon has the following major parts:
- Ribbon tasks added with
addTask(RibbonTask) - Contextual ribbon task groups added with
addContextualTaskGroup(RibbonContextualTaskGroup) - Application menu button set by
setApplicationMenu(RibbonApplicationMenu) - Taskbar panel populated by
addTaskbarComponent(Component) - Help button set by
configureHelp(ResizableIcon, ActionListener)
While multiple ribbon tasks can be added to the ribbon, only one is visible at any given time. This task is called the selected task. Tasks can be switched with the task buttons placed along the top part of the ribbon. Once a task has been added to the ribbon, it cannot be removed.
The contextual ribbon task groups allow showing and hiding ribbon tasks based on the current selection in the application. For example, Word only shows the table tasks when a table is selected in the document. By default, tasks belonging to the groups adde by
addContextualTaskGroup(RibbonContextualTaskGroup)are not visible. To show the tasks belonging to the specific group, callsetVisible(RibbonContextualTaskGroup, boolean)API. Note that you can have multiple task groups visible at the same time.The application menu button is a big round button shown in the top left corner of the ribbon. If the
setApplicationMenu(RibbonApplicationMenu)is not called, or called with thenullvalue, the application menu button is not shown, and ribbon task buttons are shifted to the left.The taskbar panel allows showing controls that are visible no matter what ribbon task is selected. To add a taskbar component use the
addTaskbarComponent(Component)API. The taskbar panel lives to the right of the application menu button. Taskbar components can be removed with theremoveTaskbarComponent(Component)API.The ribbon can be minimized in one of the following ways:
- Calling
setMinimized(boolean)withtrue. - User double-clicking on a task button.
- User pressing
Ctrl+F1key combination.
A minimized ribbon shows the application menu button, taskbar panel, task buttons and help button, but not the ribbon bands of the selected task. Clicking a task button shows the ribbon bands of that task in a popup without shifting the application content down.
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
-
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
-
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
-
Field Summary
Fields Modifier and Type Field Description ResizableIconapplicationIconThe application icon.static StringPROPERTY_APPLICATION_ICONThe property string used when theapplicationIconchanges.static StringPROPERTY_APPLICATION_MENUThe property string used when theapplicationMenuchanges.static StringPROPERTY_APPLICATION_MENU_KEY_TIPThe property string used when theapplicationMenuKeyTipchanges.static StringPROPERTY_APPLICATION_MENU_RICH_TOOLTIPThe property string used when theapplicationMenuRichTooltipchanges.static StringPROPERTY_MINIMIZEDThe property string used when theisMinimizedchanges.static StringPROPERTY_SELECTED_TASKThe property string used when thecurrentlySelectedTaskchanges.static StringuiClassIDThe UI class ID string.-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
-
Constructor Summary
Constructors Constructor Description JRibbon()Constructs an empty defaultJRibbon.JRibbon(ResizableIcon appIcon)Constructs aJRibbonspecifying the application icon.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddChangeListener(ChangeListener l)Adds the specified change listener to track changes to this ribbon.voidaddContextualTaskGroup(RibbonContextualTaskGroup group)Adds the specified contextual task group to this ribbon.voidaddHelpPanelComponent(Component comp)Adds a component to the 'Help Panel.' This is the area where the help button lives.voidaddTask(RibbonTask task)Adds the specified task to this ribbon.voidaddTaskbarComponent(Component comp)Adds the specified taskbar component to this ribbon.voidconfigureHelp(ResizableIcon helpIcon, ActionListener helpActionListener)Configures the help button of this ribbon.protected voidfireStateChanged()Notifies all registered listeners that the state of this ribbon has changed.ResizableIcongetApplicationIcon()Returns the application icon.RibbonApplicationMenugetApplicationMenu()Returns the application menu of this ribbon.StringgetApplicationMenuKeyTip()Returns the key tip of the application menu button.RichTooltipgetApplicationMenuRichTooltip()Returns the rich tooltip of the application menu button.RibbonContextualTaskGroupgetContextualTaskGroup(int index)Retrieves contextual task group at specified index.intgetContextualTaskGroupCount()Returns the number of contextual task groups inthisribbon.ActionListenergetHelpActionListener()Returns the action listener for the help button.ResizableIcongetHelpIcon()Returns the icon for the help button.RichTooltipgetHelpRichTooltip()Returns the rich tooltip of the help button.JRibbonFramegetRibbonFrame()Deprecated.Dropped support in order to decouple theJRibbonfrom theJRibbonFrameRibbonTaskgetSelectedTask()Returns the currently selected task.RibbonTaskgetTask(int index)Retrieves the regular task at specified index.List<Component>getTaskbarComponents()Gets an unmodifiable list of all taskbar components ofthisribbon.intgetTaskCount()Returns the number of regular tasks inthisribbon.RibbonUIgetUI()Returns the UI object which implements the L&F for this component.StringgetUIClassID()booleanisMinimized()Returns the indication whether this ribbon is minimized.booleanisVisible(RibbonContextualTaskGroup group)Returns the visibility of ribbon tasks in the specified contextual task group.voidremoveAllHelpPanelComponents()Removes al the components from the 'Help Panel'.voidremoveAllTaskbarComponents()Removes all components added to the taskbar of the ribbon.voidremoveAllTasks()Removes all tasks from the ribbon.voidremoveChangeListener(ChangeListener l)Removes the specified change listener from tracking changes to this ribbon.voidremoveHelpPanelComponent(Component comp)Removes a component from the 'Help Panel'.voidremoveTask(int pos)Removes the task at the specified position, if it represents a valid task.voidremoveTask(RibbonTask task)Removes the given task from the ribbon.voidremoveTaskbarComponent(Component comp)Removes the specified taskbar component from this ribbon.voidsetApplicationIcon(ResizableIcon applicationIcon)Sets the application icon.voidsetApplicationMenu(RibbonApplicationMenu applicationMenu)Sets the application menu for this ribbon.voidsetApplicationMenuKeyTip(String keyTip)Sets the key tip of the application menu button.voidsetApplicationMenuRichTooltip(RichTooltip tooltip)Sets the rich tooltip of the application menu button.voidsetHelpRichTooltip(RichTooltip tooltip)Sets the rich tooltip of the help button.voidsetMinimized(boolean isMinimized)Changes the minimized state of this ribbon.voidsetSelectedTask(RibbonTask task)Selects the specified task.voidsetVisible(boolean flag)voidsetVisible(RibbonContextualTaskGroup group, boolean isVisible)Sets the visibility of ribbon tasks in the specified contextual task group.voidupdateUI()-
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, 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, validateTree
-
Methods inherited from class java.awt.Component
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, transferFocusUpCycle
-
-
-
-
Field Detail
-
PROPERTY_APPLICATION_ICON
public static final String PROPERTY_APPLICATION_ICON
The property string used when theapplicationIconchanges. The value is "ribbon.icon".- See Also:
- Constant Field Values
-
PROPERTY_APPLICATION_MENU_RICH_TOOLTIP
public static final String PROPERTY_APPLICATION_MENU_RICH_TOOLTIP
The property string used when theapplicationMenuRichTooltipchanges. The value is "applicationMenuRichTooltip".- See Also:
- Constant Field Values
-
PROPERTY_APPLICATION_MENU
public static final String PROPERTY_APPLICATION_MENU
The property string used when theapplicationMenuchanges. The value is "applicationMenu".- See Also:
- Constant Field Values
-
PROPERTY_APPLICATION_MENU_KEY_TIP
public static final String PROPERTY_APPLICATION_MENU_KEY_TIP
The property string used when theapplicationMenuKeyTipchanges. The value is "applicationMenuKeyTip".- See Also:
- Constant Field Values
-
PROPERTY_SELECTED_TASK
public static final String PROPERTY_SELECTED_TASK
The property string used when thecurrentlySelectedTaskchanges. The value is "selectedTask".- See Also:
- Constant Field Values
-
PROPERTY_MINIMIZED
public static final String PROPERTY_MINIMIZED
The property string used when theisMinimizedchanges. The value is "minimized".- See Also:
- Constant Field Values
-
uiClassID
public static final String uiClassID
The UI class ID string.- See Also:
- Constant Field Values
-
applicationIcon
public ResizableIcon applicationIcon
The application icon. This is displayed in the application menu button.
-
-
Constructor Detail
-
JRibbon
public JRibbon()
Constructs an empty defaultJRibbon. Applications are highly encouraged to useJRibbonFrameand access the ribbon withJRibbonFrame.getRibbon()API.
-
JRibbon
public JRibbon(ResizableIcon appIcon)
Constructs aJRibbonspecifying the application icon. The application icon is displayed in the application menu button. Applications are highly encouraged to useJRibbonFrameand access the ribbon withJRibbonFrame.getRibbon()API.- Parameters:
appIcon- the application icon
-
-
Method Detail
-
addTaskbarComponent
public void addTaskbarComponent(Component comp)
Adds the specified taskbar component to this ribbon.Taskbar components are small components placed to the right of the application menu. These components usually perform an action common among the entire application.
- Parameters:
comp- the taskbar component to add- See Also:
removeTaskbarComponent(Component),removeAllTaskbarComponents(),getTaskbarComponents()
-
removeTaskbarComponent
public void removeTaskbarComponent(Component comp)
Removes the specified taskbar component from this ribbon.- Parameters:
comp- The taskbar component to remove.- See Also:
addTaskbarComponent(Component),getTaskbarComponents(),removeAllTaskbarComponents()
-
removeAllTaskbarComponents
public void removeAllTaskbarComponents()
Removes all components added to the taskbar of the ribbon.
-
addTask
public void addTask(RibbonTask task)
Adds the specified task to this ribbon.- Parameters:
task- The ribbon task to add.- See Also:
addContextualTaskGroup(RibbonContextualTaskGroup),getTaskCount(),getTask(int)
-
removeTask
public void removeTask(int pos)
Removes the task at the specified position, if it represents a valid task. Throws anIndexOutOfBoundsExceptionif not.- Parameters:
pos- The position of the task to remove.
-
removeTask
public void removeTask(RibbonTask task)
Removes the given task from the ribbon. If this is the currently visible task, the ribbon will move to the task to its left, unless the removed task is the left-most, in which case it will move to the next task to the right.- Parameters:
task- The ribbon task to be removed from the panel.- Throws:
IllegalArgumentException- iftaskisnull
-
removeAllTasks
public void removeAllTasks()
Removes all tasks from the ribbon.
-
configureHelp
public void configureHelp(ResizableIcon helpIcon, ActionListener helpActionListener)
Configures the help button of this ribbon.- Parameters:
helpIcon- The icon for the help button.helpActionListener- The action listener for the help button.- See Also:
getHelpIcon(),getHelpActionListener()
-
getHelpIcon
public ResizableIcon getHelpIcon()
Returns the icon for the help button. Will returnnullif the help button has not been configured with theconfigureHelp(ResizableIcon, ActionListener)API.- Returns:
- The icon for the help button.
- See Also:
configureHelp(ResizableIcon, ActionListener),getHelpActionListener()
-
getHelpActionListener
public ActionListener getHelpActionListener()
Returns the action listener for the help button. Will returnnullif the help button has not been configured with theconfigureHelp(ResizableIcon, ActionListener)API.- Returns:
- The action listener for the help button.
- See Also:
configureHelp(ResizableIcon, ActionListener),getHelpIcon()
-
setHelpRichTooltip
public void setHelpRichTooltip(RichTooltip tooltip)
Sets the rich tooltip of the help button. Fires an stateChanged event.- Parameters:
tooltip- The rich tooltip of the help button.- See Also:
getHelpRichTooltip(),configureHelp(org.pushingpixels.flamingo.api.common.icon.ResizableIcon, java.awt.event.ActionListener)
-
getHelpRichTooltip
public RichTooltip getHelpRichTooltip()
Returns the rich tooltip of the help button.- Returns:
- The rich tooltip of the help button.
- See Also:
setHelpRichTooltip(org.pushingpixels.flamingo.api.common.RichTooltip),configureHelp(org.pushingpixels.flamingo.api.common.icon.ResizableIcon, java.awt.event.ActionListener)
-
addHelpPanelComponent
public void addHelpPanelComponent(Component comp)
Adds a component to the 'Help Panel.' This is the area where the help button lives. and is the far right area of the main tab area. Components will be added in left to right fashion, Also, if a help listener is specified then the help button will be the rightmost component on the list. Generally speaking this area should not be abused, as any large amount of components will cause the space available for the task tabs to shrink. This is the area where you would add a "collapse" button like found in Office 2010, or the min/max/close buttons of an integrated desktop area.- Parameters:
comp- the component to be added
-
removeHelpPanelComponent
public void removeHelpPanelComponent(Component comp)
Removes a component from the 'Help Panel'.- Parameters:
comp- The component to remove. If the component is not currently on the help panel this call will be a no-op.
-
removeAllHelpPanelComponents
public void removeAllHelpPanelComponents()
Removes al the components from the 'Help Panel'.
-
addContextualTaskGroup
public void addContextualTaskGroup(RibbonContextualTaskGroup group)
Adds the specified contextual task group to this ribbon.- Parameters:
group- Task group to add.- See Also:
addTask(RibbonTask),setVisible(RibbonContextualTaskGroup, boolean),isVisible(RibbonContextualTaskGroup)
-
getTaskCount
public int getTaskCount()
Returns the number of regular tasks inthisribbon. This does not include the contextual ribbon tasks.To find the total number of ribbon tasks (including contextual ribbon tasks) you will have to iterate through the contextual task groups.
- Returns:
- Number of regular tasks in
thisribbon. - See Also:
getTask(int),addTask(RibbonTask)
-
getTask
public RibbonTask getTask(int index)
Retrieves the regular task at specified index.- Parameters:
index- task index- Returns:
- the task that matches the specified index
- See Also:
getTaskCount(),addTask(RibbonTask)
-
getContextualTaskGroupCount
public int getContextualTaskGroupCount()
Returns the number of contextual task groups inthisribbon.- Returns:
- number of contextual task groups in
thisribbon - See Also:
addContextualTaskGroup(RibbonContextualTaskGroup),getContextualTaskGroup(int)
-
getContextualTaskGroup
public RibbonContextualTaskGroup getContextualTaskGroup(int index)
Retrieves contextual task group at specified index.- Parameters:
index- group index- Returns:
- group that matches the specified index
- See Also:
addContextualTaskGroup(RibbonContextualTaskGroup),getContextualTaskGroupCount()
-
setSelectedTask
public void setSelectedTask(RibbonTask task)
Selects the specified task. The task can be either regular (added withaddTask(RibbonTask)) or a task in a visible contextual task group (added withaddContextualTaskGroup(RibbonContextualTaskGroup). Fires aselectedTaskproperty change event.- Parameters:
task- task to select- Throws:
IllegalArgumentException- iftaskis not in the ribbon, isnull, or not visible.- See Also:
getSelectedTask()
-
getSelectedTask
public RibbonTask getSelectedTask()
Returns the currently selected task.- Returns:
- The currently selected task.
- See Also:
setSelectedTask(RibbonTask)
-
updateUI
public void updateUI()
- Overrides:
updateUIin classJComponent
-
getUI
public RibbonUI getUI()
Returns the UI object which implements the L&F for this component.- Overrides:
getUIin classJComponent- Returns:
- a
RibbonUIobject - See Also:
JComponent.setUI(javax.swing.plaf.ComponentUI)
-
getUIClassID
public String getUIClassID()
- Overrides:
getUIClassIDin classJComponent
-
getTaskbarComponents
public List<Component> getTaskbarComponents()
Gets an unmodifiable list of all taskbar components ofthisribbon.- Returns:
- All taskbar components of
thisribbon. - See Also:
addTaskbarComponent(Component),removeTaskbarComponent(Component)
-
addChangeListener
public void addChangeListener(ChangeListener l)
Adds the specified change listener to track changes to this ribbon.- Parameters:
l- Change listener to add.- See Also:
removeChangeListener(ChangeListener)
-
removeChangeListener
public void removeChangeListener(ChangeListener l)
Removes the specified change listener from tracking changes to this ribbon.- Parameters:
l- Change listener to remove.- See Also:
addChangeListener(ChangeListener)
-
fireStateChanged
protected void fireStateChanged()
Notifies all registered listeners that the state of this ribbon has changed.
-
setVisible
public void setVisible(RibbonContextualTaskGroup group, boolean isVisible)
Sets the visibility of ribbon tasks in the specified contextual task group. Visibility of all ribbon tasks in the specified group is affected. Note that the ribbon can show ribbon tasks of multiple groups at the same time.- Parameters:
group- Contextual task group.isVisible- Iftrue, all ribbon tasks in the specified group will be visible. Iffalse, all ribbon tasks in the specified group will be hidden.- See Also:
isVisible(RibbonContextualTaskGroup)
-
isVisible
public boolean isVisible(RibbonContextualTaskGroup group)
Returns the visibility of ribbon tasks in the specified contextual task group.- Parameters:
group- Contextual task group.- Returns:
trueif the ribbon tasks in the specified group are visible,falseotherwise.
-
setApplicationMenu
public void setApplicationMenu(RibbonApplicationMenu applicationMenu)
Sets the application menu for this ribbon. Ifnullis passed, the application menu button is hidden. Fires anapplicationMenuproperty change event.- Parameters:
applicationMenu- The new application menu. Can benull.- See Also:
getApplicationMenu()
-
getApplicationMenu
public RibbonApplicationMenu getApplicationMenu()
Returns the application menu of this ribbon.- Returns:
- The application menu of this ribbon.
- See Also:
setApplicationMenu(RibbonApplicationMenu)
-
setApplicationMenuRichTooltip
public void setApplicationMenuRichTooltip(RichTooltip tooltip)
Sets the rich tooltip of the application menu button. Fires anapplicationMenuRichTooltipproperty change event.- Parameters:
tooltip- The rich tooltip of the application menu button.- See Also:
getApplicationMenuRichTooltip(),setApplicationMenu(RibbonApplicationMenu)
-
getApplicationMenuRichTooltip
public RichTooltip getApplicationMenuRichTooltip()
Returns the rich tooltip of the application menu button.- Returns:
- The rich tooltip of the application menu button.
- See Also:
setApplicationMenuRichTooltip(RichTooltip),setApplicationMenu(RibbonApplicationMenu)
-
setApplicationMenuKeyTip
public void setApplicationMenuKeyTip(String keyTip)
Sets the key tip of the application menu button. Fires anapplicationMenuKeyTipproperty change event.- Parameters:
keyTip- The new key tip for the application menu button.- See Also:
setApplicationMenu(RibbonApplicationMenu),getApplicationMenuKeyTip()
-
getApplicationMenuKeyTip
public String getApplicationMenuKeyTip()
Returns the key tip of the application menu button.- Returns:
- The key tip of the application menu button.
- See Also:
setApplicationMenuKeyTip(String),setApplicationMenu(RibbonApplicationMenu)
-
isMinimized
public boolean isMinimized()
Returns the indication whether this ribbon is minimized.- Returns:
trueif this ribbon is minimized,falseotherwise.- See Also:
setMinimized(boolean)
-
setMinimized
public void setMinimized(boolean isMinimized)
Changes the minimized state of this ribbon. Fires aminimizedproperty change event.- Parameters:
isMinimized- iftrue, this ribbon becomes minimized, otherwise it is unminimized.
-
getRibbonFrame
@Deprecated public JRibbonFrame getRibbonFrame()
Deprecated.Dropped support in order to decouple theJRibbonfrom theJRibbonFrameReturns the ribbon frame that hosts this ribbon. The result can benull.- Returns:
- The ribbon frame that hosts this ribbon.
-
setVisible
public void setVisible(boolean flag)
- Overrides:
setVisiblein classJComponent
-
getApplicationIcon
public ResizableIcon getApplicationIcon()
Returns the application icon. The application icon is displayed on the application menu button.This is a convenience method and is equivalent to
getUI().getApplicationIcon().- Returns:
- the application icon
- See Also:
getUI(),RibbonUI.getApplicationIcon(),setApplicationIcon(ResizableIcon)
-
setApplicationIcon
public void setApplicationIcon(ResizableIcon applicationIcon)
Sets the application icon. This is displayed on the application menu button.There is no check performed to see if
applicationIconisnull.A
PropertyChangeEventis fired for thePROPERTY_APPLICATION_ICONproperty.- Parameters:
applicationIcon- the application icon to set- See Also:
getUI(),RibbonUI.setApplicationIcon(ResizableIcon),getApplicationIcon()
-
-