de.esprit.appsuite.database.dbgui.field

## Interface FieldEditor<T>

- All Superinterfaces:
    Closeable, Dumpable, ToolWindow
  All Known Implementing Classes:
    DefaultFieldEditor

      public interface FieldEditor<T>
      extends ToolWindow

  This interface defines a FieldEditor, which is supposed to be a dialog who provides special editing capabilities for a particular data type of an underlying field.
  I.e. you might develop a dialog that contains sliders for adjusting a color value which then is stored as the value of an underlying database field. FieldEditors are typically called by ButtonFields and thus will pop up over an underlying FieldPanel.
  Author:
    Rainer Buesch
  See Also:
    `FieldPanel`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Clears the content of the editor.
    `T` | `getValue()` Returns the current value or null if no content exists.
    `boolean` | `isEmpty()` Tells whether the editor has any content.
    `boolean` | `isInputValid()` Performs a check whether the editor's input is valid.
    `boolean` | `isLocked()` Tells whether the editor is currently locked.
    `boolean` | `isNotNull()` Tells whether the editor requires input.
    `void` | `popup(javax.swing.JComponent hook, T value)` Pops up the editor to become visible (it is usually a dialog or a frame).
    `void` | `setInsertDefaultValue()` Requests the editor to lookup for an insert default value and loads it.
    `void` | `setLocked(boolean b)` Locks the editor and makes editing impossible.
    `void` | `setNotNull(boolean b)` Sets the editor's input to mandatory.
    `void` | `setValue(T value)` Loads the data content which refers to a particular object.

    - ### Methods inherited from interface de.esprit.common.gui.ToolWindow

      `getLocation, getMinimumHeight, getMinimumWidth, getSize, getTitle, getToolkit, isPacked, pack, popup, setLocation, setLocationRelativeTo, setMinimumSize, setPreferredSize, shiftLocation`

    - ### Methods inherited from interface de.esprit.common.gui.comp.Closeable

      `close`

    - ### Methods inherited from interface de.esprit.common.type.Dumpable

      `toDumpString, toDumpString, toString, toString`

- - ### Method Detail

    - #### setValue

          void setValue(T value)

      Loads the data content which refers to a particular object.

    - #### getValue

          T getValue()

      Returns the current value or null if no content exists.

    - #### clear

          void clear()

      Clears the content of the editor.

    - #### isInputValid

          boolean isInputValid()

      Performs a check whether the editor's input is valid.

    - #### isLocked

          boolean isLocked()

      Tells whether the editor is currently locked.

    - #### isNotNull

          boolean isNotNull()

      Tells whether the editor requires input.

    - #### isEmpty

          boolean isEmpty()

      Tells whether the editor has any content.

    - #### setLocked

          void setLocked(boolean b)

      Locks the editor and makes editing impossible.

    - #### setNotNull

          void setNotNull(boolean b)

      Sets the editor's input to mandatory.

    - #### setInsertDefaultValue

          void setInsertDefaultValue()

      Requests the editor to lookup for an insert default value and loads it.

    - #### popup

          void popup(javax.swing.JComponent hook,
                   T value)

      Pops up the editor to become visible (it is usually a dialog or a frame). The editor should align to the underlying hook component and show up with the value that the underlying field should represent.

Copyright © 2014 EsprIT-Systems. All Rights Reserved.