Class AdvancedHiliteEditor

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 AdvancedHiliteEditor extends VLayout
A widget for editing a single, advanced hilite rule for use by dataBoundComponents. Where a simple hilite provides configuration of a single criterion and either foreground or background color for application to a single field, an advanced hilite can specify more complex criteria which can both test and affect multiple fields and allow both background and foreground colors to be specified in a single rule.

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

  • Constructor Details

    • AdvancedHiliteEditor

      public AdvancedHiliteEditor()
    • AdvancedHiliteEditor

      public AdvancedHiliteEditor(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static AdvancedHiliteEditor 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
    • setAppearanceGroupTitle

      public AdvancedHiliteEditor setAppearanceGroupTitle(String appearanceGroupTitle) throws IllegalStateException
      The title for the Appearance group.
      Parameters:
      appearanceGroupTitle - New appearanceGroupTitle value. Default value is "Appearance"
      Returns:
      AdvancedHiliteEditor instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAppearanceGroupTitle

      public String getAppearanceGroupTitle()
      The title for the Appearance group.
      Returns:
      Current appearanceGroupTitle value. Default value is "Appearance"
    • setCallback

      public AdvancedHiliteEditor setCallback(String callback) throws IllegalStateException
      The callback to fire when the saveButton is clicked.
      Parameters:
      callback - New callback value. Default value is null
      Returns:
      AdvancedHiliteEditor 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 the saveButton is clicked.
      Returns:
      Current callback value. Default value is null
      See Also:
    • setCancelButtonTitle

      public AdvancedHiliteEditor setCancelButtonTitle(String cancelButtonTitle) throws IllegalStateException
      The title text for the cancelButton.
      Parameters:
      cancelButtonTitle - New cancelButtonTitle value. Default value is "Cancel"
      Returns:
      AdvancedHiliteEditor 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 cancelButton.
      Returns:
      Current cancelButtonTitle value. Default value is "Cancel"
    • setFilterGroupTitle

      public AdvancedHiliteEditor setFilterGroupTitle(String filterGroupTitle) throws IllegalStateException
      The title for the Filter group.
      Parameters:
      filterGroupTitle - New filterGroupTitle value. Default value is "Filter"
      Returns:
      AdvancedHiliteEditor instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getFilterGroupTitle

      public String getFilterGroupTitle()
      The title for the Filter group.
      Returns:
      Current filterGroupTitle value. Default value is "Filter"
    • setHiliteIcons

      public AdvancedHiliteEditor 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, hilite rules 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:
      AdvancedHiliteEditor 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, hilite rules 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:
    • setInvalidHilitePrompt

      public AdvancedHiliteEditor setInvalidHilitePrompt(String invalidHilitePrompt) throws IllegalStateException
      The message to show when the user clicks "Save" without entering any criteria.
      Parameters:
      invalidHilitePrompt - New invalidHilitePrompt value. Default value is "Enter at least one rule, a color or icon, and a target field, or press 'Cancel' to abandon changes."
      Returns:
      AdvancedHiliteEditor instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getInvalidHilitePrompt

      public String getInvalidHilitePrompt()
      The message to show when the user clicks "Save" without entering any criteria.
      Returns:
      Current invalidHilitePrompt value. Default value is "Enter at least one rule, a color or icon, and a target field, or press 'Cancel' to abandon changes."
    • setSaveButtonTitle

      public AdvancedHiliteEditor setSaveButtonTitle(String saveButtonTitle) throws IllegalStateException
      The title text for the saveButton.
      Parameters:
      saveButtonTitle - New saveButtonTitle value. Default value is "Save"
      Returns:
      AdvancedHiliteEditor 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"
    • setTargetFieldsItemTitle

      public AdvancedHiliteEditor setTargetFieldsItemTitle(String targetFieldsItemTitle) throws IllegalStateException
      The title for the Target Field(s) picker.
      Parameters:
      targetFieldsItemTitle - New targetFieldsItemTitle value. Default value is "Target Field(s)"
      Returns:
      AdvancedHiliteEditor instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getTargetFieldsItemTitle

      public String getTargetFieldsItemTitle()
      The title for the Target Field(s) picker.
      Returns:
      Current targetFieldsItemTitle value. Default value is "Target Field(s)"
    • setTitle

      public void setTitle(String title) throws IllegalStateException
      The title text shown in the header bar of this editor's dialog.
      Overrides:
      setTitle in class Canvas
      Parameters:
      title - New title value. Default value is "Advanced Highlight Editor"
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getTitle

      public String getTitle()
      The title text shown in the header bar of this editor's dialog.
      Overrides:
      getTitle in class Canvas
      Returns:
      Current title value. Default value is "Advanced Highlight Editor"
    • cancelEditing

      public void cancelEditing()
      Discard changes and fire the callback with a null parameter.
    • saveHilite

      public void saveHilite()
      Save changes and fire the callback.
    • setDefaultProperties

      public static void setDefaultProperties(AdvancedHiliteEditor advancedHiliteEditorProperties)
      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:
      advancedHiliteEditorProperties - 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 VLayout