Class FieldPickerWindow

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 FieldPickerWindow extends Window
A dialog for picking fields to display from among the available fields.

This is typically useful in scenarios where there are many more fields than can reasonably fit on screen. The application can start off displaying a few of the fields by default (such as the most commonly-needed fields), and show a FieldPickerWindow to allow the user to customize which fields to display as well as the order in which to display them.

  • Constructor Details

    • FieldPickerWindow

      public FieldPickerWindow()
    • FieldPickerWindow

      public FieldPickerWindow(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static FieldPickerWindow 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
    • setAutoDismiss

      public FieldPickerWindow setAutoDismiss(Boolean autoDismiss) throws IllegalStateException
      By default, a FieldPickerWindow will close automatically if the mouse is clicked outside of it. To have the window shown with true modality, set this attribute to false.
      Parameters:
      autoDismiss - New autoDismiss value. Default value is true
      Returns:
      FieldPickerWindow instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAutoDismiss

      public Boolean getAutoDismiss()
      By default, a FieldPickerWindow will close automatically if the mouse is clicked outside of it. To have the window shown with true modality, set this attribute to false.
      Returns:
      Current autoDismiss value. Default value is true
    • getFieldPicker

      public FieldPicker getFieldPicker() throws IllegalStateException
      A FieldPicker for altering the working field-set in a Data-bound component.

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

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

      public void setTitle(String title) throws IllegalStateException
      Description copied from class: Window
      Title for this Window, shown if showTitle is true in the header (if drawn).

      If this method is called after the component has been drawn/initialized: Sets the title that appears in the window header. The header will be redrawn if necessary.
      Overrides:
      setTitle in class Window
      Parameters:
      title - New title value. Default value is "Field Picker"
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getTitle

      public String getTitle()
      Description copied from class: Window
      Title for this Window, shown if showTitle is true in the header (if drawn).
      Overrides:
      getTitle in class Window
      Returns:
      Current title value. Default value is "Field Picker"
      See Also:
    • setDefaultProperties

      public static void setDefaultProperties(FieldPickerWindow fieldPickerWindowProperties)
      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:
      fieldPickerWindowProperties - 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