Class MultiGroupPanel

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 MultiGroupPanel extends Layout
A widget 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

    • MultiGroupPanel

      public MultiGroupPanel()
    • MultiGroupPanel

      public MultiGroupPanel(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static MultiGroupPanel 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 Layout
    • 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 MultiGroupPanel setAddLevelButtonTitle(String addLevelButtonTitle) throws IllegalStateException
      The title-text to appear on the addLevelButton
      Parameters:
      addLevelButtonTitle - New addLevelButtonTitle value. Default value is "Add Level"
      Returns:
      MultiGroupPanel 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
      Returns:
      Current addLevelButtonTitle value. Default value is "Add Level"
    • 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 MultiGroupPanel setCopyLevelButtonTitle(String copyLevelButtonTitle) throws IllegalStateException
      The title-text to appear on the copyLevelButton
      Parameters:
      copyLevelButtonTitle - New copyLevelButtonTitle value. Default value is "Copy Level"
      Returns:
      MultiGroupPanel 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
      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 MultiGroupPanel setDeleteLevelButtonTitle(String deleteLevelButtonTitle) throws IllegalStateException
      The title-text to appear on the deleteLevelButton
      Parameters:
      deleteLevelButtonTitle - New deleteLevelButtonTitle value. Default value is "Delete Level"
      Returns:
      MultiGroupPanel 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
      Returns:
      Current deleteLevelButtonTitle value. Default value is "Delete Level"
    • setFirstGroupLevelTitle

      public MultiGroupPanel setFirstGroupLevelTitle(String firstGroupLevelTitle) throws IllegalStateException
      The title-text to appear in the first column for the first group-level.
      Parameters:
      firstGroupLevelTitle - New firstGroupLevelTitle value. Default value is "Group by"
      Returns:
      MultiGroupPanel instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getFirstGroupLevelTitle

      public String getFirstGroupLevelTitle()
      The title-text to appear in the first column for the first group-level.
      Returns:
      Current firstGroupLevelTitle value. Default value is "Group by"
    • setGroupingFieldTitle

      public MultiGroupPanel setGroupingFieldTitle(String groupingFieldTitle) throws IllegalStateException
      The title-text to appear in the header of the "grouping" field.
      Parameters:
      groupingFieldTitle - New groupingFieldTitle value. Default value is "Grouping"
      Returns:
      MultiGroupPanel 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 "grouping" field.
      Returns:
      Current groupingFieldTitle value. Default value is "Grouping"
    • setIconBaseStyle

      public MultiGroupPanel setIconBaseStyle(String iconBaseStyle) throws IllegalStateException
      A CSS style to apply to images in the Level Up and Level Down buttons. This is a base style supporting suffixes for states, specifically "Over", "Down" and "Disabled", which are applied when ImgButton settings like ImgButton.showRollOverIcon are applied to the icons.
      Parameters:
      iconBaseStyle - New iconBaseStyle value. Default value is "icon"
      Returns:
      MultiGroupPanel instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getIconBaseStyle

      public String getIconBaseStyle()
      A CSS style to apply to images in the Level Up and Level Down buttons. This is a base style supporting suffixes for states, specifically "Over", "Down" and "Disabled", which are applied when ImgButton settings like ImgButton.showRollOverIcon are applied to the icons.
      Returns:
      Current iconBaseStyle value. Default value is "icon"
      See Also:
    • setIconSize

      public MultiGroupPanel setIconSize(Integer iconSize) throws IllegalStateException
      The size for the images in the Level Up and Level Down buttons.
      Parameters:
      iconSize - New iconSize value. Default value is null
      Returns:
      MultiGroupPanel instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getIconSize

      public Integer getIconSize()
      The size for the images in the Level Up and Level Down buttons.
      Returns:
      Current iconSize value. Default value is null
    • setInvalidListPrompt

      public MultiGroupPanel 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

      Parameters:
      invalidListPrompt - New invalidListPrompt value. Default value is "Columns may only be used once: '${title}' is used multiple times."
      Returns:
      MultiGroupPanel 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

      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 MultiGroupPanel 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:
      MultiGroupPanel 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 MultiGroupPanel 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:
      MultiGroupPanel 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 MultiGroupPanel 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.
      Parameters:
      maxLevels - New maxLevels value. Default value is null
      Returns:
      MultiGroupPanel 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.
      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.
    • setOtherGroupLevelTitle

      public MultiGroupPanel setOtherGroupLevelTitle(String otherGroupLevelTitle) throws IllegalStateException
      The title-text to appear in the first column for all group-levels other than the first.
      Parameters:
      otherGroupLevelTitle - New otherGroupLevelTitle value. Default value is "Then by"
      Returns:
      MultiGroupPanel instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getOtherGroupLevelTitle

      public String getOtherGroupLevelTitle()
      The title-text to appear in the first column for all group-levels other than the first.
      Returns:
      Current otherGroupLevelTitle value. Default value is "Then by"
    • setPropertyFieldTitle

      public MultiGroupPanel setPropertyFieldTitle(String propertyFieldTitle) throws IllegalStateException
      The title-text to appear in the header of the "property" field.
      Parameters:
      propertyFieldTitle - New propertyFieldTitle value. Default value is "Column"
      Returns:
      MultiGroupPanel 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.
      Returns:
      Current propertyFieldTitle value. Default value is "Column"
    • getGroup

      public GroupSpecifier[] getGroup()
      Returns all configured grouping levels, as an array of GroupSpecifiers.
      Returns:
      the GroupSpecifiers for all configured grouping levels
    • 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
    • groupChanged

      public void groupChanged(GroupSpecifier... groupLevels)
      Fired whenever the group configuration changes. The single parameter is an array of GroupSpecifiers that represent the list of group-levels as they appear after whatever change has occurred.
      Parameters:
      groupLevels - The current group configuration, after any changes
    • 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(MultiGroupPanel multiGroupPanelProperties)
      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:
      multiGroupPanelProperties - 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 Layout