Class PickListMenu

All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsWidget, LogicalStructure, DataBoundComponent, HasClearHandlers, HasClickHandlers, HasDoubleClickHandlers, HasDragCompleteHandlers, HasDragMoveHandlers, HasDragRepositionMoveHandlers, HasDragRepositionStartHandlers, HasDragRepositionStopHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasDropCompleteHandlers, HasDropHandlers, HasDropMoveHandlers, HasDropOutHandlers, HasDropOverHandlers, HasFetchDataHandlers, HasFocusChangedHandlers, HasFormulaUpdatedHandlers, HasHoverHandlers, HasHoverHiddenHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasMovedHandlers, HasParentMovedHandlers, HasResizedHandlers, HasRightMouseDownHandlers, HasRuleContextChangedHandlers, HasScrolledHandlers, HasShowContextMenuHandlers, HasVisibilityChangedHandlers, HasBodyKeyPressHandlers, HasCellClickHandlers, HasCellContextClickHandlers, HasCellDoubleClickHandlers, HasCellErrorIconHoverHandlers, HasCellErrorIconOutHandlers, HasCellErrorIconOverHandlers, HasCellHoverHandlers, HasCellMouseDownHandlers, HasCellMouseUpHandlers, HasCellOutHandlers, HasCellOverHandlers, HasCellSavedHandlers, HasCellSelectionChangedHandlers, HasCellValueHoverHandlers, HasCriteriaChangedHandlers, HasDataArrivedHandlers, HasDataChangedHandlers, HasDrawAreaChangedHandlers, HasEditCompleteHandlers, HasEditFailedHandlers, HasEditorEnterHandlers, HasEditorExitHandlers, HasFieldStateChangedHandlers, HasFilterEditorSubmitHandlers, HasGroupByCompleteHandlers, HasGroupByHandlers, HasGroupStateChangedHandlers, HasGroupTreeChangedHandlers, HasHeaderClickHandlers, HasHeaderDoubleClickHandlers, HasHeaderHoverHandlers, HasHilitesChangedHandlers, HasRecordClickHandlers, HasRecordCollapseHandlers, HasRecordDoubleClickHandlers, HasRecordDropHandlers, HasRecordExpandHandlers, HasRegroupHandlers, HasRemoveRecordClickHandlers, HasRowContextClickHandlers, HasRowEditorEnterHandlers, HasRowEditorExitHandlers, HasRowHoverHandlers, HasRowMouseDownHandlers, HasRowMouseUpHandlers, HasRowOutHandlers, HasRowOverHandlers, HasSelectionChangedHandlers, HasSelectionUpdatedHandlers, HasSetSortHandlers, HasSortChangedHandlers, HasSorterClickHandlers, HasSorterContextClickHandlers, HasViewStateChangedHandlers, HasMembersChangedHandlers

public class PickListMenu extends ListGrid
ListGrid subclass used, by default, by FormItems which implement PickList to display a flat list of selectable options.

