|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javax.swing.tree.DefaultMutableTreeNode
|
+--com.ca.directory.jxplorer.tree.SmartNode
| Field Summary | |
static java.lang.String |
DUMMYMESSAGE
|
static java.lang.String |
ROOTNAME
|
static java.awt.datatransfer.DataFlavor |
UNICODETEXT
|
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
| Constructor Summary | |
SmartNode()
Constructor for dummy nodes; used to flag possibly expandable nodes when their children status is unknown (due to not having been read from the directory yet.) |
|
SmartNode(RDN rdn)
Simple constructor, for when objectClass attributes are not known |
|
SmartNode(SmartNode S)
Copy constructor, for when an RDN is the same, but the tree position (and hence the full DN) is different. |
|
SmartNode(java.lang.String rdnString)
Simple constructor, for when objectClass attributes are not known |
|
SmartNode(java.lang.String RDN,
DXAttribute objectClasses)
When objectClass attributes are known, we try to be cleverer getting the icon for this node. |
|
| Method Summary | |
void |
copyChildren(java.util.Enumeration children)
A utility ftn that makes copies of all the child nodes given to it, and adds the copies to the current node. |
java.lang.String |
getBlankRootName()
Returns the name of the 'blank root' (i.e. |
java.lang.String |
getDistinguishedValue()
Writes out the nodes RDN as a string, displaying just the value of the RDN |
DN |
getDN()
|
java.lang.String |
getDummyMessage()
Returns the string to display when the node is a 'dummy'. |
javax.swing.ImageIcon |
getIcon()
gets the icon associated with this node. |
java.lang.String |
getIconName()
returns the icon name (without the extension). |
java.lang.String |
getObjectClass()
returns the ldap class type of the node |
javax.swing.JPopupMenu |
getPopupMenu()
It is possible to register a special popup menu that is called when this node is 'right-clicked' on. |
RDN |
getRDN()
Returns the RDN of the tree node as a String. |
java.lang.Object |
getTransferData(java.awt.datatransfer.DataFlavor df)
|
java.awt.datatransfer.DataFlavor[] |
getTransferDataFlavors()
|
boolean |
hasChild(RDN r)
Returns whether this node has the corresponding node as a child. |
boolean |
hasChild(SmartNode n)
Returns whether this node has the corresponding node as a child. |
boolean |
hasChild(java.lang.String testRDN)
Returns whether this node has the corresponding node as a child. |
boolean |
hasDummy()
Returns whether this node has a dummy node. |
static void |
init(javax.swing.JComponent tempDisplay,
CBResourceLoader resourceLoader)
Pre load the image icons... we'll be using them a lot Image icons are stored in the 'icons' hashtable, keyed on their file name stem. |
boolean |
isAlwaysRefresh()
Experimental - returns true if the node should always 'refresh' when it is expanded by the tree... |
boolean |
isBlankRoot()
The root node is sometimes blank. |
boolean |
isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavour)
|
boolean |
isDummy()
Sometimes a dummy node is used to signal that there may be child nodes below a given node, but we haven't actually read those nodes yet. |
boolean |
isMultiValued()
|
boolean |
isRoot()
The root node is sometimes blank, but displayed to the user with a different name. |
boolean |
isStructural()
|
boolean |
rdnEquals(RDN testRDN)
Check if a SmartNode has the same RDN as the passed RDN. |
void |
setAlwaysRefresh(boolean state)
Experimental - sets if the node should always 'refresh' (i.e. reload all children) when it is expanded by the tree... |
void |
setIcon(javax.swing.ImageIcon newIcon)
Rarely used method to force a particular icon to be used by this particular node. |
void |
setPopupMenu(javax.swing.JPopupMenu popupMenu)
It is possible to register a special popup menu that is called when this node is 'right-clicked' on. |
void |
setRoot(boolean state)
This sets the root status of the node (default=false). |
void |
setStructural(boolean val)
|
void |
setTrueObjectClass(DXAttribute objectClasses)
If available, it is best to use the object class of the entry (to determine which icon to display 'n stuff). |
boolean |
setTrueObjectClass(java.lang.String value)
This attempts to set the object class of the node to a particular value. |
void |
sort()
This sorts the children of the current node by the alphabetic value of their naming attribute value; e.g. in cn=doofus, by 'doofus'. |
java.lang.String |
toString()
Writes out the nodes RDN as a string, |
void |
update(RDN newRDN)
|
void |
update(java.lang.String rdn)
Takes an ldap RDN string such as 'ou=DemoCorp', and breaks it into a nodeObjectClass ('ou') and a distinguished value ('DemoCorp'), and replaces the existing values of these variables. |
| Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String ROOTNAME
public static final java.lang.String DUMMYMESSAGE
public static final java.awt.datatransfer.DataFlavor UNICODETEXT
| Constructor Detail |
public SmartNode()
public SmartNode(java.lang.String rdnString)
public SmartNode(RDN rdn)
public SmartNode(SmartNode S)
S - the node to copy for initial values.
public SmartNode(java.lang.String RDN,
DXAttribute objectClasses)
RDN - the RDN of the new node (e.g. 'cn=fnord')objectClasses - a javax.naming.directory Attribute containing
a list of the node's ldap objectClasses.| Method Detail |
public static void init(javax.swing.JComponent tempDisplay,
CBResourceLoader resourceLoader)
public void setTrueObjectClass(DXAttribute objectClasses)
public boolean setTrueObjectClass(java.lang.String value)
public void update(java.lang.String rdn)
public void update(RDN newRDN)
public void copyChildren(java.util.Enumeration children)
children - an enumeration of SmartNode(s), to copy
and add.public RDN getRDN()
public java.lang.String toString()
toString in class javax.swing.tree.DefaultMutableTreeNodepublic java.lang.String getObjectClass()
public java.lang.String getDistinguishedValue()
public java.lang.String getIconName()
public boolean isDummy()
public boolean hasDummy()
public java.lang.String getDummyMessage()
public boolean isRoot()
isRoot in class javax.swing.tree.DefaultMutableTreeNodepublic boolean isBlankRoot()
public java.lang.String getBlankRootName()
public boolean isAlwaysRefresh()
public void setAlwaysRefresh(boolean state)
public void setRoot(boolean state)
public javax.swing.ImageIcon getIcon()
public void setIcon(javax.swing.ImageIcon newIcon)
public boolean hasChild(SmartNode n)
public boolean hasChild(RDN r)
public boolean hasChild(java.lang.String testRDN)
public boolean isStructural()
public void setStructural(boolean val)
public void sort()
public boolean rdnEquals(RDN testRDN)
public void setPopupMenu(javax.swing.JPopupMenu popupMenu)
public javax.swing.JPopupMenu getPopupMenu()
public boolean isMultiValued()
public DN getDN()
public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor df)
throws java.awt.datatransfer.UnsupportedFlavorException,
java.io.IOException
getTransferData in interface java.awt.datatransfer.Transferablejava.awt.datatransfer.UnsupportedFlavorException
java.io.IOExceptionpublic java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors in interface java.awt.datatransfer.Transferablepublic boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavour)
isDataFlavorSupported in interface java.awt.datatransfer.Transferable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||