Class RibbonBar

All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsWidget, LogicalStructure, HasClearHandlers, HasClickHandlers, HasDoubleClickHandlers, HasDragMoveHandlers, HasDragRepositionMoveHandlers, HasDragRepositionStartHandlers, HasDragRepositionStopHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasDropHandlers, HasDropMoveHandlers, HasDropOutHandlers, HasDropOverHandlers, HasFocusChangedHandlers, HasHoverHandlers, HasHoverHiddenHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasMovedHandlers, HasParentMovedHandlers, HasResizedHandlers, HasRightMouseDownHandlers, HasRuleContextChangedHandlers, HasScrolledHandlers, HasShowContextMenuHandlers, HasVisibilityChangedHandlers, HasMembersChangedHandlers

public class RibbonBar extends ToolStrip
A ToolStrip-based class for showing groups of RibbonButtonss.
  • Constructor Details

    • RibbonBar

      public RibbonBar()
    • RibbonBar

      public RibbonBar(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static RibbonBar getOrCreateRef(JavaScriptObject jsObj)
    • changeAutoChildDefaults

      public static void changeAutoChildDefaults(String autoChildName, Canvas defaults)
      Changes the defaults for Canvas AutoChildren named autoChildName.
      Parameters:
      autoChildName - name of an AutoChild to customize the defaults for.
      defaults - Canvas defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, see SGWTProperties.
      See Also:
    • changeAutoChildDefaults

      public static void changeAutoChildDefaults(String autoChildName, FormItem defaults)
      Changes the defaults for FormItem AutoChildren named autoChildName.
      Parameters:
      autoChildName - name of an AutoChild to customize the defaults for.
      defaults - FormItem defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, see SGWTProperties.
      See Also:
    • create

      protected JavaScriptObject create()
      Overrides:
      create in class ToolStrip
    • setGroupTitleAlign

      public RibbonBar setGroupTitleAlign(Alignment groupTitleAlign) throws IllegalStateException
      If set, this attribute affects the alignment of the titles in RibbonGroups in this RibbonBar. You can override this at the individual RibbonGroup level.
      Parameters:
      groupTitleAlign - New groupTitleAlign value. Default value is "center"
      Returns:
      RibbonBar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getGroupTitleAlign

      public Alignment getGroupTitleAlign()
      If set, this attribute affects the alignment of the titles in RibbonGroups in this RibbonBar. You can override this at the individual RibbonGroup level.
      Returns:
      Current groupTitleAlign value. Default value is "center"
    • setGroupTitleOrientation

      public RibbonBar setGroupTitleOrientation(VerticalAlignment groupTitleOrientation) throws IllegalStateException
      If set, this attribute affects the orientation of the titles in RibbonGroups in this RibbonBar. You can override this at the individual RibbonGroup level.
      Parameters:
      groupTitleOrientation - New groupTitleOrientation value. Default value is "top"
      Returns:
      RibbonBar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getGroupTitleOrientation

      public VerticalAlignment getGroupTitleOrientation()
      If set, this attribute affects the orientation of the titles in RibbonGroups in this RibbonBar. You can override this at the individual RibbonGroup level.
      Returns:
      Current groupTitleOrientation value. Default value is "top"
    • setShowGroupTitle

      public RibbonBar setShowGroupTitle(Boolean showGroupTitle) throws IllegalStateException
      If set, this attribute affects whether RibbonGroups in this RibbonBar show their header control. You can override this at the individual RibbonGroup level.
      Parameters:
      showGroupTitle - New showGroupTitle value. Default value is true
      Returns:
      RibbonBar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowGroupTitle

      public Boolean getShowGroupTitle()
      If set, this attribute affects whether RibbonGroups in this RibbonBar show their header control. You can override this at the individual RibbonGroup level.
      Returns:
      Current showGroupTitle value. Default value is true
    • addGroup

      public void addGroup(RibbonGroup group)
      Add a new group to this RibbonBar. You can either create your group externally and pass it in, or you can pass a properties block from which to automatically construct it.
      Parameters:
      group - the new group to add to this ribbon
    • addGroup

      public void addGroup(RibbonGroup group, Integer position)
      Add a new group to this RibbonBar. You can either create your group externally and pass it in, or you can pass a properties block from which to automatically construct it.
      Parameters:
      group - the new group to add to this ribbon
      position - the index at which to insert the new group
    • setDefaultProperties

      public static void setDefaultProperties(RibbonBar ribbonBarProperties)
      Class level method to set the default properties of this class. If set, then all existing and subsequently created instances of this class will automatically have default properties corresponding to the properties set on the SmartGWT class instance passed to this function before its underlying SmartClient JS object was created. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.

      Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.

      Parameters:
      ribbonBarProperties - properties that should be used as new defaults when instances of this class are created
      See Also:
    • setLogicalStructure

      public LogicalStructureObject setLogicalStructure(RibbonBarLogicalStructure s)
      Setter implementing the LogicalStructure interface, which supports Eclipse's logical structure debugging facility.
    • getLogicalStructure

      public LogicalStructureObject getLogicalStructure()
      Getter implementing the LogicalStructure interface, which supports Eclipse's logical structure debugging facility.
      Specified by:
      getLogicalStructure in interface LogicalStructure
      Overrides:
      getLogicalStructure in class ToolStrip