Class MiniNavControl

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, HasIconClickHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasMovedHandlers, HasParentMovedHandlers, HasResizedHandlers, HasRightMouseDownHandlers, HasRuleContextChangedHandlers, HasScrolledHandlers, HasShowContextMenuHandlers, HasTitleHoverHandlers, HasVisibilityChangedHandlers, HasDownClickHandlers, HasUpClickHandlers

public class MiniNavControl extends StretchImgButton implements HasDownClickHandlers, HasUpClickHandlers
Compact control for up/down navigation that roughly looks like an up arrowhead next to a down arrowhead.
  • Constructor Details

    • MiniNavControl

      public MiniNavControl()
    • MiniNavControl

      public MiniNavControl(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static MiniNavControl 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 StretchImgButton
    • setDownButtonSrc

      public MiniNavControl setDownButtonSrc(String downButtonSrc) throws IllegalStateException
      Image used for the down arrowhead.
      Parameters:
      downButtonSrc - New downButtonSrc value. Default value is "[SKIN]/down.png"
      Returns:
      MiniNavControl instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getDownButtonSrc

      public String getDownButtonSrc()
      Image used for the down arrowhead.
      Returns:
      Current downButtonSrc value. Default value is "[SKIN]/down.png"
      See Also:
    • setSkinImgDir

      public MiniNavControl setSkinImgDir(String skinImgDir) throws IllegalStateException
      Description copied from class: Canvas
      Default directory for skin images (those defined by the class), relative to the Page-wide skinDir.

      Note : This is an advanced setting

      Overrides:
      setSkinImgDir in class Canvas
      Parameters:
      skinImgDir - New skinImgDir value. Default value is "images/NavigationBar"
      Returns:
      MiniNavControl instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getSkinImgDir

      public String getSkinImgDir()
      Description copied from class: Canvas
      Default directory for skin images (those defined by the class), relative to the Page-wide skinDir.
      Overrides:
      getSkinImgDir in class Canvas
      Returns:
      Current skinImgDir value. Default value is "images/NavigationBar"
      See Also:
    • setUpButtonSrc

      public MiniNavControl setUpButtonSrc(String upButtonSrc) throws IllegalStateException
      Image used for the up arrowhead.
      Parameters:
      upButtonSrc - New upButtonSrc value. Default value is "[SKIN]/up.png"
      Returns:
      MiniNavControl instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getUpButtonSrc

      public String getUpButtonSrc()
      Image used for the up arrowhead.
      Returns:
      Current upButtonSrc value. Default value is "[SKIN]/up.png"
      See Also:
    • addDownClickHandler

      public HandlerRegistration addDownClickHandler(DownClickHandler handler)
      Add a downClick handler.

      Notification method fired when the down button is clicked.

      Specified by:
      addDownClickHandler in interface HasDownClickHandlers
      Parameters:
      handler - the downClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • addUpClickHandler

      public HandlerRegistration addUpClickHandler(UpClickHandler handler)
      Add a upClick handler.

      Notification method fired when the up button is clicked.

      Specified by:
      addUpClickHandler in interface HasUpClickHandlers
      Parameters:
      handler - the upClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • setDefaultProperties

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

      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 StretchImgButton