Class ImgSplitbar

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
Direct Known Subclasses:
ToolStripResizer

public class ImgSplitbar extends Img
Resize bar for use in Layouts, based on the Img class. As with the Splitbar class, widgets of this class can be displayed as a resize-bar for widgets in Layouts where showResizeBar is set to true. Provides a different appearance from the Splitbar class.

To specify the resizeBar class for some layout, use the Layout.resizeBarClass property.

See Also:
  • Constructor Details

    • ImgSplitbar

      public ImgSplitbar()
    • ImgSplitbar

      public ImgSplitbar(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static ImgSplitbar 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 Img
    • setCanCollapse

      public ImgSplitbar setCanCollapse(Boolean canCollapse)
      If this property is true, a click on the Splitbar will collapse its target, hiding it and shifting the Splitbar and other members of the layout across to fill the newly available space. If the target is already hidden a click will expand it again (showing it at its normal size).

      Note that on touch devices, to enable collapsing/uncollapsing the target in response to a tap, canCollapseOnTap must be set to true.

      Parameters:
      canCollapse - New canCollapse value. Default value is true
      Returns:
      ImgSplitbar instance, for chaining setter calls
    • getCanCollapse

      public Boolean getCanCollapse()
      If this property is true, a click on the Splitbar will collapse its target, hiding it and shifting the Splitbar and other members of the layout across to fill the newly available space. If the target is already hidden a click will expand it again (showing it at its normal size).

      Note that on touch devices, to enable collapsing/uncollapsing the target in response to a tap, canCollapseOnTap must be set to true.

      Returns:
      Current canCollapse value. Default value is true
    • setCanDrag

      public ImgSplitbar setCanDrag(Boolean canDrag)
      canDrag set to true to allow dragging of the split bar. Dragging the Splitbar will resize it's target
      Overrides:
      setCanDrag in class Canvas
      Parameters:
      canDrag - New canDrag value. Default value is true
      Returns:
      ImgSplitbar instance, for chaining setter calls
      See Also:
    • getCanDrag

      public Boolean getCanDrag()
      canDrag set to true to allow dragging of the split bar. Dragging the Splitbar will resize it's target
      Overrides:
      getCanDrag in class Canvas
      Returns:
      Current canDrag value. Default value is true
      See Also:
    • setHSrc

      public ImgSplitbar setHSrc(String hSrc) throws IllegalStateException
      Default src to display when vertical is false, and src is unset.
      Parameters:
      hSrc - New hSrc value. Default value is [SKIN]hgrip.png
      Returns:
      ImgSplitbar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getHSrc

      public String getHSrc()
      Default src to display when vertical is false, and src is unset.
      Returns:
      Current hSrc value. Default value is [SKIN]hgrip.png
      See Also:
    • setSkinImgDir

      public ImgSplitbar setSkinImgDir(String skinImgDir) throws IllegalStateException
      Default directory for skin images (those defined by the class), relative to the Page-wide skinDir.
      Overrides:
      setSkinImgDir in class Canvas
      Parameters:
      skinImgDir - New skinImgDir value. Default value is "images/SplitBar/"
      Returns:
      ImgSplitbar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getSkinImgDir

      public String getSkinImgDir()
      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/SplitBar/"
      See Also:
    • setSrc

      public ImgSplitbar setSrc(String src) throws IllegalStateException
      The base filename or stateful image configuration for the image. Note that as the state of the component changes, the image displayed will be updated as described in StatefulImages.
      Overrides:
      setSrc in class Img
      Parameters:
      src - New src value. Default value is null
      Returns:
      ImgSplitbar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getSrc

      public String getSrc()
      The base filename or stateful image configuration for the image. Note that as the state of the component changes, the image displayed will be updated as described in StatefulImages.
      Overrides:
      getSrc in class Img
      Returns:
      Current src value. Default value is null
      See Also:
    • getVertical

      public Boolean getVertical() throws IllegalStateException
      Is this split bar vertically orientated?
      When a Splitbar is created by a layout to be the resizeBar for some member of the layout, the vertical property will be set to true if the layout is horizontal, meaning this resizeBar will be taller than it is wide, and will allow horizontal resizing of the member.

      Note : This method should be called only after the widget has been rendered.

      Returns:
      Current vertical value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setVSrc

      public ImgSplitbar setVSrc(String vSrc) throws IllegalStateException
      Default src to display when vertical is true, and src is unset.
      Parameters:
      vSrc - New vSrc value. Default value is [SKIN]vgrip.png
      Returns:
      ImgSplitbar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getVSrc

      public String getVSrc()
      Default src to display when vertical is true, and src is unset.
      Returns:
      Current vSrc value. Default value is [SKIN]vgrip.png
      See Also:
    • setDefaultProperties

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

      public LogicalStructureObject setLogicalStructure(ImgSplitbarLogicalStructure 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 Img