Class Snapbar

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

public class Snapbar extends Splitbar
Subclass of the Splitbar class that uses the grip functionality to show a stateful open / close indicator.
See Also:
  • Constructor Details

  • Method Details

    • getOrCreateRef

      public static Snapbar 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 Splitbar
    • setGripImgSuffix

      public Snapbar setGripImgSuffix(String gripImgSuffix) throws IllegalStateException
      Overridden from Splitbar.gripImgSuffix to simplify providing custom grip media for this widget.

      Note : This is an advanced setting

      Overrides:
      setGripImgSuffix in class Splitbar
      Parameters:
      gripImgSuffix - New gripImgSuffix value. Default value is "snap"
      Returns:
      Snapbar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getGripImgSuffix

      public String getGripImgSuffix()
      Overridden from Splitbar.gripImgSuffix to simplify providing custom grip media for this widget.
      Overrides:
      getGripImgSuffix in class Splitbar
      Returns:
      Current gripImgSuffix value. Default value is "snap"
    • setShowClosedGrip

      public Snapbar setShowClosedGrip(Boolean showClosedGrip) throws IllegalStateException
      If Splitbar.showGrip is true, this property determines whether the grip image displayed should show the "Closed" state when the Splitbar.target is hidden. Note that if Splitbar.invertClosedGripIfTargetAfter is true, we may show the "closed" state when the target is visible, rather than when it is hidden.

      Note : This is an advanced setting

      Overrides:
      setShowClosedGrip in class Splitbar
      Parameters:
      showClosedGrip - New showClosedGrip value. Default value is true
      Returns:
      Snapbar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowClosedGrip

      public Boolean getShowClosedGrip()
      If Splitbar.showGrip is true, this property determines whether the grip image displayed should show the "Closed" state when the Splitbar.target is hidden. Note that if Splitbar.invertClosedGripIfTargetAfter is true, we may show the "closed" state when the target is visible, rather than when it is hidden.
      Overrides:
      getShowClosedGrip in class Splitbar
      Returns:
      Current showClosedGrip value. Default value is true
    • setShowDown

      public Snapbar setShowDown(Boolean showDown)
      Snapbars show mouse-down styling.
      Overrides:
      setShowDown in class StatefulCanvas
      Parameters:
      showDown - New showDown value. Default value is true
      Returns:
      Snapbar instance, for chaining setter calls
      See Also:
    • getShowDown

      public Boolean getShowDown()
      Snapbars show mouse-down styling.
      Overrides:
      getShowDown in class StatefulCanvas
      Returns:
      Current showDown value. Default value is true
      See Also:
    • setShowDownGrip

      public Snapbar setShowDownGrip(Boolean showDownGrip)
      If StretchImg.showGrip is true, this property determines whether to show the 'Down' state on the grip image when the user mousedown's on this widget. Has no effect if StatefulCanvas.showDown is false.
      Overrides:
      setShowDownGrip in class Splitbar
      Parameters:
      showDownGrip - New showDownGrip value. Default value is true
      Returns:
      Snapbar instance, for chaining setter calls
    • getShowDownGrip

      public Boolean getShowDownGrip()
      If StretchImg.showGrip is true, this property determines whether to show the 'Down' state on the grip image when the user mousedown's on this widget. Has no effect if StatefulCanvas.showDown is false.
      Overrides:
      getShowDownGrip in class Splitbar
      Returns:
      Current showDownGrip value. Default value is true
    • setShowGrip

      public Snapbar setShowGrip(Boolean showGrip)
      Should we show a "grip" image floating above the center of this widget?
      Overrides:
      setShowGrip in class Splitbar
      Parameters:
      showGrip - New showGrip value. Default value is true
      Returns:
      Snapbar instance, for chaining setter calls
    • getShowGrip

      public Boolean getShowGrip()
      Should we show a "grip" image floating above the center of this widget?
      Overrides:
      getShowGrip in class Splitbar
      Returns:
      Current showGrip value. Default value is true
    • setShowRollOver

      public Snapbar setShowRollOver(Boolean showRollOver)
      Snapbars show rollover styling.
      Overrides:
      setShowRollOver in class StatefulCanvas
      Parameters:
      showRollOver - New showRollOver value. Default value is true
      Returns:
      Snapbar instance, for chaining setter calls
      See Also:
    • getShowRollOver

      public Boolean getShowRollOver()
      Snapbars show rollover styling.
      Overrides:
      getShowRollOver in class StatefulCanvas
      Returns:
      Current showRollOver value. Default value is true
      See Also:
    • setShowRollOverGrip

      public Snapbar setShowRollOverGrip(Boolean showRollOverGrip) throws IllegalStateException
      If StretchImg.showGrip is true, this property determines whether to show the 'Over' state on the grip image when the user rolls over on this widget. Has no effect if StatefulCanvas.showRollOver is false.

      Note : This is an advanced setting

      Overrides:
      setShowRollOverGrip in class Splitbar
      Parameters:
      showRollOverGrip - New showRollOverGrip value. Default value is true
      Returns:
      Snapbar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowRollOverGrip

      public Boolean getShowRollOverGrip()
      If StretchImg.showGrip is true, this property determines whether to show the 'Over' state on the grip image when the user rolls over on this widget. Has no effect if StatefulCanvas.showRollOver is false.
      Overrides:
      getShowRollOverGrip in class Splitbar
      Returns:
      Current showRollOverGrip value. Default value is true
    • setDefaultProperties

      public static void setDefaultProperties(Snapbar snapbarProperties)
      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:
      snapbarProperties - properties that should be used as new defaults when instances of this class are created
      See Also:
    • setLogicalStructure

      public LogicalStructureObject setLogicalStructure(SnapbarLogicalStructure 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 Splitbar