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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate classLayout for the band host panel.private static classprivate classLayout for the ribbon.protected classprivate classLayout for the band host panel. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Containerprotected JCommandButtonprotected JScrollablePanel<JPanel> static final Stringprivate static final Stringprivate PropertyChangeListenerProperty change listener.protected JRibbonThe associated ribbon.private ChangeListenerChange listener.private ComponentListenerprivate Map<RibbonTask, PopupPanelManager.PopupListener> protected Map<RibbonTask, JRibbonTaskToggleButton> Map of toggle buttons of all tasks.private CommandToggleGroupModelGroup model for task toggle buttons. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate JCommandButtonprivate LayoutManagerprotected LayoutManagerInvoked byinstallUIto create a layout manager object to manage theJRibbon.protected abstract BasicRibbonUI.TaskToggleButtonsHostPanelprivate LayoutManagerprivate intReturns 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 intReturns the layout gap for the tab buttons in the associated ribbon.voidprotected voidInstalls subcomponents on the associated ribbon.protected voidInstalls defaults on the associated ribbon.protected voidInstalls listeners on the associated ribbon.voidbooleanvoidpaint(Graphics g, JComponent c) protected abstract voidPaints the ribbon background.protected abstract voidprivate voidprocessTaskSelection(RibbonTask task, JRibbonTaskToggleButton taskToggleButton) private voidscrollAndRevealTaskToggleButton(JCommandButton taskToggleButton) private voidprivate 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 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:
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. -
createApplicationMenuButton
-
getApplicationMenuButton
- Specified by:
getApplicationMenuButtonin classRibbonUI
-
createTaskToggleButtonsHostPanelLayoutManager
-
createTaskToggleButtonsHostPanel
-
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.
-
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
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 byinstallUIto 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:
isShowingScrollsForTaskToggleButtonsin classRibbonUI
-
getTaskToggleButtons
-
getAnchoredCommandButtons
-
handleMouseWheelEvent
- Specified by:
handleMouseWheelEventin classRibbonUI
-
scrollAndRevealTaskToggleButton
-