de.esprit.appsuite.database.dbgui.field

## Class DirectoryField

- java.lang.Object
- - java.awt.Component
  - - java.awt.Container
    - - javax.swing.JComponent
      - - javax.swing.JPanel
        - - de.esprit.common.gui.ZPanel
          - - de.esprit.common.gui.gridbag.GridBagPanel
            - - de.esprit.appsuite.database.dbgui.field.AbstractFieldContainer<java.io.File>
              - - de.esprit.appsuite.database.dbgui.field.DirectoryField

- All Implemented Interfaces:
    Field<java.io.File>, GridBagConstants, Clearable, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
  Direct Known Subclasses:
    FileField

      public class DirectoryField
      extends AbstractFieldContainer<java.io.File>

  This field is allows for entering a directory path name. The Directory can be searched for with a file system browser.
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class javax.swing.JPanel

      `javax.swing.JPanel.AccessibleJPanel`

    - ### Nested classes/interfaces inherited from class javax.swing.JComponent

      `javax.swing.JComponent.AccessibleJComponent`

    - ### Nested classes/interfaces inherited from class java.awt.Container

      `java.awt.Container.AccessibleAWTContainer`

    - ### Nested classes/interfaces inherited from class java.awt.Component

      `java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

  - ### Field Summary

    - ### Fields inherited from class javax.swing.JComponent

      `accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW`

    - ### Fields inherited from class java.awt.Component

      `BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

    - ### Fields inherited from interface de.esprit.common.gui.gridbag.GridBagConstants

      `BOTH, C, CENTER, E, EAST, HOR, HORIZONTAL, N, NE, NONE, NORTH, NORTHEAST, NORTHWEST, NW, REM, REMAINDER, S, SE, SOUTH, SOUTHEAST, SOUTHWEST, SW, VER, VERTICAL, W, WEST`

    - ### Fields inherited from interface java.awt.image.ImageObserver

      `ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DirectoryField(NlsDatabaseKey nls, int chars)`
    `DirectoryField(NlsDatabaseKey nls, int chars, boolean isNotNull)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addActionListener(java.awt.event.ActionListener l)`
    `protected AbstractFieldDialog` | `createEditor()`
    `java.io.File` | `createValue()` Creates the input Object typically from the textual String input.
    `void` | `fireActionPerformed()`
    `java.io.File` | `getDefaultDirectory()`
    `java.io.File` | `getDirectory()`
    `protected IconKey` | `getEditorIcon()`
    `FileNameInputField` | `getField()` Returns a reference to the contained field.
    `FileNameInputField` | `getTextField()`
    `java.io.File` | `getValue()` Returns the field value as an Object - or null if the field is empty.
    `FileNameInputField` | `getWidget()` Returns a JComponent that represents the layoutable GUI component.
    `boolean` | `isCheckExistence()`
    `boolean` | `isEditable()`
    `boolean` | `isStretchableX()` Tells whether this field should fill all the horizontal space in it's container.
    `boolean` | `isStretchableY()` Tells whether this field should fill all the vertical space in it's container.
    `void` | `removeActionListener(java.awt.event.ActionListener l)`
    `void` | `setCheckExistence(boolean check)` Enforces an existence check when the FieldPanel is applied
    `void` | `setDefaultDirectory(java.io.File defaultDir)`
    `void` | `setEditable(boolean isEditable)` Controls the editable state of the underlying CharField.
    `void` | `setLocked(boolean b)` Locks the field for editing.
    `void` | `setValue(java.io.File value)` Sets the field value to the given object.
    `java.lang.String` | `toString(java.lang.Object dir)` Converts the object to a String according to the policy of the affected field component.

    - ### Methods inherited from class de.esprit.appsuite.database.dbgui.field.AbstractFieldContainer

      `clear, getActionOpenEditor, getFieldDialog, getJLabel, getLabel, getName, getNlsKey, getStringValue, getUnitComponent, inputEquals, inputEquals, inputEquals, inputEquals, isEmpty, isLocked, isNotNull, isPrimaryKey, isRecordTypeField, setInsertDefaultValue, setModifyFlag, setNotNull, setPrimaryKey, setStretchableX, setStretchableY, setUnitComponent, setUnitString, toString, toValue`

    - ### Methods inherited from class de.esprit.common.gui.gridbag.GridBagPanel

      `alignFirstColumnsInSubPanels, getDefaultInsets, getFirstColumnMaxWidth, horizontalStretch, place, place, place, place, place, place, place, setDefaultInsets, setFirstColumnWidth, stretchX, stretchY, verticalStretch`

    - ### Methods inherited from class de.esprit.common.gui.ZPanel

      `addBorder, contains, getTileIcon, insertBorder, paintComponent, setTileIcon, setTileIcon, setTitledBorder`

    - ### Methods inherited from class javax.swing.JPanel

      `getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI`

    - ### Methods inherited from class javax.swing.JComponent

      `addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update`

    - ### Methods inherited from class java.awt.Container

      `add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree`

    - ### Methods inherited from class java.awt.Component

      `action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### DirectoryField

          public DirectoryField(NlsDatabaseKey nls,
                        int chars)

    - #### DirectoryField

          public DirectoryField(NlsDatabaseKey nls,
                        int chars,
                        boolean isNotNull)

  - ### Method Detail

    - #### getField

          public FileNameInputField getField()

      Description copied from class: `AbstractFieldContainer`
      Returns a reference to the contained field.
      Overrides:
        `getField` in class `AbstractFieldContainer<java.io.File>`

    - #### getWidget

          public FileNameInputField getWidget()

      Description copied from interface: `Field`
      Returns a JComponent that represents the layoutable GUI component.
      Specified by:
        `getWidget` in interface `Field<java.io.File>`
      Overrides:
        `getWidget` in class `AbstractFieldContainer<java.io.File>`

    - #### addActionListener

          public void addActionListener(java.awt.event.ActionListener l)

    - #### removeActionListener

          public void removeActionListener(java.awt.event.ActionListener l)

    - #### fireActionPerformed

          public void fireActionPerformed()

    - #### setEditable

          public void setEditable(boolean isEditable)

      Controls the editable state of the underlying CharField. Does NOT lock the browse button

    - #### isEditable

          public boolean isEditable()

    - #### getTextField

          public FileNameInputField getTextField()

    - #### getDirectory

          public java.io.File getDirectory()

    - #### setCheckExistence

          public void setCheckExistence(boolean check)

      Enforces an existence check when the FieldPanel is applied

    - #### isCheckExistence

          public boolean isCheckExistence()

    - #### setLocked

          public void setLocked(boolean b)

      Description copied from interface: `Field`
      Locks the field for editing.
      Specified by:
        `setLocked` in interface `Field<java.io.File>`
      Overrides:
        `setLocked` in class `AbstractFieldContainer<java.io.File>`

    - #### getEditorIcon

          protected IconKey getEditorIcon()

      Specified by:
        `getEditorIcon` in class `AbstractFieldContainer<java.io.File>`

    - #### createEditor

          protected AbstractFieldDialog createEditor()

      Specified by:
        `createEditor` in class `AbstractFieldContainer<java.io.File>`

    - #### getValue

          public java.io.File getValue()

      Description copied from interface: `Field`
      Returns the field value as an Object - or null if the field is empty.
      Specified by:
        `getValue` in interface `Field<java.io.File>`
      Overrides:
        `getValue` in class `AbstractFieldContainer<java.io.File>`

    - #### setValue

          public void setValue(java.io.File value)

      Description copied from interface: `Field`
      Sets the field value to the given object. The implementation may be very different in different classes.
      Specified by:
        `setValue` in interface `Field<java.io.File>`
      Overrides:
        `setValue` in class `AbstractFieldContainer<java.io.File>`

    - #### createValue

          public java.io.File createValue()
                                   throws InvalidFieldInputException

      Description copied from interface: `Field`
      Creates the input Object typically from the textual String input.
      Specified by:
        `createValue` in interface `Field<java.io.File>`
      Overrides:
        `createValue` in class `AbstractFieldContainer<java.io.File>`
      Throws:
        `InvalidFieldInputException` - If the input Object cannot be created due to a parsing error.

    - #### toString

          public java.lang.String toString(java.lang.Object dir)

      Description copied from interface: `Field`
      Converts the object to a String according to the policy of the affected field component. This is important for DecimalField and DateField which eventually use localized strings. Note that this method must return an empty string if the object cannot be parsed.
      Specified by:
        `toString` in interface `Field<java.io.File>`
      Overrides:
        `toString` in class `AbstractFieldContainer<java.io.File>`

    - #### setDefaultDirectory

          public void setDefaultDirectory(java.io.File defaultDir)

    - #### getDefaultDirectory

          public java.io.File getDefaultDirectory()

    - #### isStretchableX

          public boolean isStretchableX()

      Description copied from interface: `Field`
      Tells whether this field should fill all the horizontal space in it's container.
      Specified by:
        `isStretchableX` in interface `Field<java.io.File>`
      Overrides:
        `isStretchableX` in class `AbstractFieldContainer<java.io.File>`

    - #### isStretchableY

          public boolean isStretchableY()

      Description copied from interface: `Field`
      Tells whether this field should fill all the vertical space in it's container.
      Specified by:
        `isStretchableY` in interface `Field<java.io.File>`
      Overrides:
        `isStretchableY` in class `AbstractFieldContainer<java.io.File>`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.