Class NavigationButton

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

public class NavigationButton extends Button
Specially styled Button subclass used by the NavigationBar class.
  • Constructor Details

    • NavigationButton

      public NavigationButton()
    • NavigationButton

      public NavigationButton(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static NavigationButton 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 Button
    • setBackBaseStyle

      public NavigationButton setBackBaseStyle(String backBaseStyle)
      Base style for navigation buttons where Direction is set to "back"
      Parameters:
      backBaseStyle - New backBaseStyle value. Default value is "navBackButton"
      Returns:
      NavigationButton instance, for chaining setter calls
      See Also:
    • getBackBaseStyle

      public String getBackBaseStyle()
      Base style for navigation buttons where Direction is set to "back"
      Returns:
      Current backBaseStyle value. Default value is "navBackButton"
      See Also:
    • setBaseStyle

      public NavigationButton setBaseStyle(String baseStyle)
      Default baseStyle for navigation buttons. Note that the special backBaseStyle and forwardBaseStyle are applied if direction is set.
      Overrides:
      setBaseStyle in class Button
      Parameters:
      baseStyle - New baseStyle value. Default value is "navButton"
      Returns:
      NavigationButton instance, for chaining setter calls
      See Also:
    • getBaseStyle

      public String getBaseStyle()
      Default baseStyle for navigation buttons. Note that the special backBaseStyle and forwardBaseStyle are applied if direction is set.
      Overrides:
      getBaseStyle in class Button
      Returns:
      Current baseStyle value. Default value is "navButton"
      See Also:
    • setDirection

      public NavigationButton setDirection(NavigationDirection direction)
      Navigation direction for this button. If set to "forward" or "back" the special forwardBaseStyle or backBaseStyle will be applied.
      Parameters:
      direction - New direction value. Default value is "none"
      Returns:
      NavigationButton instance, for chaining setter calls
    • getDirection

      public NavigationDirection getDirection()
      Navigation direction for this button. If set to "forward" or "back" the special forwardBaseStyle or backBaseStyle will be applied.
      Returns:
      Current direction value. Default value is "none"
    • setForwardBaseStyle

      public NavigationButton setForwardBaseStyle(String forwardBaseStyle)
      Base style for navigation buttons where Direction is set to "forward"
      Parameters:
      forwardBaseStyle - New forwardBaseStyle value. Default value is "navForwardButton"
      Returns:
      NavigationButton instance, for chaining setter calls
      See Also:
    • getForwardBaseStyle

      public String getForwardBaseStyle()
      Base style for navigation buttons where Direction is set to "forward"
      Returns:
      Current forwardBaseStyle value. Default value is "navForwardButton"
      See Also:
    • setDefaultProperties

      public static void setDefaultProperties(NavigationButton navigationButtonProperties)
      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:
      navigationButtonProperties - 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 Button