Class MultiGroupDialog

All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsWidget, LogicalStructure, HasClearHandlers, HasClickHandlers, HasCloseClickHandlers, HasDoubleClickHandlers, HasDragMoveHandlers, HasDragRepositionMoveHandlers, HasDragRepositionStartHandlers, HasDragRepositionStopHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasDropHandlers, HasDropMoveHandlers, HasDropOutHandlers, HasDropOverHandlers, HasFocusChangedHandlers, HasHoverHandlers, HasHoverHiddenHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMaximizeClickHandlers, HasMinimizeClickHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasMovedHandlers, HasParentMovedHandlers, HasResizedHandlers, HasRestoreClickHandlers, HasRightMouseDownHandlers, HasRuleContextChangedHandlers, HasScrolledHandlers, HasShowContextMenuHandlers, HasVisibilityChangedHandlers, HasMembersChangedHandlers

public class MultiGroupDialog extends Window
A dialog that allows the user to set up complex grouping arrangements by defining a group of GroupSpecifiers.

Each GroupSpecifier applies to a single property and grouping - so, for instance, in a grid with two columns, Nationhood and Country, you could group first by Nationhood with its selected groupingMode and then by Country with its selected groupingMode.

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

  • Constructor Details

    • MultiGroupDialog

      public MultiGroupDialog()
    • MultiGroupDialog

      public MultiGroupDialog(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static MultiGroupDialog 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 Window
    • getAddLevelButton

      public IButton getAddLevelButton() throws IllegalStateException
      Automatically generated IButton providing a mechanism for adding new levels to the group configuration.

      This component is an com.smartgwt.client.types.AutoChild and as such may be customized via multiGroupPanel.addLevelButtonProperties and multiGroupPanel.addLevelButtonDefaults.

      This component is an AutoChild named "addLevelButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

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

      public MultiGroupDialog setAddLevelButtonTitle(String addLevelButtonTitle) throws IllegalStateException
      The title-text to appear on the addLevelButton.

      Note, this is a passthrough property which, when set, is passed through to the MultiGroupPanel contained in this dialog. You only need to consider the properties on the MultiGroupPanel for i18n.

      Parameters:
      addLevelButtonTitle - New addLevelButtonTitle value. Default value is "Add Level"
      Returns:
      MultiGroupDialog instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAddLevelButtonTitle

      public String getAddLevelButtonTitle()
      The title-text to appear on the addLevelButton.

      Note, this is a passthrough property which, when set, is passed through to the MultiGroupPanel contained in this dialog. You only need to consider the properties on the MultiGroupPanel for i18n.

      Returns:
      Current addLevelButtonTitle value. Default value is "Add Level"
    • getApplyButton

      public IButton getApplyButton() throws IllegalStateException
      Automatically generated IButton providing the mechanism for accepting the current group configuration. Fires the passed callback with a single parameter, groupLevels, representing the current group configuration as an array of GroupSpecifiers.

      This component is an com.smartgwt.client.types.AutoChild and as such may be customized via multiGroupPanel.applyButtonProperties and multiGroupPanel.applyButtonDefaults.

      This component is an AutoChild named "applyButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

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

      public MultiGroupDialog setApplyButtonTitle(String applyButtonTitle) throws IllegalStateException
      The title-text to appear on the applyButton
      Parameters:
      applyButtonTitle - New applyButtonTitle value. Default value is "Apply"
      Returns:
      MultiGroupDialog instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getApplyButtonTitle

      public String getApplyButtonTitle()
      The title-text to appear on the applyButton
      Returns:
      Current applyButtonTitle value. Default value is "Apply"
    • getCancelButton

      public IButton getCancelButton() throws IllegalStateException
      Automatically generated IButton providing the mechanism for closing this Dialog without accepting the current group configuration. The passed callback is fired with a single null parameter, indicating that the operation was cancelled.

      This component is an com.smartgwt.client.types.AutoChild and as such may be customized via multiGroupPanel.cancelButtonProperties and multiGroupPanel.cancelButtonDefaults.

      This component is an AutoChild named "cancelButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

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

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

      public IButton getCopyLevelButton() throws IllegalStateException
      Automatically generated IButton providing a mechanism for duplicating levels in the group configuration.

      This component is an com.smartgwt.client.types.AutoChild and as such may be customized via multiGroupPanel.copyLevelButtonProperties and multiGroupPanel.copyLevelButtonDefaults.

      This component is an AutoChild named "copyLevelButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

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

      public MultiGroupDialog setCopyLevelButtonTitle(String copyLevelButtonTitle) throws IllegalStateException
      The title-text to appear on the copyLevelButton

      Note, this is a passthrough property which, when set, is passed through to the MultiGroupPanel contained in this dialog. You only need to consider the properties on the MultiGroupPanel for i18n.

      Parameters:
      copyLevelButtonTitle - New copyLevelButtonTitle value. Default value is "Copy Level"
      Returns:
      MultiGroupDialog instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCopyLevelButtonTitle

      public String getCopyLevelButtonTitle()
      The title-text to appear on the copyLevelButton

      Note, this is a passthrough property which, when set, is passed through to the MultiGroupPanel contained in this dialog. You only need to consider the properties on the MultiGroupPanel for i18n.

      Returns:
      Current copyLevelButtonTitle value. Default value is "Copy Level"
    • getDeleteLevelButton

      public IButton getDeleteLevelButton() throws IllegalStateException
      Automatically generated IButton providing a mechanism for deleting levels from the group configuration.

      This component is an com.smartgwt.client.types.AutoChild and as such may be customized via multiGroupPanel.deleteLevelButtonProperties and multiGroupPanel.deleteLevelButtonDefaults.

      This component is an AutoChild named "deleteLevelButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

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

      public MultiGroupDialog setDeleteLevelButtonTitle(String deleteLevelButtonTitle) throws IllegalStateException
      The title-text to appear on the deleteLevelButton

      Note, this is a passthrough property which, when set, is passed through to the MultiGroupPanel contained in this dialog. You only need to consider the properties on the MultiGroupPanel for i18n.

      Parameters:
      deleteLevelButtonTitle - New deleteLevelButtonTitle value. Default value is "Delete Level"
      Returns:
      MultiGroupDialog instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDeleteLevelButtonTitle

      public String getDeleteLevelButtonTitle()
      The title-text to appear on the deleteLevelButton

      Note, this is a passthrough property which, when set, is passed through to the MultiGroupPanel contained in this dialog. You only need to consider the properties on the MultiGroupPanel for i18n.

      Returns:
      Current deleteLevelButtonTitle value. Default value is "Delete Level"
    • setGroupingFieldTitle

      public MultiGroupDialog setGroupingFieldTitle(String groupingFieldTitle) throws IllegalStateException
      The title-text to appear in the header of the "property" field.

      Note, this is a passthrough property which, when set, is passed through to the MultiGroupPanel contained in this dialog. You only need to consider the properties on the MultiGroupPanel for i18n.

      Parameters:
      groupingFieldTitle - New groupingFieldTitle value. Default value is "Grouping"
      Returns:
      MultiGroupDialog instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getGroupingFieldTitle

      public String getGroupingFieldTitle()
      The title-text to appear in the header of the "property" field.

      Note, this is a passthrough property which, when set, is passed through to the MultiGroupPanel contained in this dialog. You only need to consider the properties on the MultiGroupPanel for i18n.

      Returns:
      Current groupingFieldTitle value. Default value is "Grouping"
    • setInvalidListPrompt

      public MultiGroupDialog setInvalidListPrompt(String invalidListPrompt) throws IllegalStateException
      This is a dynamic string - text within ${...} will be evaluated as JS code when the message is displayed.

      Default value returns

      Columns may only be used once: [some field's title] is used multiple times

      Note, this is a passthrough property which, when set, is passed through to the MultiGroupPanel contained in this dialog. You only need to consider the properties on the MultiGroupPanel for i18n.

      Parameters:
      invalidListPrompt - New invalidListPrompt value. Default value is "Columns may only be used once: '${title}' is used multiple times."
      Returns:
      MultiGroupDialog instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getInvalidListPrompt

      public String getInvalidListPrompt()
      This is a dynamic string - text within ${...} will be evaluated as JS code when the message is displayed.

      Default value returns

      Columns may only be used once: [some field's title] is used multiple times

      Note, this is a passthrough property which, when set, is passed through to the MultiGroupPanel contained in this dialog. You only need to consider the properties on the MultiGroupPanel for i18n.

      Returns:
      Current invalidListPrompt value. Default value is "Columns may only be used once: '${title}' is used multiple times."
      See Also:
    • getLevelDownButton

      public ImgButton getLevelDownButton() throws IllegalStateException
      Automatically generated ImgButton providing a mechanism for moving existing group-levels down in the group configuration.

      This component is an com.smartgwt.client.types.AutoChild and as such may be customized via multiGroupPanel.levelDownButtonProperties and multiGroupPanel.levelDownButtonDefaults.

      This component is an AutoChild named "levelDownButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

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

      public MultiGroupDialog setLevelDownButtonTitle(String levelDownButtonTitle) throws IllegalStateException
      The hover-prompt for the Level Down button.
      Parameters:
      levelDownButtonTitle - New levelDownButtonTitle value. Default value is "Move Level Down"
      Returns:
      MultiGroupDialog instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getLevelDownButtonTitle

      public String getLevelDownButtonTitle()
      The hover-prompt for the Level Down button.
      Returns:
      Current levelDownButtonTitle value. Default value is "Move Level Down"
    • getLevelUpButton

      public ImgButton getLevelUpButton() throws IllegalStateException
      Automatically generated ImgButton providing a mechanism for moving existing group-levels up in the group configuration.

      This component is an com.smartgwt.client.types.AutoChild and as such may be customized via multiGroupPanel.levelUpButtonProperties and multiGroupPanel.levelUpButtonDefaults.

      This component is an AutoChild named "levelUpButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

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

      public MultiGroupDialog setLevelUpButtonTitle(String levelUpButtonTitle) throws IllegalStateException
      The hover-prompt for the Level Up button.
      Parameters:
      levelUpButtonTitle - New levelUpButtonTitle value. Default value is "Move Level Up"
      Returns:
      MultiGroupDialog instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getLevelUpButtonTitle

      public String getLevelUpButtonTitle()
      The hover-prompt for the Level Up button.
      Returns:
      Current levelUpButtonTitle value. Default value is "Move Level Up"
    • setMaxLevels

      public MultiGroupDialog setMaxLevels(Integer maxLevels) throws IllegalStateException
      The maximum number of levels of grouping that can be applied. Since each group-property or field-name can be used only once in a given multi-group operation, if no maxLevels value or a value larger than the total number of available properties is specified, it will default to the total number of available properties.

      Note, this is a passthrough property which, when set, is passed through to the MultiGroupPanel contained in this dialog.

      Parameters:
      maxLevels - New maxLevels value. Default value is null
      Returns:
      MultiGroupDialog instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMaxLevels

      public Integer getMaxLevels()
      The maximum number of levels of grouping that can be applied. Since each group-property or field-name can be used only once in a given multi-group operation, if no maxLevels value or a value larger than the total number of available properties is specified, it will default to the total number of available properties.

      Note, this is a passthrough property which, when set, is passed through to the MultiGroupPanel contained in this dialog.

      Returns:
      Current maxLevels value. Default value is null
    • getOptionsGrid

      public ListGrid getOptionsGrid() throws IllegalStateException
      Automatically generated ListGrid allowing the user to configure a set of GroupSpecifiers.

      This component is an com.smartgwt.client.types.AutoChild and as such may be customized via multiGroupPanel.optionsGridProperties and multiGroupPanel.optionsGridDefaults.

      This component is an AutoChild named "optionsGrid". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

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

      public MultiGroupDialog setPropertyFieldTitle(String propertyFieldTitle) throws IllegalStateException
      The title-text to appear in the header of the "property" field.

      Note, this is a passthrough property which, when set, is passed through to the MultiGroupPanel contained in this dialog. You only need to consider the properties on the MultiGroupPanel for i18n.

      Parameters:
      propertyFieldTitle - New propertyFieldTitle value. Default value is "Column"
      Returns:
      MultiGroupDialog instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getPropertyFieldTitle

      public String getPropertyFieldTitle()
      The title-text to appear in the header of the "property" field.

      Note, this is a passthrough property which, when set, is passed through to the MultiGroupPanel contained in this dialog. You only need to consider the properties on the MultiGroupPanel for i18n.

      Returns:
      Current propertyFieldTitle value. Default value is "Column"
    • setTitle

      public void setTitle(String title) throws IllegalStateException
      The title-text to appear in this Dialog's Header-bar.
      Overrides:
      setTitle in class Window
      Parameters:
      title - New title value. Default value is "Group"
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getTitle

      public String getTitle()
      The title-text to appear in this Dialog's Header-bar.
      Overrides:
      getTitle in class Window
      Returns:
      Current title value. Default value is "Group"
      See Also:
    • getNumLevels

      public int getNumLevels()
      Return the number of levels of grouping that have been configured.
      Returns:
      The number of levels of grouping that have been configured
    • validate

      public boolean validate()
      Validate that no two GroupSpecifiers group on the same property.
      Returns:
      True if validation succeeds, false if any property is used twice
    • setDefaultProperties

      public static void setDefaultProperties(MultiGroupDialog multiGroupDialogProperties)
      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:
      multiGroupDialogProperties - 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 Window