Class BasicRibbonUI
java.lang.Object
javax.swing.plaf.ComponentUI
org.pushingpixels.flamingo.internal.ui.ribbon.RibbonUI
org.pushingpixels.flamingo.internal.ui.ribbon.BasicRibbonUI
Basic UI for ribbon
JRibbon.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static classprotected classLayout for the ribbon.protected class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JRibbonApplicationMenuButtonprotected JScrollablePanel<BasicRibbonUI.BandHostPanel>static final Stringprotected JCommandButtonprotected JComponentstatic final StringClient property marking the ribbon component to indicate whether the task bar and contextual task group headers should be shown on the title pane of the window.protected PropertyChangeListenerProperty change listener.protected JRibbonThe associated ribbon.protected ChangeListenerChange listener.protected ComponentListenerprotected ContainerListenerprotected JPanelTaskbar panel.protected CommandToggleButtonGroupButton group for task toggle buttons.protected Map<RibbonTask,JRibbonTaskToggleButton> Map of toggle buttons of all tasks.Fields inherited from class org.pushingpixels.flamingo.internal.ui.ribbon.RibbonUI
applicationIcon -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BasicRibbonUI.BandHostPanelprotected LayoutManagerprotected LayoutManagerInvoked byinstallUIto create a layout manager object to manage theJRibbon.protected LayoutManagerInvoked byinstallUIto create a layout manager object to manage theJRibbontaskbar.protected BasicRibbonUI.TaskToggleButtonsHostPanelprotected LayoutManagerstatic ComponentUIprotected intReturns the layout gap for the bands in the associated ribbon.Returns the bounds of the specified contextual task group.protected List<RibbonTask>Returns the list of currently shown ribbon tasks.protected intReturns the layout gap for the tab buttons in the associated ribbon.intReturns the height of the taskbar area.intReturns the height of the task toggle button area.voidprotected voidInstalls subcomponents on the associated ribbon.protected voidInstalls defaults on the associated ribbon.protected voidInstalls listeners on the associated ribbon.voidbooleanbooleanprotected booleanvoidpaint(Graphics g, JComponent c) protected voidPaints the ribbon background.protected voidprotected voidpaintTaskArea(Graphics g, int x, int y, int width, int height) Paints the task border.protected voidscrollAndRevealTaskToggleButton(JRibbonTaskToggleButton taskToggleButton) voidsetApplicationIcon(ResizableIcon applicationIcon) Sets the application icon.protected voidprotected voidprotected voidUninstalls subcomponents from the associated ribbon.protected voidUninstalls defaults from the associated ribbon.protected voidUninstalls listeners from the associated ribbon.voidvoidupdate(Graphics g, JComponent c) Methods inherited from class org.pushingpixels.flamingo.internal.ui.ribbon.RibbonUI
getApplicationIconMethods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize
-
Field Details
-
IS_USING_TITLE_PANE
Client property marking the ribbon component to indicate whether the task bar and contextual task group headers should be shown on the title pane of the window. This is only relevant for theJRibbonFrame.- See Also:
-
HELP_PANEL_COMPONENTS
- See Also:
-
ribbon
The associated ribbon. -
taskBarPanel
Taskbar panel. -
bandScrollablePanel
-
taskToggleButtonsScrollablePanel
protected JScrollablePanel<BasicRibbonUI.TaskToggleButtonsHostPanel> taskToggleButtonsScrollablePanel -
applicationMenuButton
-
helpPanel
-
helpButton
-
taskToggleButtons
Map of toggle buttons of all tasks. -
taskToggleButtonGroup
Button group for task toggle buttons. -
ribbonChangeListener
Change listener. -
propertyChangeListener
Property change listener. -
ribbonContainerListener
-
ribbonComponentListener
-
-
Constructor Details
-
BasicRibbonUI
public BasicRibbonUI()Creates a new basic ribbon UI delegate.
-
-
Method Details
-
createUI
-
installUI
- Overrides:
installUIin classComponentUI
-
uninstallUI
- Overrides:
uninstallUIin classComponentUI
-
installListeners
protected void installListeners()Installs listeners on the associated ribbon. -
uninstallListeners
protected void uninstallListeners()Uninstalls listeners from the associated ribbon. -
installDefaults
protected void installDefaults()Installs defaults on the associated ribbon. -
uninstallDefaults
protected void uninstallDefaults()Uninstalls defaults from the associated ribbon. -
installComponents
protected void installComponents()Installs subcomponents on the associated ribbon. -
createTaskToggleButtonsHostPanelLayoutManager
-
createTaskToggleButtonsHostPanel
-
createBandHostPanel
-
createBandHostPanelLayoutManager
-
uninstallComponents
protected void uninstallComponents()Uninstalls subcomponents from the associated ribbon. -
update
- Overrides:
updatein classComponentUI
-
paint
- Overrides:
paintin classComponentUI
-
paintMinimizedRibbonSeparator
-
paintBackground
Paints the ribbon background.- Parameters:
g- Graphics context.
-
paintTaskArea
Paints the task border.- Parameters:
g- Graphics context.x- Left X of the tasks band bounds.y- Top Y of the tasks band bounds.width- Width of the tasks band bounds.height- Height of the tasks band bounds.
-
getContextualTaskGroupBounds
Description copied from class:RibbonUIReturns the bounds of the specified contextual task group.- Specified by:
getContextualTaskGroupBoundsin classRibbonUI- Parameters:
group- Contextual task group.- Returns:
- The bounds of the specified contextual task group.
-
getBandGap
protected int getBandGap()Returns the layout gap for the bands in the associated ribbon.- Returns:
- The layout gap for the bands in the associated ribbon.
-
getTabButtonGap
protected int getTabButtonGap()Returns the layout gap for the tab buttons in the associated ribbon.- Returns:
- The layout gap for the tab buttons in the associated ribbon.
-
createLayoutManager
Invoked byinstallUIto create a layout manager object to manage theJRibbon.- Returns:
- a layout manager object
-
createTaskbarLayoutManager
Invoked byinstallUIto create a layout manager object to manage theJRibbontaskbar.- Returns:
- a layout manager object
-
getTaskbarHeight
public int getTaskbarHeight()Returns the height of the taskbar area.- Returns:
- The height of the taskbar area.
-
getTaskToggleButtonHeight
public int getTaskToggleButtonHeight()Returns the height of the task toggle button area.- Returns:
- The height of the task toggle button area.
-
syncRibbonState
protected void syncRibbonState() -
getCurrentlyShownRibbonTasks
Returns the list of currently shown ribbon tasks. This method is for internal use only.- Returns:
- The list of currently shown ribbon tasks.
-
isUsingTitlePane
protected boolean isUsingTitlePane() -
syncApplicationMenuTips
protected void syncApplicationMenuTips() -
isShowingScrollsForTaskToggleButtons
public boolean isShowingScrollsForTaskToggleButtons()- Specified by:
isShowingScrollsForTaskToggleButtonsin classRibbonUI
-
isShowingScrollsForBands
public boolean isShowingScrollsForBands()- Specified by:
isShowingScrollsForBandsin classRibbonUI
-
getTaskToggleButtons
-
handleMouseWheelEvent
- Specified by:
handleMouseWheelEventin classRibbonUI
-
scrollAndRevealTaskToggleButton
-
setApplicationIcon
Description copied from class:RibbonUISets the application icon. This is displayed on the application menu button.There is no check performed to see if
applicationIconisnull.- Overrides:
setApplicationIconin classRibbonUI- Parameters:
applicationIcon- the application icon to set
-