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 class
protected static class
protected class
Layout for the ribbon.protected class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JRibbonApplicationMenuButton
protected JScrollablePanel
<BasicRibbonUI.BandHostPanel> static final String
protected JCommandButton
protected JComponent
static final String
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.protected PropertyChangeListener
Property change listener.protected JRibbon
The associated ribbon.protected ChangeListener
Change listener.protected ComponentListener
protected ContainerListener
protected JPanel
Taskbar panel.protected CommandToggleButtonGroup
Button 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.BandHostPanel
protected LayoutManager
protected LayoutManager
Invoked byinstallUI
to create a layout manager object to manage theJRibbon
.protected LayoutManager
Invoked byinstallUI
to create a layout manager object to manage theJRibbon
taskbar.protected BasicRibbonUI.TaskToggleButtonsHostPanel
protected LayoutManager
static ComponentUI
protected int
Returns 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 int
Returns the layout gap for the tab buttons in the associated ribbon.int
Returns the height of the taskbar area.int
Returns the height of the task toggle button area.void
protected void
Installs subcomponents on the associated ribbon.protected void
Installs defaults on the associated ribbon.protected void
Installs listeners on the associated ribbon.void
boolean
boolean
protected boolean
void
paint
(Graphics g, JComponent c) protected void
Paints the ribbon background.protected void
protected void
paintTaskArea
(Graphics g, int x, int y, int width, int height) Paints the task border.protected void
scrollAndRevealTaskToggleButton
(JRibbonTaskToggleButton taskToggleButton) void
setApplicationIcon
(ResizableIcon applicationIcon) Sets the application icon.protected void
protected void
protected void
Uninstalls subcomponents from the associated ribbon.protected void
Uninstalls defaults from the associated ribbon.protected void
Uninstalls listeners from the associated ribbon.void
void
update
(Graphics g, JComponent c) Methods inherited from class org.pushingpixels.flamingo.internal.ui.ribbon.RibbonUI
getApplicationIcon
Methods 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:
installUI
in classComponentUI
-
uninstallUI
- Overrides:
uninstallUI
in 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:
update
in classComponentUI
-
paint
- Overrides:
paint
in 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:RibbonUI
Returns the bounds of the specified contextual task group.- Specified by:
getContextualTaskGroupBounds
in 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 byinstallUI
to create a layout manager object to manage theJRibbon
.- Returns:
- a layout manager object
-
createTaskbarLayoutManager
Invoked byinstallUI
to create a layout manager object to manage theJRibbon
taskbar.- 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:
isShowingScrollsForTaskToggleButtons
in classRibbonUI
-
isShowingScrollsForBands
public boolean isShowingScrollsForBands()- Specified by:
isShowingScrollsForBands
in classRibbonUI
-
getTaskToggleButtons
-
handleMouseWheelEvent
- Specified by:
handleMouseWheelEvent
in classRibbonUI
-
scrollAndRevealTaskToggleButton
-
setApplicationIcon
Description copied from class:RibbonUI
Sets the application icon. This is displayed on the application menu button.There is no check performed to see if
applicationIcon
isnull
.- Overrides:
setApplicationIcon
in classRibbonUI
- Parameters:
applicationIcon
- the application icon to set
-