Class RowRangeDisplay

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 RowRangeDisplay extends Canvas
Specialized Label for showing the currently visible row range and row count for a source listGrid.

A rowRangeDisplay may be requested directly from the source grid via ListGrid.getRowRangeDisplay().

See Also:
  • Constructor Details

    • RowRangeDisplay

      public RowRangeDisplay()
    • RowRangeDisplay

      public RowRangeDisplay(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static RowRangeDisplay 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 Canvas
    • setAlign

      public RowRangeDisplay setAlign(Alignment align)
      rowRangeDisplay will center its content by default.
      Overrides:
      setAlign in class Canvas
      Parameters:
      align - New align value. Default value is "center"
      Returns:
      RowRangeDisplay instance, for chaining setter calls
      See Also:
    • getAlign

      public Alignment getAlign()
      rowRangeDisplay will center its content by default.
      Returns:
      Current align value. Default value is "center"
      See Also:
    • setCanRequestRowCount

      public RowRangeDisplay setCanRequestRowCount(boolean canRequestRowCount)
      When an exact row count is currently unavailable on the source listGrid's data object, can the user issue a row count fetch by clicking?

      For a rowRangeDisplay created via ListGrid.getRowRangeDisplay() this value will be set to ListGrid.canRequestRowCount

      See also interactiveStyleName and requestRowCountPrompt.

      Parameters:
      canRequestRowCount - New canRequestRowCount value. Default value is false
      Returns:
      RowRangeDisplay instance, for chaining setter calls
      See Also:
    • getCanRequestRowCount

      public boolean getCanRequestRowCount()
      When an exact row count is currently unavailable on the source listGrid's data object, can the user issue a row count fetch by clicking?

      For a rowRangeDisplay created via ListGrid.getRowRangeDisplay() this value will be set to ListGrid.canRequestRowCount

      See also interactiveStyleName and requestRowCountPrompt.

      Returns:
      Current canRequestRowCount value. Default value is false
      See Also:
    • setInteractiveStyleName

      public RowRangeDisplay setInteractiveStyleName(String interactiveStyleName)
      If canRequestRowCount is true, this style name will be applied to the rowRangeDisplay as long as an accurate row count is not known, indicating to the user that they may click the label to retrieve an accurate status value.
      Parameters:
      interactiveStyleName - New interactiveStyleName value. Default value is null
      Returns:
      RowRangeDisplay instance, for chaining setter calls
      See Also:
    • getInteractiveStyleName

      public String getInteractiveStyleName()
      If canRequestRowCount is true, this style name will be applied to the rowRangeDisplay as long as an accurate row count is not known, indicating to the user that they may click the label to retrieve an accurate status value.
      Returns:
      Current interactiveStyleName value. Default value is null
      See Also:
    • setRequestRowCountPrompt

      public RowRangeDisplay setRequestRowCountPrompt(String requestRowCountPrompt)
      This prompt will be displayed in a hover when canRequestRowCount is true and an accurate row count is not currently known. This indicates to the user that they can click to issue a row count fetch request.

      If set to null, no hover prompt will be displayed by default

      Parameters:
      requestRowCountPrompt - New requestRowCountPrompt value. Default value is "Click to calculate row count"
      Returns:
      RowRangeDisplay instance, for chaining setter calls
    • getRequestRowCountPrompt

      public String getRequestRowCountPrompt()
      This prompt will be displayed in a hover when canRequestRowCount is true and an accurate row count is not currently known. This indicates to the user that they can click to issue a row count fetch request.

      If set to null, no hover prompt will be displayed by default

      Returns:
      Current requestRowCountPrompt value. Default value is "Click to calculate row count"
    • setSourceGrid

      public RowRangeDisplay setSourceGrid(ListGrid sourceGrid)
      The ListGrid for which this label displays the current row range and row count.

      If this method is called after the component has been drawn/initialized: Setter for the sourceGrid.
      Parameters:
      sourceGrid - ListGrid to display row information about. Default value is null
      Returns:
      RowRangeDisplay instance, for chaining setter calls
      See Also:
    • getSourceGrid

      public ListGrid getSourceGrid()
      The ListGrid for which this label displays the current row range and row count.
      Returns:
      Current sourceGrid value. Default value is null
      See Also:
    • setVlign

      public RowRangeDisplay setVlign(Alignment vlign)
      rowRangeDisplay will vertically center its content by default.
      Parameters:
      vlign - New vlign value. Default value is "center"
      Returns:
      RowRangeDisplay instance, for chaining setter calls
      See Also:
    • getVlign

      public Alignment getVlign()
      rowRangeDisplay will vertically center its content by default.
      Returns:
      Current vlign value. Default value is "center"
      See Also:
    • setWrap

      public RowRangeDisplay setWrap(boolean wrap)
      rowRangeDisplay will not allow its content to wrap by default
      Parameters:
      wrap - New wrap value. Default value is false
      Returns:
      RowRangeDisplay instance, for chaining setter calls
      See Also:
    • getWrap

      public boolean getWrap()
      rowRangeDisplay will not allow its content to wrap by default
      Returns:
      Current wrap value. Default value is false
      See Also:
    • setDefaultProperties

      public static void setDefaultProperties(RowRangeDisplay rowRangeDisplayProperties)
      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:
      rowRangeDisplayProperties - 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 Canvas