|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.ui.painter.ControlPainter com.cc.framework.ui.painter.html.HtmlPainterBase com.cc.framework.ui.painter.html.HtmlMultiLevelSelectPainter
Painter for the multi level select control
Field Summary | |
private TreeNodeDataModel[] |
selectedNodes
The selected nodes in the tree hierarchy |
Fields inherited from class com.cc.framework.ui.painter.ControlPainter |
log |
Constructor Summary | |
HtmlMultiLevelSelectPainter(PainterContext painterContext,
MultiLevelSelectControl ctrl)
Constructor for HtmlSelectPainter |
Method Summary | |
private java.lang.StringBuffer |
appendNodes(TreeNodeDataModel node,
int level)
Appends the tree nodes as java scripting variables |
private void |
appendNodes(TreeNodeDataModel root,
java.util.List nodes,
boolean deep)
Adds the nodes of the given subtree to a list. |
protected JavaScript |
createClientScript()
Creates the Javascript needed to render the tree on the client |
protected org.apache.ecs.html.Option |
createEmptyOption(int level)
Creates the empty element for the given level |
protected OptionsIterator |
createIterator()
Creates an option iterator |
protected org.apache.ecs.html.Option |
createOption(TreeNodeDataModel node,
boolean isSelected)
Creates the option element for the given tree node |
protected org.apache.ecs.ConcreteElement |
doCreateColGroup()
Creates the HTML <colgroup> Element for the list |
protected org.apache.ecs.ConcreteElement |
doCreateDisplayElement()
Creates the element for display only. |
protected org.apache.ecs.ConcreteElement |
doCreateElement()
Creates the HTML-Element. |
protected org.apache.ecs.ConcreteElement |
doCreateSelect()
Creates the table of select elements |
protected org.apache.ecs.ConcreteElement |
doCreateSelect(int level)
Creates the select element for the given level |
protected MultiLevelSelectControl |
getCtrl()
Retrieves the control for this painter |
protected java.lang.String |
getJavaScriptName()
|
private java.util.List |
getLevelNodes(int level)
Returns the option list for the given level |
protected TreeNodeDataModel |
getLevelRoot(int level)
Returns the root node for the given level |
protected TreeNodeDataModel |
getRoot()
|
protected TreeNodeDataModel |
getSelectedNode()
|
protected TreeNodeDataModel |
getSelectedNode(int level)
returns the selected node for the given tree level |
protected java.lang.Object |
getValue()
Retrieves the selected tree node item |
protected boolean |
isSelectable(TreeNodeDataModel node)
Checks if the given node is selectable by the user |
private boolean |
selectNodes(TreeNodeDataModel root,
int childIndex,
java.lang.String key,
int level)
Retrieves all nodes on the selection path of the tree structure |
protected boolean |
showEmptyElement(int level)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private TreeNodeDataModel[] selectedNodes
Constructor Detail |
public HtmlMultiLevelSelectPainter(PainterContext painterContext, MultiLevelSelectControl ctrl)
painterContext
- The PainterContextctrl
- The Control to renderMethod Detail |
protected MultiLevelSelectControl getCtrl()
protected TreeNodeDataModel getRoot()
private boolean selectNodes(TreeNodeDataModel root, int childIndex, java.lang.String key, int level)
root
- the root of the treechildIndex
- the index of the root nodekey
- the key of the selected elementlevel
- the current tree level
true
when the given root node is in the
selection pathprotected TreeNodeDataModel getSelectedNode(int level)
level
- the tree level
null
when there is no node
selected for the given levelprotected TreeNodeDataModel getSelectedNode()
protected TreeNodeDataModel getLevelRoot(int level)
level
- the tree level
null
when the given level is not
selectedprivate void appendNodes(TreeNodeDataModel root, java.util.List nodes, boolean deep)
root
- root node of the subtreenodes
- the node listdeep
- when set to true
all nodes of the subtree will
be added to the list.private java.util.List getLevelNodes(int level)
level
- the level
protected org.apache.ecs.html.Option createEmptyOption(int level)
level
- the level
protected org.apache.ecs.html.Option createOption(TreeNodeDataModel node, boolean isSelected)
node
- the tree nodeisSelected
- indicates if the node is selected
protected org.apache.ecs.ConcreteElement doCreateSelect(int level)
level
- the level
protected org.apache.ecs.ConcreteElement doCreateColGroup()
protected org.apache.ecs.ConcreteElement doCreateSelect()
protected OptionsIterator createIterator()
protected org.apache.ecs.ConcreteElement doCreateDisplayElement()
protected org.apache.ecs.ConcreteElement doCreateElement()
ControlPainter
doCreateElement
in class ControlPainter
ControlPainter.doCreateElement()
protected java.lang.String getJavaScriptName()
protected JavaScript createClientScript()
private java.lang.StringBuffer appendNodes(TreeNodeDataModel node, int level)
node
- the nodelevel
- the tree level of the node for pretty printing
protected boolean isSelectable(TreeNodeDataModel node)
node
- the node to check
protected boolean showEmptyElement(int level)
protected java.lang.Object getValue()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |