Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

oracle.ide.db.controls
Class DBObjectChooser

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by oracle.ide.db.controls.DBObjectChooser
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.ListCellRenderer

public final class DBObjectChooser
extends javax.swing.JPanel
implements javax.swing.ListCellRenderer

A generic control for choosing DBObjects. The control extends a JPanel allowing it to be layed out with other controls before the DBObjectProvider is known, however the actual implementation of the UI is placed onto the JPanel when the DBObjectProvider is first set on the control.

The DBObjectChooser also supports child-parent relationships. A DBObjectChooser can be created with a specified parent DBObjectChooser. The synchronization between the two controls will then be built automatically.

See Also:
Serialized Form

Nested Class Summary
static interface DBObjectChooser.ChangeListener
           
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DBObjectChooser(DBObjectChooser parent, java.lang.String... types)
          Create a DBObjectChooser to support objects of the given types, parented by the given DBObjectChooser.
DBObjectChooser(java.lang.String... types)
          Create a DBObjectChooser to support objects of the given types
 
Method Summary
 void addChangeListener(DBObjectChooser.ChangeListener l)
          Adds the given DBObjectChooser.ChangeListener
 void addIDToList(DBObjectID id)
           
 DBObject getDBObject()
          Convenience method to return the DBObject currently represented by the DBObjectChooser.
 DBObjectCriteria<SystemObject> getDBObjectCriteria()
           
 DBObjectID getDBObjectID()
          Get the id of the DBObject currently represented by the DBObjectChooser
 DBObjectChooserDelegate getDelegate()
          Deprecated. 
 DBObjectFilter getFilter()
          Return any additional DBObjectFilter applied to the chooser.
 java.awt.Component getListCellRendererComponent(javax.swing.JList list, java.lang.Object value, int index, boolean isSelected, boolean cellHasFocus)
           
 DBObject getOrCreateDBObject()
           
 java.lang.String[] getTypes()
          Return the list of DBObject types the DBObjectChooser was constructed with
 boolean isEditable()
          Override of the Component.isEditable method.
 boolean isEnabled()
          Override of the Component.isEnabled method.
static void registerCustomChooser(java.lang.Class<? extends DBObjectProvider> provClz, java.lang.Class<? extends DBObjectChooserDelegate> delegateClz)
          Deprecated. - no longer extensible
 void removeChangeListener(DBObjectChooser.ChangeListener l)
          Removes the given DBObjectChooser.ChangeListener
 void resetCaches()
           
 void setContextDBObjectID(DBObjectID id)
          Set the context of a child DBObjectChooser.
 void setDBObject(DBObject obj)
          Convenience method to set the DBObject currently represented by the DBObjectChooser.
 void setDBObjectID(DBObjectID id)
          Set the id of the DBObject currently represented by the DBObjectChooser
 void setEditable(boolean editable)
          Override of the Component.setEditable method.
 void setEnabled(boolean enabled)
          Override of the Component.setEnabled method.
 void setFilter(DBObjectFilter filter)
          Set any additional DBObjectFilter for the chooser.
 void setName(java.lang.String name)
          Override of the Component.setName method.
 void setNullText(java.lang.String nullText)
          Set the text to show in the DBObjectChooser if the value it represents is null.
 void setProvider(DBObjectProvider prov)
          Set the DBObjectProvider for the DBObjectChooser.
 void setShowIcon(boolean showIcon)
          Set whether a type icon should be shown in the DBObjectChooser.
 
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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, 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, 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, transferFocusBackward, 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, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, 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, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DBObjectChooser

public DBObjectChooser(java.lang.String... types)
Create a DBObjectChooser to support objects of the given types

Parameters:
types - a list of DBObject types

DBObjectChooser

public DBObjectChooser(DBObjectChooser parent,
                       java.lang.String... types)
Create a DBObjectChooser to support objects of the given types, parented by the given DBObjectChooser.

Parameters:
parent - Parent DBObjectChooser
types - a list of DBObject types
Method Detail

setShowIcon

