public class TWebTree extends java.lang.Object implements twaver.base.obfuscate.view.Tree, TWebView
Constructor and Description |
---|
TWebTree()
Create a webtree.
|
TWebTree(TDataBox box)
Create a webtree and connect to the given databox.
|
Modifier and Type | Method and Description |
---|---|
void |
addVisibleFilter(VisibleFilter filter)
Add a visible filter into this webtree.
|
ChildrenSortableFilter |
getChildrenSortableFilter()
Gets the children sortable filter for this webtree.
|
TDataBox |
getDataBox()
Get the connected data box.
|
java.lang.String |
getDataBoxIconURL()
Get databox webtree icon url.
|
Generator |
getElementBodyColorGenerator()
Returns the element body color generator for this tree.
|
Generator |
getElementCustomAttributeGenerator() |
Generator |
getElementLabelGenerator()
Gets generator for displaying the label of element on the webtree,
for example, the tree node label, the tree node label, etc.
|
Generator |
getElementStateOutlineColorGenerator()
Returns the element state outline color generator for this tree.
|
java.util.Comparator |
getSortComparator()
Get comparator for webtree nodes sorting.
|
java.lang.String |
getType() |
java.util.List |
getVisibleFilters()
Gets all the visible filters that added to this tree.
|
java.lang.String |
getWebImageFilePath() |
java.lang.String |
getWebImageUrlPrefix() |
boolean |
isChildrenSortable(Element parentElement) |
boolean |
isIconVisible()
Checks whether webtree node icon of all nodes are visible.
|
boolean |
isImageCache() |
boolean |
isShowPlainIcon()
Checks whether webtree node icon of all nodes are visible.
|
boolean |
isVisible(Element element)
Check whether given element is visible on webtree.
|
void |
removeVisibleFilter(VisibleFilter filter)
Remove a visible filter from this webtree.
|
void |
setChildrenSortableFilter(ChildrenSortableFilter childrenSortableFilter)
Sets the children sortable filter for this webtree.
|
void |
setDataBox(TDataBox dataBox)
Set the connected data box.
|
void |
setDataBoxIconURL(java.lang.String dataBoxIconURL)
Set databox webtree icon url.
|
void |
setElementBodyColorGenerator(Generator elementBodyColorGenerator)
Sets a new element body color generator for this tree.
|
void |
setElementCustomAttributeGenerator(Generator elementCustomAttributeGenerator) |
void |
setElementLabelGenerator(Generator elementLabelGenerator)
Sets generator for displaying the label of element on the webtree,
for example, the tree node label, the tree node label, etc.
|
void |
setElementStateOutlineColorGenerator(Generator elementOutlineColorGenerator)
Sets a new element state outline color generator for this tree.
|
void |
setIconVisible(boolean isIconVisible)
Determines whether webtree icon is visible.
|
void |
setImageCache(boolean imageCache) |
void |
setShowPlainIcon(boolean showPlainIcon)
Determines whether webtree icon is visible.
|
void |
setSortComparator(java.util.Comparator sortComparator)
Set comparator for webtree nodes sorting.
|
void |
setType(java.lang.String type) |
void |
setWebImageFilePath(java.lang.String webImageFilePath) |
void |
setWebImageUrlPrefix(java.lang.String webImageUrlPrefix) |
java.lang.String |
toJSON() |
java.lang.String |
toJSON(Element root,
boolean recursive,
boolean loadSubNetwork)
Export the JSON of TWebTree for web.
|
java.lang.String |
toXML() |
java.lang.String |
toXML(Element root,
boolean recursive,
boolean loadSubNetwork) |
void |
updateTViewUI()
Uses the method to update TView's UI.
|
public TWebTree()
public TWebTree(TDataBox box)
box
- TDataBox databox to be connectedpublic boolean isShowPlainIcon()
isShowPlainIcon
in interface twaver.base.obfuscate.view.Tree
setIconVisible(boolean)
public void setShowPlainIcon(boolean showPlainIcon)
setShowPlainIcon
in interface twaver.base.obfuscate.view.Tree
isIconVisible
- boolean true if show tree icon,
false otherwise.isIconVisible
public Generator getElementBodyColorGenerator()
getElementBodyColorGenerator
in interface twaver.base.obfuscate.view.Tree
setElementBodyColorGenerator(Generator)
,
TUIManager.getElementBodyColorGenerator()
public void setElementBodyColorGenerator(Generator elementBodyColorGenerator)
setElementBodyColorGenerator
in interface twaver.base.obfuscate.view.Tree
elementBodyColorGenerator
- a new element body color generator for this tree.getElementBodyColorGenerator()
,
TUIManager.getElementBodyColorGenerator()
public Generator getElementStateOutlineColorGenerator()
getElementStateOutlineColorGenerator
in interface twaver.base.obfuscate.view.Tree
setElementStateOutlineColorGenerator(Generator)
,
TUIManager.getElementStateOutlineColorGenerator()
public void setElementStateOutlineColorGenerator(Generator elementOutlineColorGenerator)
setElementStateOutlineColorGenerator
in interface twaver.base.obfuscate.view.Tree
elementOutlineColorGenerator
- a new element state outline
color generator for this tree.#getElementSelectColorGenerator()
,
TUIManager.setElementStateOutlineColorGenerator(Generator)
public boolean isVisible(Element element)
isVisible
in interface twaver.base.obfuscate.view.Tree
element
- Element an element to be checkedaddVisibleFilter(twaver.VisibleFilter)
public java.util.List getVisibleFilters()
twaver.base.obfuscate.view.Tree
getVisibleFilters
in interface twaver.base.obfuscate.view.Tree
public void addVisibleFilter(VisibleFilter filter)
addVisibleFilter
in interface twaver.base.obfuscate.view.Tree
filter
- VisibleFilter the new visible filter.removeVisibleFilter(twaver.VisibleFilter)
public void removeVisibleFilter(VisibleFilter filter)
removeVisibleFilter
in interface twaver.base.obfuscate.view.Tree
filter
- VisibleFilter the filter will removed.addVisibleFilter(twaver.VisibleFilter)
public void setDataBox(TDataBox dataBox)
setDataBox
in interface TView
box
- TDataBox the data box to be connected to the treegetDataBox()
public TDataBox getDataBox()
getDataBox
in interface TView
setDataBox(twaver.TDataBox)
public void updateTViewUI()
TView
updateTViewUI
in interface TView
public java.lang.String getDataBoxIconURL()
getDataBoxIconURL
in interface twaver.base.obfuscate.view.Tree
setDataBoxIconURL(String)
public void setDataBoxIconURL(java.lang.String dataBoxIconURL)
setDataBoxIconURL
in interface twaver.base.obfuscate.view.Tree
boxIconURL
- the new databox icon urlgetDataBoxIconURL()
public java.util.Comparator getSortComparator()
getSortComparator
in interface twaver.base.obfuscate.view.Tree
setSortComparator(java.util.Comparator)
public void setSortComparator(java.util.Comparator sortComparator)
setSortComparator
in interface twaver.base.obfuscate.view.Tree
sortComparator
- Comparator comparator for sortgetSortComparator()
public boolean isChildrenSortable(Element parentElement)
public ChildrenSortableFilter getChildrenSortableFilter()
getChildrenSortableFilter
in interface twaver.base.obfuscate.view.Tree
ChildrenSortableFilter
public void setChildrenSortableFilter(ChildrenSortableFilter childrenSortableFilter)
setChildrenSortableFilter
in interface twaver.base.obfuscate.view.Tree
childrenSortableFilter
- the children sortable filter for this tree.ChildrenSortableFilter
public boolean isIconVisible()
isIconVisible
in interface twaver.base.obfuscate.view.Tree
setIconVisible(boolean)
public void setIconVisible(boolean isIconVisible)
setIconVisible
in interface twaver.base.obfuscate.view.Tree
isIconVisible
- boolean true if show tree icon,
false otherwise.isIconVisible
public Generator getElementLabelGenerator()
getElementLabelGenerator
in interface twaver.base.obfuscate.view.Tree
setElementLabelGenerator(twaver.Generator)
public void setElementLabelGenerator(Generator elementLabelGenerator)
setElementLabelGenerator
in interface twaver.base.obfuscate.view.Tree
elementLabelGenerator
- Generator a generator used to
create element label text value for each element.getElementLabelGenerator()
public java.lang.String toJSON()
public java.lang.String toJSON(Element root, boolean recursive, boolean loadSubNetwork)
root
- JSON export form the root Element.And if @param root isn't the root Element of the tree, the @param root must be a TSubNetworkrecursive
- loadSubNetwork
- public java.lang.String toXML()
public java.lang.String toXML(Element root, boolean recursive, boolean loadSubNetwork)
public boolean isImageCache()
public void setImageCache(boolean imageCache)
public java.lang.String getWebImageUrlPrefix()
public void setWebImageUrlPrefix(java.lang.String webImageUrlPrefix)
public java.lang.String getWebImageFilePath()
public void setWebImageFilePath(java.lang.String webImageFilePath)
public Generator getElementCustomAttributeGenerator()
public void setElementCustomAttributeGenerator(Generator elementCustomAttributeGenerator)
public void setType(java.lang.String type)
Copyright © 2002 - 2010 Serva Software. All Rights Reserved.