|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.clients.beans.explorer.WTBusinessObject
This class is an adapter class for the Explorable interface.
It can be subclassed to add in displaying objects in the WTExplorer, which
requires that contained objects implement the Explorable interface.
The getUses() method is invoked to show the children of the selected node.
The getContents() method is invoked to show the contains for the selected node.
The getIdentity() method is invoked to get the display text for the node.
Supported API: true
Extendable: true
Field Summary | |
private static IconCache |
iconCache
|
private IconSelector |
myIconSelector
|
private String |
myIdentity
|
private WTObject |
myObject
|
private ObjectReference |
myObjectReference
|
private String |
openIconResource
|
private Image |
standardIcon
|
private String |
standardIconResource
|
Constructor Summary | |
WTBusinessObject()
Constructs a default WTBusinessObject object |
|
WTBusinessObject(String identity,
ObjectReference ref,
IconSelector ic)
Constructs a WTBusinessObject object using the specified identity ObjectReference and IconSelector. |
|
WTBusinessObject(String identity,
WTObject object)
Constructs a WTBusinessObject object using the specified identity and WTObject. |
Method Summary | |
Object |
getAttributeValue(Method aMethod)
Get an attribute from an object instance. |
Object |
getAttributeValue(String aMethodName)
Get an attribute from an object instance. |
Explorable[] |
getContents()
Returns an array of Explorable objects contained by this object. |
private WTContext |
getContext()
|
String |
getIdentity()
Returns a String that represents the object instance. |
Object |
getObject()
Gets the contained object. |
Image |
getOpenIcon()
Returns an Image that symbolically represents the object instance or class. |
Image |
getStandardIcon()
Returns an Image that symbolically represents the object instance or class. |
String |
getUniqueIdentity()
Returns a String that uniquely represents the object instance. |
Explorable[] |
getUses()
Returns an array of Explorable objects used by this object. |
private void |
initIconCache()
|
void |
setIdentity(String identity)
Inputs a String that represents the object instance. |
void |
setObject(Object object)
Sets the contained object. |
void |
setObject(WTObject object)
Sets the contained object. |
void |
setStandardIcon(Image icon)
|
void |
setStandardIcon(String icon)
Sets the Image that symbolically represents
the object instance or class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static IconCache iconCache
private String myIdentity
private String openIconResource
private String standardIconResource
private WTObject myObject
private ObjectReference myObjectReference
private IconSelector myIconSelector
private Image standardIcon
Constructor Detail |
public WTBusinessObject(String identity, WTObject object)
identity
- a string identifying the objectobject
- the contained WTObjectpublic WTBusinessObject(String identity, ObjectReference ref, IconSelector ic)
identity
- a string identifying the objectref
- the contained object's ObjectReferenceic
- the contained object's IconSelectorpublic WTBusinessObject()
Method Detail |
public Image getStandardIcon()
getStandardIcon
in interface Identifiable
Image
to be displayed.Image
public Image getOpenIcon()
getOpenIcon
in interface Identifiable
Image
to be displayed.Image
public void setStandardIcon(String icon)
Image
that symbolically represents
the object instance or class. For the WTQuery list, the Image
should be 16x16 pixels. By convention, the background should be
transparent which is readily supported by the GIF images.
This method is used by WTQuery during run-time.
icon
- Image
to be associated with Object.Image
,
getStandardIcon()
public void setStandardIcon(Image icon)
public Object getObject()
getObject
in interface ReferenceHolder
public void setObject(WTObject object)
object
- the contained objectpublic void setObject(Object object)
setObject
in interface ReferenceHolder
object
- the object to containpublic Explorable[] getUses() throws WTException
getUses
in interface Explorable
WTException
Explorable
public Explorable[] getContents() throws WTException
getContents
in interface Explorable
WTException
Explorable
public String getIdentity()
getIdentity
in interface Identifiable
String
public void setIdentity(String identity)
identity
- the identity of the object.String
,
getIdentity()
public String getUniqueIdentity()
getUniqueIdentity
in interface Identifiable
public Object getAttributeValue(String aMethodName)
aMethodName
- the string name of an attribute getter.
This will be resolved as obj.aMethodName();
public Object getAttributeValue(Method aMethod)
aMethod
- the method which returns an attribute value.
private void initIconCache()
private WTContext getContext()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |