de.esprit.appsuite.database.dbgui.field

## Class ClassBrowseField

- java.lang.Object
- - java.awt.Component
  - - java.awt.Container
    - - javax.swing.JComponent
      - - javax.swing.JComboBox
        - - de.esprit.common.gui.ZComboBox
          - - de.esprit.appsuite.database.dbgui.field.AbstractChoiceField<java.lang.String>
            - - de.esprit.appsuite.database.dbgui.field.ClassBrowseField

- All Implemented Interfaces:
    Field<java.lang.String>, EnvStorable, Clearable, java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.ItemSelectable, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ListDataListener

      public class ClassBrowseField
      extends AbstractChoiceField<java.lang.String>
      implements EnvStorable

  This field browses through the class hierarchy showing up with sub-packages as well as class files
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Nested Class Summary

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

      `javax.swing.JComboBox.AccessibleJComboBox, javax.swing.JComboBox.KeySelectionManager`

    - ### 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.JComboBox

      `actionCommand, dataModel, editor, isEditable, keySelectionManager, lightWeightPopupEnabled, maximumRowCount, renderer, selectedItemReminder`

    - ### 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 java.awt.image.ImageObserver

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClassBrowseField(ApplicationContext ctx, NlsDatabaseKey nameKey, boolean isNotNull)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addEnvProperties(EnvMap props)` This method is called on the implementing class in order to give it a chance to fill the passed Properties object with key-value pairs that should be saved in the environment properties file.
    `protected void` | `applyInsertDefaultValue(java.lang.Object value)`
    `protected java.lang.String` | `createEnvKey()`
    `java.lang.String[]` | `findClassesInPackage(java.lang.String packageName, ClassFilter classFilter, boolean isIncludePackages)` Returns the names of the classes found in the given Package.
    `protected void` | `fireActionEvent()`
    `ClassFilter` | `getClassFilter()`
    `java.lang.String` | `getEditorText()`
    `java.lang.String` | `getValue()` Returns the field value as an Object - or null if the field is empty.
    `protected boolean` | `hasNullItem()` Defines whether this ChoiceField should have a NullItem.
    `void` | `initFromEnvStore(EnvStore envStore)`
    `boolean` | `isEmpty()` Tests if the field has input.
    `void` | `setClassFilter(ClassFilter classFilter)`
    `void` | `setEditorText(java.lang.String text)`
    `void` | `setNotNull(boolean state)` Sets the field to not-null.
    `void` | `setValue(java.lang.String obj)` Sets the field value to the given object.
    `java.lang.String` | `toValue(java.lang.Object o)` Tries to convert any object value to the target data type of this field.

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

      `clear, clearItems, createNullItem, createValue, findItemByText, fire, getIntValue, getJLabel, getLabel, getName, getNlsKey, getNullItem, getStringValue, getUnitComponent, getWidget, inputEquals, inputEquals, inputEquals, inputEquals, isLocked, isNotNull, isNullSelected, isPrimaryKey, isRecordTypeField, isStretchableX, isStretchableY, loadItems, loadItems, setColumnMaxChars, setInsertDefaultValue, setLocked, setModifyFlag, setPrimaryKey, setStretchableX, setStretchableY, setUnitComponent, setUnitString, setValueNumb, toString, toString`

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

      `actionPerformed, addItems, addItems, contains, fireItemStateChanged, indexOf, isNumb, replaceItem, setNumb`

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

      `actionPropertyChanged, addActionListener, addItem, addItemListener, addPopupMenuListener, configureEditor, configurePropertiesFromAction, contentsChanged, createActionPropertyChangeListener, createDefaultKeySelectionManager, firePopupMenuCanceled, firePopupMenuWillBecomeInvisible, firePopupMenuWillBecomeVisible, getAccessibleContext, getAction, getActionCommand, getActionListeners, getEditor, getItemAt, getItemCount, getItemListeners, getKeySelectionManager, getMaximumRowCount, getModel, getPopupMenuListeners, getPrototypeDisplayValue, getRenderer, getSelectedIndex, getSelectedItem, getSelectedObjects, getUI, getUIClassID, hidePopup, insertItemAt, installAncestorListener, intervalAdded, intervalRemoved, isEditable, isLightWeightPopupEnabled, isPopupVisible, paramString, processKeyEvent, removeActionListener, removeAllItems, removeItem, removeItemAt, removeItemListener, removePopupMenuListener, selectedItemChanged, selectWithKeyChar, setAction, setActionCommand, setEditable, setEditor, setEnabled, setKeySelectionManager, setLightWeightPopupEnabled, setMaximumRowCount, setModel, setPopupVisible, setPrototypeDisplayValue, setRenderer, setSelectedIndex, setSelectedItem, setUI, showPopup, 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, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, 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, 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

    - #### ClassBrowseField

          public ClassBrowseField(ApplicationContext ctx,
                          NlsDatabaseKey nameKey,
                          boolean isNotNull)

  - ### Method Detail

    - #### getClassFilter

          public ClassFilter getClassFilter()

    - #### setClassFilter

          public void setClassFilter(ClassFilter classFilter)

    - #### addEnvProperties

          public void addEnvProperties(EnvMap props)

      Description copied from interface: `EnvStorable`
      This method is called on the implementing class in order to give it a chance to fill the passed Properties object with key-value pairs that should be saved in the environment properties file.
      Specified by:
        `addEnvProperties` in interface `EnvStorable`

    - #### initFromEnvStore

          public void initFromEnvStore(EnvStore envStore)

      Specified by:
        `initFromEnvStore` in interface `EnvStorable`

    - #### createEnvKey

          protected java.lang.String createEnvKey()

    - #### setNotNull

          public void setNotNull(boolean state)

      Description copied from interface: `Field`
      Sets the field to not-null. This causes the field to show up with a yellow background for indicating to the user that a value must be entered. If no value is entered the input check with isInputValid() will fail.
      Specified by:
        `setNotNull` in interface `Field<java.lang.String>`
      Overrides:
        `setNotNull` in class `AbstractChoiceField<java.lang.String>`

    - #### hasNullItem

          protected boolean hasNullItem()

      Description copied from class: `AbstractChoiceField`
      Defines whether this ChoiceField should have a NullItem. A NullItem is only created when this method returns true.
      Overrides:
        `hasNullItem` in class `AbstractChoiceField<java.lang.String>`

    - #### setEditorText

          public void setEditorText(java.lang.String text)

    - #### getEditorText

          public java.lang.String getEditorText()

    - #### isEmpty

          public boolean isEmpty()

      Description copied from interface: `Field`
      Tests if the field has input.
      Specified by:
        `isEmpty` in interface `Field<java.lang.String>`
      Overrides:
        `isEmpty` in class `AbstractChoiceField<java.lang.String>`

    - #### getValue

          public java.lang.String 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.lang.String>`
      Overrides:
        `getValue` in class `AbstractChoiceField<java.lang.String>`

    - #### setValue

          public void setValue(java.lang.String obj)

      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.lang.String>`
      Overrides:
        `setValue` in class `AbstractChoiceField<java.lang.String>`

    - #### fireActionEvent

          protected void fireActionEvent()

      Overrides:
        `fireActionEvent` in class `ZComboBox`

    - #### applyInsertDefaultValue

          protected void applyInsertDefaultValue(java.lang.Object value)

      Overrides:
        `applyInsertDefaultValue` in class `AbstractChoiceField<java.lang.String>`

    - #### toValue

          public java.lang.String toValue(java.lang.Object o)

      Description copied from interface: `Field`
      Tries to convert any object value to the target data type of this field. An `IllegalArgumentException` is thrown when the type is not supported by the field.
      Specified by:
        `toValue` in interface `Field<java.lang.String>`
      Overrides:
        `toValue` in class `AbstractChoiceField<java.lang.String>`

    - #### findClassesInPackage

          public java.lang.String[] findClassesInPackage(java.lang.String packageName,
                                                ClassFilter classFilter,
                                                boolean isIncludePackages)
                                                  throws java.lang.Exception

      Returns the names of the classes found in the given Package. Note that this method should not be used in projects because it will find classes only in the local classes folder but not in JAR files.
      Throws:
        `java.lang.Exception`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.