Class ListPalette

All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsWidget, LogicalStructure, Palette, 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 ListPalette extends ListGrid implements Palette
A ListGrid that implements the Palette behavior, so it can be used as the source for drag and drop instantiation of components when combined with an EditContext as the drop target.

Each ListGridRecord can be a PaletteNode.

See Also:
  • Constructor Details

    • ListPalette

      public ListPalette()
    • ListPalette

      public ListPalette(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static ListPalette 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 ListGrid
    • setCanSaveSearches

      public ListPalette setCanSaveSearches(boolean canSaveSearches) throws IllegalStateException
      Option to save searches is disabled for listPalettes

      Note : This is an advanced setting

      Overrides:
      setCanSaveSearches in class ListGrid
      Parameters:
      canSaveSearches - New canSaveSearches value. Default value is false
      Returns:
      ListPalette 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 listPalettes
      Overrides:
      getCanSaveSearches in class ListGrid
      Returns:
      Current canSaveSearches value. Default value is false
    • setCanShowFilterEditor

      public ListPalette setCanShowFilterEditor(boolean canShowFilterEditor) throws IllegalStateException
      Option to show filter editor is disabled for listPalettes

      Note : This is an advanced setting

      Overrides:
      setCanShowFilterEditor in class ListGrid
      Parameters:
      canShowFilterEditor - New canShowFilterEditor value. Default value is false
      Returns:
      ListPalette 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 listPalettes
      Overrides:
      getCanShowFilterEditor in class ListGrid
      Returns:
      Current canShowFilterEditor value. Default value is false
      See Also:
    • setDefaultEditContext

      public ListPalette setDefaultEditContext(EditContext defaultEditContext)
      Default EditContext that this palette should use. Palettes generally create components via drag and drop, but may also support creation via double-click or other UI idioms when a defaultEditContext is set.

      If this method is called after the component has been drawn/initialized: Sets the default EditContext that this palette should use. Palettes generally create components via drag and drop, but may also support creation via double-click or other UI idioms when a defaultEditContext is set.
      Specified by:
      setDefaultEditContext in interface Palette
      Parameters:
      defaultEditContext - the default EditContext used by this Palette. Default value is null
      Returns:
      ListPalette instance, for chaining setter calls
    • getDefaultEditContext

      public EditContext getDefaultEditContext()
      Default EditContext that this palette should use. Palettes generally create components via drag and drop, but may also support creation via double-click or other UI idioms when a defaultEditContext is set.
      Specified by:
      getDefaultEditContext in interface Palette
      Returns:
      Current defaultEditContext value. Default value is null
    • setDefaultEditContext

      public ListPalette setDefaultEditContext(EditTree defaultEditContext)
      Default EditContext that this palette should use. Palettes generally create components via drag and drop, but may also support creation via double-click or other UI idioms when a defaultEditContext is set.

      If this method is called after the component has been drawn/initialized: Sets the default EditContext that this palette should use. Palettes generally create components via drag and drop, but may also support creation via double-click or other UI idioms when a defaultEditContext is set.
      Specified by:
      setDefaultEditContext in interface Palette
      Parameters:
      defaultEditContext - the default EditContext used by this Palette. Default value is null
      Returns:
      ListPalette instance, for chaining setter calls
    • getDefaultEditContextAsEditTree

      public EditTree getDefaultEditContextAsEditTree()
      Default EditContext that this palette should use. Palettes generally create components via drag and drop, but may also support creation via double-click or other UI idioms when a defaultEditContext is set.
      Specified by:
      getDefaultEditContextAsEditTree in interface Palette
      Returns:
      Current defaultEditContext value. Default value is null
    • setDefaultEditContext

      public ListPalette setDefaultEditContext(EditPane defaultEditContext)
      Default EditContext that this palette should use. Palettes generally create components via drag and drop, but may also support creation via double-click or other UI idioms when a defaultEditContext is set.

      If this method is called after the component has been drawn/initialized: Sets the default EditContext that this palette should use. Palettes generally create components via drag and drop, but may also support creation via double-click or other UI idioms when a defaultEditContext is set.
      Specified by:
      setDefaultEditContext in interface Palette
      Parameters:
      defaultEditContext - the default EditContext used by this Palette. Default value is null
      Returns:
      ListPalette instance, for chaining setter calls
    • getDefaultEditContextAsEditPane

      public EditPane getDefaultEditContextAsEditPane()
      Default EditContext that this palette should use. Palettes generally create components via drag and drop, but may also support creation via double-click or other UI idioms when a defaultEditContext is set.
      Specified by:
      getDefaultEditContextAsEditPane in interface Palette
      Returns:
      Current defaultEditContext value. Default value is null
    • setGenerateNames

      public ListPalette setGenerateNames(boolean generateNames) throws IllegalStateException
      Whether created components should have their "ID" or "name" property automatically set to a unique value based on the component's type, eg, "ListGrid0".
      Specified by:
      setGenerateNames in interface Palette
      Parameters:
      generateNames - New generateNames value. Default value is true
      Returns:
      ListPalette instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getGenerateNames

      public boolean getGenerateNames()
      Whether created components should have their "ID" or "name" property automatically set to a unique value based on the component's type, eg, "ListGrid0".
      Specified by:
      getGenerateNames in interface Palette
      Returns:
      Current generateNames value. Default value is true
      See Also:
    • makeEditNode

      public EditNode makeEditNode(PaletteNode paletteNode)
      Given a PaletteNode, make an EditNode from it by creating a liveObject from the PaletteNode.defaults and copying presentation properties (eg title to the editNode.

      If editNodeProperties is specified as an object on on the paletteNode, each property in this object will also be copied across to the editNode.

      Specified by:
      makeEditNode in interface Palette
      Parameters:
      paletteNode - paletteNode to create from
      Returns:
      created EditNode
    • makeEditNode

      public EditNode makeEditNode(PaletteNode paletteNode, EditContext editContext)
      Given a PaletteNode, make an EditNode from it by creating a liveObject from the PaletteNode.defaults and copying presentation properties (eg title to the editNode.

      If editNodeProperties is specified as an object on on the paletteNode, each property in this object will also be copied across to the editNode.

      Specified by:
      makeEditNode in interface Palette
      Parameters:
      paletteNode - paletteNode to create from
      editContext - the EditContext where the node will be added. Only required in +{EditContext.screenMode,screenMode}.
      Returns:
      created EditNode
    • setDefaultProperties

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

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