Class JRibbonGallery

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
org.pushingpixels.radiance.component.internal.ui.ribbon.JRibbonGallery
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class JRibbonGallery extends JComponent
In-ribbon gallery. This class is for internal use only and should not be directly used by the applications.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • populateContent

      private void populateContent()
    • setUI

      public void setUI(RibbonGalleryUI ui)
      Sets the new UI delegate.
      Parameters:
      ui - New UI delegate.
    • updateUI

      public void updateUI()
      Resets the UI property to a value from the current look and feel.
      Overrides:
      updateUI in class JComponent
      See Also:
    • getUI

      public RibbonGalleryUI getUI()
      Returns the UI delegate for this component.
      Overrides:
      getUI in class JComponent
      Returns:
      a RibbonGalleryUI object
      See Also:
    • getUIClassID

      public String getUIClassID()
      Returns the name of the UI delegate for this component.
      Overrides:
      getUIClassID in class JComponent
      Returns:
      the string "RibbonGalleryUI"
      See Also:
    • addGalleryCommand

      private void addGalleryCommand(Command command)
      Adds new gallery command to this in-ribbon gallery.
      Parameters:
      command - Command to add.
    • getPreferredWidth

      public int getPreferredWidth(JRibbonBand.PresentationPriority state, int availableHeight)
      Returns the preferred width of this in-ribbon gallery for the specified presentation state.
      Parameters:
      state - Presentation state.
      availableHeight - Available height in pixels.
      Returns:
      The preferred width of this in-ribbon gallery for the specified presentation state.
    • setPresentationPriority

      public void setPresentationPriority(JRibbonBand.PresentationPriority presentationPriority)
      Sets new presentation priority for this in-ribbon gallery.
      Parameters:
      presentationPriority - New presentation priority for this in-ribbon gallery.
    • getPresentationPriority

      public JRibbonBand.PresentationPriority getPresentationPriority()
      Returns the current presentation priority for this in-ribbon gallery.
      Returns:
      The current presentation priority for this in-ribbon gallery.
    • getCommandCount

      public int getCommandCount()
      Returns the number of gallery commands in this in-ribbon gallery.
      Returns:
      The number of gallery commands in this in-ribbon gallery.
    • getButtonAt

      public JCommandButton getButtonAt(int index)
      Returns the gallery button at specified index.
      Parameters:
      index - Gallery button index.
      Returns:
      Gallery button at specified index.
    • getSelectedButton

      public JCommandButton getSelectedButton()
      Returns the currently selected gallery button.
      Returns:
      The currently selected gallery button.
    • getProjection

      public RibbonGalleryProjection getProjection()
    • setGroupMapping

      private void setGroupMapping(List<CommandGroup> commandGroups)
      Sets the command groups for this ribbon gallery.
      Parameters:
      commandGroups - Command groups.
    • validateCommandPresentationState

      private void validateCommandPresentationState(CommandButtonPresentationState commandPresentationState)
    • getExpandPopupMenuPanelProjection

      public static CommandPopupMenuPanelProjection getExpandPopupMenuPanelProjection(RibbonGalleryProjection galleryProjection)
    • getExpandPopupMenuContentModel

      public static CommandMenuContentModel getExpandPopupMenuContentModel(RibbonGalleryProjection galleryProjection)
    • getExpandPopupMenuPresentationModel

      public static CommandPopupMenuPresentationModel getExpandPopupMenuPresentationModel(RibbonGalleryProjection galleryProjection)