Class HiliteEditor

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 HiliteEditor extends VLayout
A widget for defining and editing a set of hilite rules for use by dataBoundComponents. Presents a list of available fields and allows editing of simple hilites directly and more complex hilites via AdvancedHiliteEditors.

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

  • Constructor Details

    • HiliteEditor

      public HiliteEditor()
    • HiliteEditor

      public HiliteEditor(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static HiliteEditor 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 VLayout
    • setAddAdvancedRuleButtonTitle

      public HiliteEditor setAddAdvancedRuleButtonTitle(String addAdvancedRuleButtonTitle) throws IllegalStateException
      The title text for the add advanced rule button.
      Parameters:
      addAdvancedRuleButtonTitle - New addAdvancedRuleButtonTitle value. Default value is "Add Advanced Rule"
      Returns:
      HiliteEditor instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAddAdvancedRuleButtonTitle

      public String getAddAdvancedRuleButtonTitle()
      The title text for the add advanced rule button.
      Returns:
      Current addAdvancedRuleButtonTitle value. Default value is "Add Advanced Rule"
    • setAvailableFieldsColumnTitle

      public HiliteEditor setAvailableFieldsColumnTitle(String availableFieldsColumnTitle) throws IllegalStateException
      The title for the 'Available Fields' column in the fieldList.
      Parameters:
      availableFieldsColumnTitle - New availableFieldsColumnTitle value. Default value is "Available Fields"
      Returns:
      HiliteEditor instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAvailableFieldsColumnTitle

      public String getAvailableFieldsColumnTitle()
      The title for the 'Available Fields' column in the fieldList.
      Returns:
      Current availableFieldsColumnTitle value. Default value is "Available Fields"
    • setCallback

      public HiliteEditor setCallback(String callback) throws IllegalStateException
      The callback to fire when saveHilites() is called.
      Parameters:
      callback - New callback value. Default value is null
      Returns:
      HiliteEditor instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCallback

      public String getCallback()
      The callback to fire when saveHilites() is called.
      Returns:
      Current callback value. Default value is null
      See Also:
    • setCancelButtonTitle

      public HiliteEditor setCancelButtonTitle(String cancelButtonTitle) throws IllegalStateException
      The title text for the cancel button.
      Parameters:
      cancelButtonTitle - New cancelButtonTitle value. Default value is "Cancel"
      Returns:
      HiliteEditor instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCancelButtonTitle

      public String getCancelButtonTitle()
      The title text for the cancel button.
      Returns:
      Current cancelButtonTitle value. Default value is "Cancel"
    • setHiliteIcons

      public HiliteEditor setHiliteIcons(String... hiliteIcons)
      Specifies a list of icons that can be used in hilites.

      hiliteIcons should be specified as an Array of SCImgURL. When present, HiliteRules will offer the user a drop down for picking one of these icons.

      If the user picks an icon, the created hiliting rule will have Hilite.icon set to the chosen icon. ListGridField.hiliteIconPosition controls where the icon will appear for that field -- the default is that it appears in front of the normal cell content.

      Parameters:
      hiliteIcons - New hiliteIcons value. Default value is null
      Returns:
      HiliteEditor instance, for chaining setter calls
      See Also:
    • getHiliteIcons

      public String[] getHiliteIcons()
      Specifies a list of icons that can be used in hilites.

      hiliteIcons should be specified as an Array of SCImgURL. When present, HiliteRules will offer the user a drop down for picking one of these icons.

      If the user picks an icon, the created hiliting rule will have Hilite.icon set to the chosen icon. ListGridField.hiliteIconPosition controls where the icon will appear for that field -- the default is that it appears in front of the normal cell content.

      Returns:
      Current hiliteIcons value. Default value is null
      See Also:
    • setSaveButtonTitle

      public HiliteEditor setSaveButtonTitle(String saveButtonTitle) throws IllegalStateException
      The title text for the saveButton.
      Parameters:
      saveButtonTitle - New saveButtonTitle value. Default value is "Save"
      Returns:
      HiliteEditor instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getSaveButtonTitle

      public String getSaveButtonTitle()
      The title text for the saveButton.
      Returns:
      Current saveButtonTitle value. Default value is "Save"
    • clearHilites

      public void clearHilites()
      Clear all Hilites from the editor.
    • removeRule

      public void removeRule(HiliteRule hiliteRule)
      Removes the passed HiliteRule from this editor.
      Parameters:
      hiliteRule - the hiliteRule to remove
    • saveHilites

      public void saveHilites(String callback)
      Save the set of Hilites and fire the callback.
      Parameters:
      callback - the function to call when saving is complete. See Callback
      See Also:
    • setHilites

      public void setHilites(Hilite... hilites)
      Initialize this editor with a set of Hilites.
      Parameters:
      hilites - the array of hilite objects to apply
    • setDefaultProperties

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

      public LogicalStructureObject setLogicalStructure(HiliteEditorLogicalStructure 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 VLayout