Class HiliteRule

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, HasMembersChangedHandlers

public class HiliteRule extends HLayout
A widget for editing the criteria of a single DataBoundComponent hilite. The default implementation presents a series of formItems for selecting the various elements of a simple criterion and a foreground or background color. To specify more complex criteria, specify both foreground and background colors or to apply the hilite to multiple fields, you can create an advanced hilite rule.

Important Note: this class should not be used directly - it is exposed purely for i18n reasons.

  • Constructor Details

    • HiliteRule

      public HiliteRule()
    • HiliteRule

      public HiliteRule(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static HiliteRule 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 HLayout
    • setBackgroundColorTitle

      public HiliteRule setBackgroundColorTitle(String backgroundColorTitle) throws IllegalStateException
      The title of the 'Background' color picker.
      Parameters:
      backgroundColorTitle - New backgroundColorTitle value. Default value is "Background"
      Returns:
      HiliteRule instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getBackgroundColorTitle

      public String getBackgroundColorTitle()
      The title of the 'Background' color picker.
      Returns:
      Current backgroundColorTitle value. Default value is "Background"
    • setColorFieldTitle

      public HiliteRule setColorFieldTitle(String colorFieldTitle) throws IllegalStateException
      The title for the Color picker field.
      Parameters:
      colorFieldTitle - New colorFieldTitle value. Default value is "Color"
      Returns:
      HiliteRule instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getColorFieldTitle

      public String getColorFieldTitle()
      The title for the Color picker field.
      Returns:
      Current colorFieldTitle value. Default value is "Color"
    • setForegroundColorTitle

      public HiliteRule setForegroundColorTitle(String foregroundColorTitle) throws IllegalStateException
      The title of the 'Text' color picker.
      Parameters:
      foregroundColorTitle - New foregroundColorTitle value. Default value is "Text"
      Returns:
      HiliteRule instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getForegroundColorTitle

      public String getForegroundColorTitle()
      The title of the 'Text' color picker.
      Returns:
      Current foregroundColorTitle value. Default value is "Text"
    • setIconFieldTitle

      public HiliteRule setIconFieldTitle(String iconFieldTitle) throws IllegalStateException
      The title of the 'Icon' picker.
      Parameters:
      iconFieldTitle - New iconFieldTitle value. Default value is "Icon"
      Returns:
      HiliteRule instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getIconFieldTitle

      public String getIconFieldTitle()
      The title of the 'Icon' picker.
      Returns:
      Current iconFieldTitle value. Default value is "Icon"
    • setRemoveButtonPrompt

      public HiliteRule setRemoveButtonPrompt(String removeButtonPrompt) throws IllegalStateException
      The hover prompt text for the remove button.
      Parameters:
      removeButtonPrompt - New removeButtonPrompt value. Default value is "Remove"
      Returns:
      HiliteRule instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getRemoveButtonPrompt

      public String getRemoveButtonPrompt()
      The hover prompt text for the remove button.
      Returns:
      Current removeButtonPrompt value. Default value is "Remove"
    • setRemoveIconBaseStyle

      public HiliteRule setRemoveIconBaseStyle(String removeIconBaseStyle) throws IllegalStateException
      CSS class to apply to the remove button shown for this HiliteRule.
      Parameters:
      removeIconBaseStyle - New removeIconBaseStyle value. Default value is null
      Returns:
      HiliteRule instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getRemoveIconBaseStyle

      public String getRemoveIconBaseStyle()
      CSS class to apply to the remove button shown for this HiliteRule.
      Returns:
      Current removeIconBaseStyle value. Default value is null
      See Also:
    • setRemoveIconSize

      public HiliteRule setRemoveIconSize(Integer removeIconSize) throws IllegalStateException
      When set, dictates the size of the remove button shown for this HiliteRule.
      Parameters:
      removeIconSize - New removeIconSize value. Default value is null
      Returns:
      HiliteRule instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getRemoveIconSize

      public Integer getRemoveIconSize()
      When set, dictates the size of the remove button shown for this HiliteRule.
      Returns:
      Current removeIconSize value. Default value is null
    • setShowRemoveButton

      public HiliteRule setShowRemoveButton(boolean showRemoveButton) throws IllegalStateException
      If true, show a button for this HiliteRule, allowing it to be removed.
      Parameters:
      showRemoveButton - New showRemoveButton value. Default value is true
      Returns:
      HiliteRule instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowRemoveButton

      public boolean getShowRemoveButton()
      If true, show a button for this HiliteRule, allowing it to be removed.
      Returns:
      Current showRemoveButton value. Default value is true
    • getHilite

      public Hilite getHilite()
      Return the hilite definition being edited, including criteria and hilite properties.
      Returns:
      the hilite
    • remove

      public void remove()
      Remove this HiliteRule. Default implementation calls markForDestroy().
    • setDefaultProperties

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

      public LogicalStructureObject setLogicalStructure(HiliteRuleLogicalStructure 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 HLayout