public final void setShowIcon(boolean showIcon)
Set whether a type icon should be shown in the DBObjectChooser. Default is true if 2 or more types were specified in the constructor, false otherwise.


setNullText

public final void setNullText(java.lang.String nullText)
Set the text to show in the DBObjectChooser if the value it represents is null.


getDBObjectCriteria

public DBObjectCriteria<SystemObject> getDBObjectCriteria()

addIDToList

public final void addIDToList(DBObjectID id)

setProvider

public final void setProvider(DBObjectProvider prov)
Set the DBObjectProvider for the DBObjectChooser. This will cause the actual UI to be instantiated and layed out on the DBObjectChooser panel.


resetCaches

public final void resetCaches()

setContextDBObjectID

public final void setContextDBObjectID(DBObjectID id)
Set the context of a child DBObjectChooser. For example, specify the id of a Table for a DBObjectChooser showing a list of Columns.


getDBObjectID

public final DBObjectID getDBObjectID()
Get the id of the DBObject currently represented by the DBObjectChooser


setDBObjectID

public final void setDBObjectID(DBObjectID id)
Set the id of the DBObject currently represented by the DBObjectChooser


getDBObject

public final DBObject getDBObject()
Convenience method to return the DBObject currently represented by the DBObjectChooser. This is a wrapper to getDBObjectID().


setDBObject

public final void setDBObject(DBObject obj)
Convenience method to set the DBObject currently represented by the DBObjectChooser. This is a wrapper to setDBObjectID(oracle.javatools.db.DBObjectID).


setName

public final void setName(java.lang.String name)
Override of the Component.setName method. Either passes the name onto the delegate to use against its specific UI, or if the delegate is not yet set, caches the value to set against the delegate later.

Overrides:
setName in class java.awt.Component

setEnabled

public final void setEnabled(boolean enabled)
Override of the Component.setEnabled method. Either passes the value onto the delegate to use against its specific UI, or if the delegate is not yet set, caches the value to set against the delegate later.

Overrides:
setEnabled in class javax.swing.JComponent

isEnabled

public final boolean isEnabled()
Override of the Component.isEnabled method. Retrieves the enabled state from the delegate or returns the previously cached value. See setEnabled(boolean).

Overrides:
isEnabled in class java.awt.Component

setEditable

public final void setEditable(boolean editable)
Override of the Component.setEditable method. Either passes the value onto the delegate to use against its specific UI, or if the delegate is not yet set, caches the value to set against the delegate later.


isEditable

public final boolean isEditable()
Override of the Component.isEditable method. Retrieves the editable state from the delegate or returns the previously cached value. See setEditable(boolean).


getOrCreateDBObject

public DBObject getOrCreateDBObject()

addChangeListener

public final void addChangeListener(DBObjectChooser.ChangeListener l)
Adds the given DBObjectChooser.ChangeListener


removeChangeListener

public final void removeChangeListener(DBObjectChooser.ChangeListener l)
Removes the given DBObjectChooser.ChangeListener


getTypes

public final java.lang.String[] getTypes()
Return the list of DBObject types the DBObjectChooser was constructed with


setFilter

public void setFilter(DBObjectFilter filter)
Set any additional DBObjectFilter for the chooser.


getFilter

public DBObjectFilter getFilter()
Return any additional DBObjectFilter applied to the chooser.


registerCustomChooser

@Deprecated
public static final void registerCustomChooser(java.lang.Class<? extends DBObjectProvider> provClz,
                                                          java.lang.Class<? extends DBObjectChooserDelegate> delegateClz)
Deprecated. - no longer extensible


getListCellRendererComponent

public java.awt.Component getListCellRendererComponent(javax.swing.JList list,
                                                       java.lang.Object value,
                                                       int index,
                                                       boolean isSelected,
                                                       boolean cellHasFocus)
Specified by:
getListCellRendererComponent in interface javax.swing.ListCellRenderer

getDelegate

@Deprecated
public DBObjectChooserDelegate getDelegate()
Deprecated. 


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

Copyright © 1997, 2011, Oracle. All rights reserved.