Class BasicRibbonUI
java.lang.Object
javax.swing.plaf.ComponentUI
org.pushingpixels.radiance.component.internal.ui.ribbon.RibbonUI
org.pushingpixels.radiance.component.internal.ui.ribbon.BasicRibbonUI
- Direct Known Subclasses:
RadianceRibbonUI
Basic UI for ribbon
JRibbon
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
private class
Layout for the band host panel.private static class
private class
Layout for the ribbon.protected class
private class
Layout for the band host panel. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Container
protected JCommandButton
protected JScrollablePanel
<JPanel> static final String
private static final String
private PropertyChangeListener
Property change listener.protected JRibbon
The associated ribbon.private ChangeListener
Change listener.private ComponentListener
private Map
<RibbonTask, PopupPanelManager.PopupListener> protected Map
<RibbonTask, JRibbonTaskToggleButton> Map of toggle buttons of all tasks.private CommandToggleGroupModel
Group model for task toggle buttons. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate JCommandButton
private LayoutManager
protected LayoutManager
Invoked byinstallUI
to create a layout manager object to manage theJRibbon
.protected abstract BasicRibbonUI.TaskToggleButtonsHostPanel
private LayoutManager
private int
Returns the layout gap for the bands in the associated ribbon.Returns the bounds of the specified contextual task group.private List
<RibbonTask> Returns the list of currently shown ribbon tasks.protected int
Returns the layout gap for the tab buttons in the associated ribbon.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
void
paint
(Graphics g, JComponent c) protected abstract void
Paints the ribbon background.protected abstract void
private void
processTaskSelection
(RibbonTask task, JRibbonTaskToggleButton taskToggleButton) private void
scrollAndRevealTaskToggleButton
(JCommandButton taskToggleButton) private void
private 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 javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize
-
Field Details
-
JUST_MINIMIZED
- See Also:
-
INTERNAL
- See Also:
-
ribbon
The associated ribbon. -
bandScrollablePanel
-
taskToggleButtonsScrollablePanel
protected JScrollablePanel<BasicRibbonUI.TaskToggleButtonsHostPanel> taskToggleButtonsScrollablePanel -
applicationMenuButton
-
anchoredButtons
-
taskToggleButtons
Map of toggle buttons of all tasks. -
taskPopupListeners
-
taskToggleGroupModel
Group model for task toggle buttons. -
ribbonChangeListener
Change listener. -
propertyChangeListener
Property change listener. -
ribbonComponentListener
-
-
Constructor Details
-
BasicRibbonUI
protected BasicRibbonUI()Creates a new basic ribbon UI delegate.
-
-
Method Details
-
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. -
createApplicationMenuButton
-
getApplicationMenuButton
- Specified by:
getApplicationMenuButton
in classRibbonUI
-
createTaskToggleButtonsHostPanelLayoutManager
-
createTaskToggleButtonsHostPanel
-
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.
-
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
private 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
-
syncSelectedTask
private void syncSelectedTask() -
syncRibbonState
private void syncRibbonState() -
processTaskSelection
-
getCurrentlyShownRibbonTasks
Returns the list of currently shown ribbon tasks. This method is for internal use only.- Returns:
- The list of currently shown ribbon tasks.
-
isShowingScrollsForTaskToggleButtons
public boolean isShowingScrollsForTaskToggleButtons()- Specified by:
isShowingScrollsForTaskToggleButtons
in classRibbonUI
-
getTaskToggleButtons
-
getAnchoredCommandButtons
-
handleMouseWheelEvent
- Specified by:
handleMouseWheelEvent
in classRibbonUI
-
scrollAndRevealTaskToggleButton
-