|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.util.Namespace oracle.ide.panels.TraversableContext
The TraversableContext
class provides the means for
a Traversable
to find the data objects that it is
responsible for editing whenever it is entered or exited.
The important characteristic of TraversableContext
is that Traversable
implementations be able to search
for their data objects by a fixed name, even when multiple data
objects of the same type are being edited by the same
Traversable
implementation. This capability requires the
participation of the MetaTraversable
class through the
name link mechanism provided by its MetaTraversable.setNameLink(String, String)
method.
See the javadoc for Traversable
for more details on its
interactions with the TraversableContext
.
See the javadoc for Namespace
for details on how data
is stored and retrieved in a context-sensitive manner.
Note: The TraversableContext
class
is currently declared final
. This may be relaxed in
the future after the API is considered stable for both property
dialogs and wizards, and subclassing issues have been thoroughly
considered.
Field Summary | |
static int |
BACKWARD_TRAVERSAL
Constant that indicates that the direction of traversal for the Traversable.onEntry(TraversableContext) and
Traversable.onExit(TraversableContext) methods. |
static int |
FOCUS_TRAVERSAL
Constant that indicates that the direction of traversal for the Traversable.onEntry(TraversableContext) and
Traversable.onExit(TraversableContext) methods. |
static int |
FORWARD_TRAVERSAL
Constant that indicates that the direction of traversal for the Traversable.onEntry(TraversableContext) and
Traversable.onExit(TraversableContext) methods. |
static int |
RANDOM_ACCESS_TRAVERSAL
Constant that indicates that the direction of traversal for the Traversable.onEntry(TraversableContext) and
Traversable.onExit(TraversableContext) methods. |
Constructor Summary | |
TraversableContext(Namespace namespace,
int direction)
This constructor creates a new instance using the specified Namespace as the data context. |
|
TraversableContext(Navigable navigable,
int direction)
This constructor creates a new instance using the specified Navigable to determine the data context. |
Method Summary | |
java.lang.Object |
getDesignTimeObject(java.lang.String key)
Experimental. |
DialogCallbacks |
getDialogCallbacks()
|
int |
getDirection()
Returns the direction that the traversal is occurring in. |
WizardCallbacks |
getWizardCallbacks()
|
NavigableContext |
newNavigableContext()
|
void |
putDesignTimeObject(java.lang.String key,
java.lang.Object dtObject)
Experimental. |
void |
setDialogCallbacks(DialogCallbacks callbacks)
|
void |
setWizardCallbacks(WizardCallbacks callbacks)
|
protected java.lang.String |
translateKey(java.lang.String key)
This method is used to remap a key that is used when invoking either the Namespace.find(String) or #findAndReplace(String,
Object method. |
Methods inherited from class oracle.ide.util.Namespace |
contains, find, findAndReplace, get, get, getData, getParent, getRoot, isRoot, put, put, put, put, remove, setParent, toMap |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int RANDOM_ACCESS_TRAVERSAL
Traversable.onEntry(TraversableContext)
and
Traversable.onExit(TraversableContext)
methods.
This constant means that the Traversable
is being entered
or exited in a random-access manner. Random-access traversal
typically occurs in a properties dialog.
public static final int FORWARD_TRAVERSAL
Traversable.onEntry(TraversableContext)
and
Traversable.onExit(TraversableContext)
methods.
This constant means that the Traversable
is being entered
or exited in a sequentially forward direction. Forward traversal
typically occurs in a wizard.
public static final int BACKWARD_TRAVERSAL
Traversable.onEntry(TraversableContext)
and
Traversable.onExit(TraversableContext)
methods.
This constant means that the Traversable
is being entered
or exited in a sequentially backward direction. Backward
traversal typically occurs in a wizard.
public static final int FOCUS_TRAVERSAL
Traversable.onEntry(TraversableContext)
and
Traversable.onExit(TraversableContext)
methods.
This constant means that the Traversable
is being entered
by gaining input focus or is being exited by losing input focus.
Focus traversal typically occurs in dialogs, wizards, or editors
that are are modeless.
Constructor Detail |
public TraversableContext(Navigable navigable, int direction)
Navigable
to determine the data context. The traversal
direction is set according to the specified int
.
navigable
- the Navigable
whose data context will
be associated with the TraversableContext
. This must
not be null
or else a NullPointerException
will be thrown.direction
- the traversal direction associated with the
creation of the TraversableContext
. The value must
be one of RANDOM_ACCESS_TRAVERSAL
, FORWARD_TRAVERSAL
, BACKWARD_TRAVERSAL
, or FOCUS_TRAVERSAL
, or else an IllegalArgumentException
will be thrown.
java.lang.NullPointerException
- if the specified Navigable
is null
.
java.lang.IllegalArgumentException
- if the specified
direction
is not a legally accepted value.public TraversableContext(Namespace namespace, int direction)
Namespace
as the data context. The traversal direction
is set according to the specified int
. Because
no MetaTraversable
is set through this method, the new
TraversableContext
does not remap any data keys.
(Remapping data keys is typically only needed in cases where
the same Traversable implementation reappears more than once
in a particular MDDPanel
but edits different objects
at the same level in the TraversableContext
. Since
the Traversable accesses its data by a fixed key, that fixed
key needs to be remapped to a real name when the key could
possibly be resolved to more than one object.)
Method Detail |
public int getDirection()
public WizardCallbacks getWizardCallbacks()
public void setWizardCallbacks(WizardCallbacks callbacks)
public DialogCallbacks getDialogCallbacks()
public void setDialogCallbacks(DialogCallbacks callbacks)
public java.lang.Object getDesignTimeObject(java.lang.String key)
public void putDesignTimeObject(java.lang.String key, java.lang.Object dtObject)
public NavigableContext newNavigableContext()
protected java.lang.String translateKey(java.lang.String key)
Namespace
Namespace.find(String)
or #findAndReplace(String,
Object
method. In general, translation will not be necessary,
so this method by default returns the specified key itself.
A subclass that requires key mappings should override this method
to provide the proper key mapping behavior.
translateKey
in class Namespace
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.