public abstract class ComponentHandle
extends java.lang.Object
implements java.io.Serializable
Dataview
. A ComponentHandle
provides access to the component that it represents. It also provides information about the component, through the ComponentInfo
object. Concrete subclasses of this class provide information that is specific to the kind of component they describe.
ComponentHandle
classes are used by Dataview
objects to pass access and information to other classes. For example, when you listen for a SelectEvent
, you can access the selected component by getting the ComponentHandle
object from the event.
ComponentInfo
, SelectEvent
, Serialized FormModifier and Type | Field and Description |
---|---|
protected DataAccess |
m_dataAccess |
Constructor and Description |
---|
ComponentHandle(int id, java.lang.String name, java.lang.Object comp)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.Object |
getComponent()
Retrieves an actual reference to the component that this
ComponentHandle represents. |
abstract ComponentInfo |
getComponentInfo()
Retrieves the
ComponentInfo for the component that this ComponentHandle represents. |
int |
getID()
Retrieves the identifier of the component that this
ComponentHandle represents. |
java.lang.String |
getName()
Retrieves the name of the component that this
ComponentHandle represents. |
void |
setDataAccess(DataAccess access)
This is for internal use.
|
protected DataAccess m_dataAccess
public ComponentHandle(int id, java.lang.String name, java.lang.Object comp)
id
- A constant, such as Dataview.SUBTITLE
, that identifies the component that this ComponentHandle
represents. Constants are defined in the Dataview
class and in its subclasses.name
- The name of the component that this ComponentHandle
represents.comp
- The actual reference to the component.public int getID()
ComponentHandle
represents.FOOTNOTE
, that identifies the represented component.public java.lang.String getName()
ComponentHandle
represents.public java.lang.Object getComponent()
ComponentHandle
represents.public abstract ComponentInfo getComponentInfo()
ComponentInfo
for the component that this ComponentHandle
represents. Concrete subclasses return appropriate subclasses of the ComponentInfo
class. For example, a DataComponentHandle
returns a DataComponentInfo
object, which provides the row and column of the component.ComponentHandle
represents. Returns null
if there is no ComponentInfo
or if the ComponentInfo
is null
.DataComponentHandle
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
ComponentHandle
.public void setDataAccess(DataAccess access)
access
-