|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindfusion.diagramming.TreeViewItem
public class TreeViewItem
Represents a constituent item of the hierarchy displayed inside a
TreeViewNode
.
Constructor Summary | |
---|---|
TreeViewItem()
Initializes a new instance of the TreeViewItem class. |
|
TreeViewItem(java.lang.String label)
Initializes a new instance of the TreeViewItem class. |
|
TreeViewItem(TreeViewItem prototype)
Initializes a new instance of the TreeViewItem class using
the specified item as a prototype. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Creates a copy of this item. |
TreeItemList |
getChildren()
Gets a list of this item's children in the hierarchy. |
java.awt.geom.Rectangle2D |
getEditRect(java.awt.geom.Point2D mousePosition)
|
boolean |
getExpanded()
Gets whether this item is expanded to show its children. |
float |
getHeight()
Gets the height of this item. |
DiagramLinkList |
getIncomingLinks()
Gets a collection of all links that point to this item. |
java.lang.String |
getLabel()
Gets the label of this item. |
Brush |
getLabelBrush()
Gets the brush used to draw this item's label text. |
java.awt.Font |
getLabelFont()
Gets the label font of this item. |
DiagramLinkList |
getOutgoingLinks()
Gets a collection of all links that go out of this item. |
TreeViewItem |
getParent()
Gets the parent item of this item. |
java.lang.Object |
getTag()
Gets custom data associated with this item. |
java.lang.String |
getTextToEdit()
|
void |
loadFromXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
Loads the item content from an XML element. |
void |
readExternal(java.io.ObjectInput in)
Implements Externalizable. |
void |
renderText(java.lang.String text,
java.awt.geom.Rectangle2D dest,
com.mindfusion.diagramming.DrawTextHint hint)
|
protected void |
saveToXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
Saves the item content into an XML element. |
void |
setEditedText(java.lang.String newText)
|
void |
setExpanded(boolean value)
Sets whether this item is expanded to show its children. |
void |
setHeight(float value)
Sets the height of this item. |
void |
setImage(java.awt.Image image)
Sets the image that is displayed in this treeview item. |
void |
setLabel(java.lang.String text)
Sets the label of this item. |
void |
setLabelBrush(Brush value)
Sets the brush used to draw this item's label text. |
void |
setLabelFont(java.awt.Font value)
Sets the label font of this item. |
void |
setTag(java.lang.Object object)
Sets custom data associated with this item. |
void |
writeExternal(java.io.ObjectOutput out)
Implements Externalizable. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TreeViewItem()
TreeViewItem
class.
public TreeViewItem(java.lang.String label)
TreeViewItem
class.
label
- The text initially displayed by the item.public TreeViewItem(TreeViewItem prototype)
TreeViewItem
class using
the specified item as a prototype.
This constructor copies the TreeViewItem property values from the specified prototype item.
prototype
- The treeview item to use as a prototype. The properties of the
new treeview are initialized from the property values of prototype.Method Detail |
---|
public float getHeight()
public void setHeight(float value)
value
- A float value specifying the item's height. The default value is 5.public TreeItemList getChildren()
TreeViewItem
objects.public void setImage(java.awt.Image image)
image
- An instance of the java.awt.Image
class.public boolean getExpanded()
true
to show the children of this item,
otherwise false
; the default value is true
.public void setExpanded(boolean value)
value
- true
to show the children of this item,
otherwise false
; the default value is true
.public java.lang.Object getTag()
java.lang.Object
.
The default value is null
.public void setTag(java.lang.Object object)
object
- An instance of any class derived from java.lang.Object
.
The default value is null
.public void loadFromXml(org.w3c.dom.Element xmlElement, XmlPersistContext context) throws javax.xml.transform.TransformerException, XmlException
xmlElement
- An XmlElement
containing the link's data.context
- An XmlPersistContext
object providing contextual information
about the serialization process and some helper serialization methods.
javax.xml.transform.TransformerException
XmlException
public DiagramLinkList getIncomingLinks()
public DiagramLinkList getOutgoingLinks()
public void setLabelBrush(Brush value)
value
- An instance of the Brush
class.public Brush getLabelBrush()
Brush
instance.public void renderText(java.lang.String text, java.awt.geom.Rectangle2D dest, com.mindfusion.diagramming.DrawTextHint hint)
public void setLabel(java.lang.String text)
text
- A string specifying the item's label.public java.lang.String getLabel()
public java.awt.geom.Rectangle2D getEditRect(java.awt.geom.Point2D mousePosition)
getEditRect
in interface InplaceEditable
public java.lang.String getTextToEdit()
getTextToEdit
in interface InplaceEditable
public void setEditedText(java.lang.String newText)
setEditedText
in interface InplaceEditable
public TreeViewItem getParent()
TreeViewItem
instance.public java.awt.Font getLabelFont()
Font
class.
The default value is null
.public void setLabelFont(java.awt.Font value)
value
- An instance of the Font
class.
The default value is null
.public java.lang.Object clone()
clone
in class java.lang.Object
TreeViewItem
class.protected void saveToXml(org.w3c.dom.Element xmlElement, XmlPersistContext context)
xmlElement
- An XmlElement
the item's data should be stored into.context
- An XmlPersistContext
object providing contextual information
about the serialization process and some helper serialization methods.public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |