public class TreeViewItem extends java.lang.Object implements InplaceEditable, java.io.Externalizable
TreeViewNode
.Constructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Creates a copy of this item.
|
TreeItemList |
getChildren()
Gets a list of this item's children in the hierarchy.
|
android.graphics.RectF |
getEditRect(DiagramItem item,
android.graphics.PointF pointerPosition)
Implements InplaceEditable.getEditRect.
|
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.
|
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()
Implements InplaceEditable.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,
android.graphics.RectF 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)
Implements InplaceEditable.setEditedText.
|
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(android.graphics.Bitmap 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(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.
|
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.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(android.graphics.Bitmap 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, android.graphics.RectF 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.lang.String getTextToEdit()
getTextToEdit
in interface InplaceEditable
public void setEditedText(java.lang.String newText)
setEditedText
in interface InplaceEditable
newText
- The new text of this item.public android.graphics.RectF getEditRect(DiagramItem item, android.graphics.PointF pointerPosition)
getEditRect
in interface InplaceEditable
item
- The TreeViewNode
whose item's text will be edited.mousePosition
- A PointF instance specifying the current pointer position.public TreeViewItem getParent()
TreeViewItem
instance.public Font getLabelFont()
Font
class.
The default value is null
.public void setLabelFont(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