|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
oracle.ide.panels.DefaultTraversablePanel
oracle.ide.panels.AbstractUIContainer
Common implementation for concrete NavigableUIContainer
classes.
Nested Class Summary |
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, 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 oracle.ide.panels.NavigableUIContainer |
NAVIGABLE_UI_CONTAINER |
Fields inherited from interface oracle.ide.controls.GridBagConstants |
ANCHOR_C, ANCHOR_E, ANCHOR_N, ANCHOR_NE, ANCHOR_NW, ANCHOR_S, ANCHOR_SE, ANCHOR_SW, ANCHOR_W, FILL_NONE, FILL_X, FILL_XY, FILL_Y |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
AbstractUIContainer()
|
Method Summary | |
void |
addApplyListener(ApplyListener applyListener)
Adds an ApplyListener that will be called when the
user applies or cancels changes. |
void |
apply(ApplyEvent e)
This method is called when the changes made in the NavigableUIContainer are to be committed to the original
data structures. |
void |
cancel(ApplyEvent e)
This method is called when the changes made in the NavigableUIContainer are to be discarded. |
boolean |
displayDetailNodesAsChildren()
Returns true if the UI container is displaying
detail nodes with the children rather than in a separate tree. |
protected void |
fireApply(ApplyEvent event)
Fires the "apply" message to all registered ApplyListener
objects. |
protected void |
fireCancel(ApplyEvent event)
Fires the "cancel" message to all registered ApplyListener
objects. |
protected abstract Navigable |
getCurrentNavigable()
Concrete subclasses must implement this method to return the Navigable that is currently selected in the UI. |
protected abstract Traversable |
getCurrentTraversable()
Concrete subclasses must implement this method to return the Traversable that is currently selected in the UI. |
java.lang.String |
getHelpID()
This method allows a subclass to implement a dynamic means of determining what the help ID is. |
protected Navigable[] |
getRootNavigables()
|
protected void |
maybeRefreshUI(TraversableContext tc)
|
protected TraversableContext |
newTraversableContext()
Returns a new TraversableContext that is initialized based
on the Navigable returned by getCurrentNavigable() . |
void |
onEntry(TraversableContext tc)
This method is called when the Traversable is being
entered. |
protected void |
onEntryImpl(TraversableContext tc)
|
void |
onExit(TraversableContext tc)
This method is called when the Traversable is being
exited. |
protected void |
onExitImpl(TraversableContext tc)
|
protected abstract void |
refreshUI(TraversableContext tc)
|
void |
removeApplyListener(ApplyListener applyListener)
Removes a previously added ApplyListener so that it
no longer receives notification when the user applies or cancels
changes. |
void |
setRootNavigables(Navigable[] rootNavigables)
Sets the root-level Navigable instances for the UI. |
protected void |
updateHelpID(Traversable traversable)
Updates the help ID for the AbstractUIContainer to correspond to the help ID of the Traversable's Component. |
Methods inherited from class oracle.ide.panels.DefaultTraversablePanel |
gbc, gbc, getComponent, getDefaultTitle, getExitTransition, setDefaultTitle, setHelpID |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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 |
Methods inherited from interface oracle.ide.panels.Traversable |
getComponent, getExitTransition |
Constructor Detail |
public AbstractUIContainer()
Method Detail |
public void onEntry(TraversableContext tc)
Traversable
Traversable
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:
Traversable
s 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 Traversable
onEntry
in class DefaultTraversablePanel
Traversable.onEntry(TraversableContext)
protected final void onEntryImpl(TraversableContext tc)
public void onExit(TraversableContext tc) throws TraversalException
Traversable
Traversable
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 Traversable
onExit
in class DefaultTraversablePanel
TraversalException
Traversable.onExit(TraversableContext)
protected final void onExitImpl(TraversableContext tc) throws TraversalException
TraversalException
public java.lang.String getHelpID()
DefaultTraversablePanel
getHelpID
in class DefaultTraversablePanel
public void addApplyListener(ApplyListener applyListener)
ApplyNotifier
ApplyListener
that will be called when the
user applies or cancels changes.
addApplyListener
in interface ApplyNotifier
public void removeApplyListener(ApplyListener applyListener)
ApplyNotifier
ApplyListener
so that it
no longer receives notification when the user applies or cancels
changes.
removeApplyListener
in interface ApplyNotifier
public void apply(ApplyEvent e)
ApplyListener
NavigableUIContainer
are to be committed to the original
data structures. This normally occurs when the user pushes the
"OK", "Apply", or "Finish" button.
This method is called as soon as the user's action is recognized.
Typically, if the NavigableUIContainer
is editing a copy
of the original data, there will be an ApplyListener
registered that is responsible for flushing the changes from the
edited data copy back to the original data structure. The API in
the oracle.ide.panels
package does not specify when
such an ApplyListener
is registered or whether one
is registered at all.
If you are writing code that must depend on the registration order
of such an ApplyListener
, you will need to consult
the documentation for the code that instantiates the
NavigableUIContainer
to determine if the registration
order for ApplyListener
s is specified there.
apply
in interface ApplyListener
e
- The ApplyEvent
that provides contextual
information about when the ApplyEvent
was fired.public void cancel(ApplyEvent e)
ApplyListener
NavigableUIContainer
are to be discarded. This normally
occurs when the user pushes the "Cancel" button.
No data validation occurs when the user cancels, and the
NavigableUIContainer
may or may not call the onExit
method of the
currently showing Traversable
. In general,
onExit
will not be called.
cancel
in interface ApplyListener
e
- The ApplyEvent
that provides contextual
information about when the ApplyEvent
was fired.public void setRootNavigables(Navigable[] rootNavigables)
NavigableUIContainer
Navigable
instances for the UI.
setRootNavigables
in interface NavigableUIContainer
public boolean displayDetailNodesAsChildren()
NavigableUIContainer
true
if the UI container is displaying
detail nodes with the children rather than in a separate tree.
That is:
false
.
true
.
That is, the tree displays detail nodes as children.
displayDetailNodesAsChildren
in interface NavigableUIContainer
protected Navigable[] getRootNavigables()
protected final void maybeRefreshUI(TraversableContext tc)
protected abstract void refreshUI(TraversableContext tc)
protected abstract Navigable getCurrentNavigable()
Navigable
that is currently selected in the UI.
protected abstract Traversable getCurrentTraversable()
Traversable
that is currently selected in the UI.
protected TraversableContext newTraversableContext()
TraversableContext
that is initialized based
on the Navigable
returned by getCurrentNavigable()
.
protected void fireApply(ApplyEvent event)
ApplyListener
objects.
protected void fireCancel(ApplyEvent event)
ApplyListener
objects.
protected void updateHelpID(Traversable traversable)
Navigable
as returned by
getCurrentNavigable()
has already been updated to
match the specified Traversable
.
|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©1997, 2003, Oracle. All rights reserved.