|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
oracle.ide.db.controls.CommentEditor
public class CommentEditor
Widget for editing an object's comment. Can be used as a component on a panel, or as a traversable in its own right.
| 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 | |
|---|---|
static int |
LABEL_ABOVE |
static int |
LABEL_LEFT |
static int |
NO_LABEL |
| 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 | |
|---|---|
CommentEditor() |
|
CommentEditor(int labelPolicy) |
|
| Method Summary | |
|---|---|
void |
commit(DBObject obj) |
java.awt.Component |
getComponent()Normally, the Traversable class will itself be the UI Component. |
java.lang.Object |
getExitTransition()Returns the exit transition that can be used by a Traversable-aware wizard. |
java.lang.String |
getHelpID()Returns the context-sensitive help topic ID to use for this Traversable. |
void |
init(DBObjectProvider prov, DBObject obj) |
void |
init(DBObjectProvider prov, DBObject obj, oracle.ide.db.verifiers.relation.RelationInfoVerifier verifier) |
void |
onEntry(TraversableContext data)This method is called when the Traversable is being entered. |
void |
onExit(TraversableContext data)This method is called when the Traversable is being exited. |
void |
setEnabled(boolean boo) |
| 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, 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, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static int NO_LABEL
public static int LABEL_ABOVE
public static int LABEL_LEFT
| Constructor Detail |
|---|
public CommentEditor()
public CommentEditor(int labelPolicy)
| Method Detail |
|---|
public void init(DBObjectProvider prov,
DBObject obj)
public void init(DBObjectProvider prov,
DBObject obj,
oracle.ide.db.verifiers.relation.RelationInfoVerifier verifier)
public void commit(DBObject obj)
throws ValidationException
ValidationExceptionpublic void setEnabled(boolean boo)
setEnabled in class javax.swing.JComponentpublic void onEntry(TraversableContext data)
TraversableTraversable is being entered. The data that the Traversable should use to populate its UI components comes from the specified TraversableContext.
When the same Traversable is entered more than once in the course of interacting with the user, the Traversable needs to reload the data directly from the TraversableContext rather than caching data objects. Some reasons for this include:
Traversables may edit the data objects or even replace them.Traversable instance may be used for editing multiple different instances of the same object type.TraversableContext is the best way to ensure that the Traversable will not be editing the wrong data.
The Traversable should not even cache references to data objects between invocations of onEntry and Traversable.onExit(TraversableContext) because the UI container is not required to guarantee that the references will be identical.
onEntry in interface Traversabledata - The data wrapper where the Traversable locates the data that it needs to populate the UI.public java.awt.Component getComponent()
TraversableTraversable class will itself be the UI Component. Therefore, getComponent() typically just returns this. In this situation the getComponent() method then is simply a means of avoiding a type cast.
In other cases, it would be useful to have the ability to return a different Component based on the contents of the TraversableContext that is passed to the Traversable.onEntry(TraversableContext) method. UI containers (e.g. property dialogs and wizards) that are designed to use the Traversable interface must call the Traversable.onEntry(TraversableContext) method before calling getComponent(). This allows a Traversable implementation to have the opportunity to configure the UI Component or even create a new one before it is displayed.
In either situation, the implementation should strive to return the same Component instance as often as possible rather than creating a new instance becaues the UI container will call this method frequently.
getComponent in interface TraversableComponent that the user interacts with for creating or editing an object.
public void onExit(TraversableContext data)
throws TraversalException
TraversableTraversable is being exited. At this point, the Traversable should copy the data from its associated UI back into the data structures in the TraversableContext.
If the Traversable should not be exited because the user has entered either incomplete, invalid, or inconsistent data, then this method can throw a TraversalException to indicate to the property dialog or wizard that validation failed and that the user should not be allowed to exit the current Traversable. Refer to the TraversalException javadoc for details on passing the error message that should be shown to the user.
onExit in interface Traversabledata - The data object where changes made in the UI should be copied so that the changes can be accessed by other Traversables.TraversalException - if the user has entered either incomplete, invalid, or inconsistent data. This exception prevents the property dialog or wizard from continuing and forces the user to stay on the current Traversable until the data entered is valid or the user cancels. The exception class itself is capable of carrying an error message that will be shown to the user. Refer to its javadoc for details.public java.lang.Object getExitTransition()
TraversableTraversable-aware wizard. The wizard can use the exit transition to direct the user through an alternate or streamlined set of panels based on their current input.
If the Traversable implementation does not support multiple exit transitions or is not used in a wizard, then this method should just return null.
getExitTransition in interface TraversableTraversable that is used by dynamic interview-style wizards to determine the next course of action. A Traversable class that does not support multiple possible transitions should just return null.public java.lang.String getHelpID()
TraversableTraversable. A null return value means that the Traversable implementation doesn't specify a help topic ID. However, there are other ways that a help topic ID could get associated with a Traversable.
Specifically, when a Traversable instance is created by a MetaTraversable such as Step or Navigable in the context of a Navigable container such as MDDPanel, TabbedPanel or FSMWizard, the help ID is searched according to the following order:
MetaTraversable.getHelpID()Traversable.getHelpID(). This may lead into a recursion if the Traversable's Component is a nested Navigable container.Traversable.getComponent() )Since a Navigable wraps a Traversable, and a Traversable wraps a Component, the priority order for determining the help ID is based on giving the outer-most wrapper the opportunity to override. The Navigable container has the lowest priority because containers such as MDDPanel, TabbedPanel, and FSMWizard don't normally have a help topic ID of their own, since help topics tend to be on a per page basis.
For most cases the recommended approach is to have the Traversable specify the help ID. However, when the same Traversable can be used in different contexts, then specifying or overriding the help ID from the MetaTraversable could be better, especially if that avoids the need for conditional logic in Traversable.getHelpID(). If no dynamic behavior is needed in determining the help ID, then the implementation can probably just subclass DefaultTraversablePanel and call the DefaultTraversablePanel.setHelpID(String) method from the subclass constructor.
The getHelpID() method is called only when the user requests help, so the actual help ID may be determined dynamically (e.g. return a different ID depending on the state of the UI).
getHelpID in interface Traversable
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||