Can be subclassed, customized and assigned to FormItems via the pickListConstructor attribute.

  • Constructor Details

    • PickListMenu

      public PickListMenu()
    • PickListMenu

      public PickListMenu(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static PickListMenu getOrCreateRef(JavaScriptObject jsObj)
    • getTestInstance

      protected PickListMenu getTestInstance()
      Overrides:
      getTestInstance in class ListGrid
    • 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 ListGrid
    • setBodyStyleName

      public PickListMenu setBodyStyleName(String bodyStyleName)
      CSS style used for the body of this grid. If applying a background-color to the body via a CSS style applied using this property, be sure to set ListGrid.bodyBackgroundColor to null.
      Overrides:
      setBodyStyleName in class ListGrid
      Parameters:
      bodyStyleName - New bodyStyleName value. Default value is "pickListMenuBody"
      Returns:
      PickListMenu instance, for chaining setter calls
      See Also:
    • getBodyStyleName

      public String getBodyStyleName()
      CSS style used for the body of this grid. If applying a background-color to the body via a CSS style applied using this property, be sure to set ListGrid.bodyBackgroundColor to null.
      Overrides:
      getBodyStyleName in class ListGrid
      Returns:
      Current bodyStyleName value. Default value is "pickListMenuBody"
      See Also:
    • setCanSaveSearches

      public PickListMenu setCanSaveSearches(boolean canSaveSearches) throws IllegalStateException
      Option to save searches is disabled for PickListMenus

      Note : This is an advanced setting

      Overrides:
      setCanSaveSearches in class ListGrid
      Parameters:
      canSaveSearches - New canSaveSearches value. Default value is false
      Returns:
      PickListMenu instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanSaveSearches

      public boolean getCanSaveSearches()
      Option to save searches is disabled for PickListMenus
      Overrides:
      getCanSaveSearches in class ListGrid
      Returns:
      Current canSaveSearches value. Default value is false
    • setCanShowFilterEditor

      public PickListMenu setCanShowFilterEditor(boolean canShowFilterEditor) throws IllegalStateException
      Option to show filter editor is disabled for pickListMenus by default

      Note : This is an advanced setting

      Overrides:
      setCanShowFilterEditor in class ListGrid
      Parameters:
      canShowFilterEditor - New canShowFilterEditor value. Default value is false
      Returns:
      PickListMenu instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCanShowFilterEditor

      public boolean getCanShowFilterEditor()
      Option to show filter editor is disabled for pickListMenus by default
      Overrides:
      getCanShowFilterEditor in class ListGrid
      Returns:
      Current canShowFilterEditor value. Default value is false
      See Also:
    • setDataProperties

      public PickListMenu setDataProperties(ResultSet dataProperties)
      For databound ListGrids, this attribute can be used to customize the ResultSet object created for this grid when data is fetched

      Note : This is an advanced setting

      Overrides:
      setDataProperties in class ListGrid
      Parameters:
      dataProperties - New dataProperties value. Default value is null
      Returns:
      PickListMenu instance, for chaining setter calls
      See Also:
    • getDataProperties

      public ResultSet getDataProperties()
      For databound ListGrids, this attribute can be used to customize the ResultSet object created for this grid when data is fetched
      Returns:
      Current dataProperties value. Default value is null
      See Also:
    • setEmptyMessage

      public PickListMenu setEmptyMessage(String emptyMessage)
      The string to display in the body of a listGrid with an empty data array, if showEmptyMessage is true.
      Overrides:
      setEmptyMessage in class ListGrid
      Parameters:
      emptyMessage - New emptyMessage value. Default value is "No Items To Show"
      Returns:
      PickListMenu instance, for chaining setter calls
      See Also:
    • getEmptyMessage

      public String getEmptyMessage()
      The string to display in the body of a listGrid with an empty data array, if showEmptyMessage is true.
      Overrides:
      getEmptyMessage in class ListGrid
      Returns:
      Current emptyMessage value. Default value is "No Items To Show"
      See Also:
    • setNormalCellHeight

      public PickListMenu setNormalCellHeight(int normalCellHeight)
      If ListGrid.baseStyle is unset, base style will be derived from ListGrid.normalBaseStyle if this grid has fixed row heights and the specified ListGrid.cellHeight matches this value. Otherwise ListGrid.tallBaseStyle will be used.

      Note : This is an advanced setting

      Overrides:
      setNormalCellHeight in class ListGrid
      Parameters:
      normalCellHeight - New normalCellHeight value. Default value is 16
      Returns:
      PickListMenu instance, for chaining setter calls
    • getNormalCellHeight

      public int getNormalCellHeight()
      If ListGrid.baseStyle is unset, base style will be derived from ListGrid.normalBaseStyle if this grid has fixed row heights and the specified ListGrid.cellHeight matches this value. Otherwise ListGrid.tallBaseStyle will be used.
      Overrides:
      getNormalCellHeight in class ListGrid
      Returns:
      Current normalCellHeight value. Default value is 16
    • setStyleName

      public void setStyleName(String styleName)
      Default CSS class for the ListGrid as a whole.
      Overrides:
      setStyleName in class ListGrid
      Parameters:
      styleName - New styleName value. Default value is "pickListMenu"
      See Also:
    • getStyleName

      public String getStyleName()
      Default CSS class for the ListGrid as a whole.
      Overrides:
      getStyleName in class ListGrid
      Returns:
      Current styleName value. Default value is "pickListMenu"
      See Also:
    • applySelection

      public void applySelection()
      When this PickListMenu is associated with a FormItem, this method applies the current selection from this PickList to the associated FormItem.
    • setDefaultProperties

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

      public LogicalStructureObject setLogicalStructure(PickListMenuLogicalStructure 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 ListGrid