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

public abstract class BasicRibbonUI extends RibbonUI
Basic UI for ribbon JRibbon.
  • Field Details

  • Constructor Details

    • BasicRibbonUI

      protected BasicRibbonUI()
      Creates a new basic ribbon UI delegate.
  • Method Details

    • installUI

      public void installUI(JComponent c)
      Overrides:
      installUI in class ComponentUI
    • uninstallUI

      public void uninstallUI(JComponent c)
      Overrides:
      uninstallUI in class ComponentUI
    • 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

      private JCommandButton createApplicationMenuButton()
    • getApplicationMenuButton

      public JCommandButton getApplicationMenuButton()
      Specified by:
      getApplicationMenuButton in class RibbonUI
    • createTaskToggleButtonsHostPanelLayoutManager

      private LayoutManager createTaskToggleButtonsHostPanelLayoutManager()
    • createTaskToggleButtonsHostPanel

      protected abstract BasicRibbonUI.TaskToggleButtonsHostPanel createTaskToggleButtonsHostPanel()
    • createBandHostPanelLayoutManager

      private LayoutManager createBandHostPanelLayoutManager()
    • uninstallComponents

      protected void uninstallComponents()
      Uninstalls subcomponents from the associated ribbon.
    • update

      public void update(Graphics g, JComponent c)
      Overrides:
      update in class ComponentUI
    • paint

      public void paint(Graphics g, JComponent c)
      Overrides:
      paint in class ComponentUI
    • paintMinimizedRibbonSeparator

      protected abstract void paintMinimizedRibbonSeparator(Graphics g)
    • paintBackground

      protected abstract void paintBackground(Graphics g)
      Paints the ribbon background.
      Parameters:
      g - Graphics context.
    • getContextualTaskGroupBounds

      public Rectangle getContextualTaskGroupBounds(RibbonContextualTaskGroup group)
      Description copied from class: RibbonUI
      Returns the bounds of the specified contextual task group.
      Specified by:
      getContextualTaskGroupBounds in class RibbonUI
      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

      protected LayoutManager createLayoutManager()
      Invoked by installUI to create a layout manager object to manage the JRibbon.
      Returns:
      a layout manager object
    • syncSelectedTask

      private void syncSelectedTask()
    • syncRibbonState

      private void syncRibbonState()
    • processTaskSelection

      private void processTaskSelection(RibbonTask task, JRibbonTaskToggleButton taskToggleButton)
    • getCurrentlyShownRibbonTasks

      private List<RibbonTask> 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 class RibbonUI
    • getTaskToggleButtons

      public Map<RibbonTask,JCommandButton> getTaskToggleButtons()
    • getAnchoredCommandButtons

      public List<JCommandButton> getAnchoredCommandButtons()
    • handleMouseWheelEvent

      public void handleMouseWheelEvent(MouseWheelEvent e)
      Specified by:
      handleMouseWheelEvent in class RibbonUI
    • scrollAndRevealTaskToggleButton

      private void scrollAndRevealTaskToggleButton(JCommandButton taskToggleButton)