|
IBM DB2 UDB Plugin Interface for Extending the Control Center |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The CCTableObject interface allows users to override
the behavior of a Control Center object or
to define a new plugin object type which can be added to the Control
Center tree by returning it as a child of a CCTreeObject in
getChildren
.
This interface allows users to define the contents of a row in the Control Center details view.
A new object will appear in the tree view and details view of the Control Center,
if it is a child (see getChildren
) of a plugin object or Control
Center object which is not a tree leaf object (see isLeaf
).
A new object will appear only in the details view of the Control Center,
if it is a child (see getChildren
) of a new plugin
object which is a tree leaf object (see isLeaf
).
Note: Adding a new plugin object as a child of an existing Control Center object which is a tree leaf object is not supported. Also adding a new plugin object as a child of an existing Control Center object which is not in the tree is not supported. For example, you can not add a new plugin object under UDB_TABLE objects because UDB_TABLE objects only appear in the details view and not in the Control Center tree.
CCTreeObject
Field Summary |
---|
Method Summary | |
---|---|
CCColumn[] |
getColumns()
Return an array of CCColumns representing the names and classes of the columns shown in the details view for this object. |
void |
getData(java.lang.Object[] data)
Given an array of Objects corresponding to the columns shown in details view of the Control Center, this method assigns a value to each element of the array. |
javax.swing.Icon |
getIcon(int iconState)
Returns the Icon that is displayed to the left of the name of this CCObject in the tree and in the details view. |
void |
setParentName(java.lang.String name)
This is called by the Control Center to provide the full name of the parent of this CCTableObject. |
Methods inherited from interface com.ibm.db2.tools.cc.navigator.CCObject |
---|
getMenuActions, getName, getType, isConfigurable, isEditable |
Method Detail |
public void getData(java.lang.Object[] data)
An instance of a CCTableObject object contains information about itself. This information can be shown in a row of the details view. The elements of the array are set by getData and represent the columns of a row in the details view.
The class of each column's data must match the class returned by
getColumnClass
for the corresponding
column.
In the Control Center details view, the first column is always
called Name and contains both the object name and icon.
To create a column like this, getData should return a column whose value
is the plugin object itself. The CCColumn object for this column should return
CCTableObject.class
from getColumnClass
.
When the Control Center recieves a CCTableObject
subclass in the data array, it knows that it can call getIcon and getName for
that column.
The following example sets the data array for two columns:
public class Example3Child implements CCTableObject { ... public void getData(Object[] data) { data[0] = this; data[1] = state; } ... }
data
- The array of objects to which values are assignedpublic CCColumn[] getColumns()
public javax.swing.Icon getIcon(int iconState)
CLOSED_FOLDER
or
OPEN_FOLDER
. This state should be ignored by
CCObjects that are not folders.
iconState
- A state that represents either the opened or closed state for a folder
public void setParentName(java.lang.String name)
CCObjectCollectionEvent.OBJECT_ADDED
event is sent,
name
- full name of parent
Parent name syntax: xxxxx - yyyyy - ...
where xxxxx - yyyyy - ... is the fully qualified name of the parents of this object. This represents a series of names of all the parent objects of this object in the Control Center tree. Each name is separated by the " - " characters. There are as many names as there are parents for this object.
For example, a CCTableObject which is the child of a particular UDB_DATABASE, may have a parent name of MYSYSTEM - DB2 - MYDB. This represents the names of the parents in the tree which are a particular DB2 System, Instance and Database.
|
IBM DB2 UDB Plugin Interface for Extending the Control Center |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
(C)Copyright IBM Corp. 2002, 2004. All rights reserved.
Links on this page are made available for your convenience and may take you to non-IBM sites. IBM does not warrant any sample code provided on these sites.