|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cocoon.forms.formmodel.AbstractWidget
org.apache.cocoon.forms.formmodel.tree.Tree
public class Tree
A tree widget, heavily inspired by Swing's JTree.
| Nested Class Summary | |
|---|---|
static interface |
Tree.ActionHandler
|
| Field Summary | |
|---|---|
static int |
MULTIPLE_SELECTION
|
static int |
SINGLE_SELECTION
|
| Fields inherited from class org.apache.cocoon.forms.formmodel.AbstractWidget |
|---|
wasValid |
| Fields inherited from interface org.apache.cocoon.forms.formmodel.Widget |
|---|
PATH_SEPARATOR |
| Constructor Summary | |
|---|---|
protected |
Tree(TreeDefinition definition)
|
| Method Summary | |
|---|---|
void |
addSelectionPath(TreePath path)
|
void |
addSelectionPaths(TreePath[] paths)
|
void |
addTreeSelectionListener(TreeSelectionListener listener)
|
void |
broadcastEvent(WidgetEvent event)
Broadcast an event previously queued by this widget to its event listeners. |
void |
clearSelection()
|
void |
collapseAll()
|
void |
collapsePath(TreePath path)
|
void |
expandAll()
|
void |
expandPath(TreePath path)
|
protected void |
generateItemSaxFragment(ContentHandler contentHandler,
Locale locale)
Generates nested additional content nested inside the main element for this widget which is generated by AbstractWidget.generateSaxFragment(ContentHandler, Locale)
The implementation on the AbstractWidget level inserts no additional XML. |
WidgetDefinition |
getDefinition()
Concrete subclasses should allow access to their underlaying Definition through this method. |
TreeModel |
getModel()
|
int |
getSelectionCount()
|
TreePath |
getSelectionPath()
|
TreePath[] |
getSelectionPaths()
|
Widget |
getWidgetForPath(TreePath path)
|
protected String |
getXMLElementName()
The XML element name used in AbstractWidget.generateSaxFragment(ContentHandler, Locale)
to produce the wrapping element for all the XML-instance-content of this Widget. |
boolean |
isCollapsed(TreePath path)
|
boolean |
isExpanded(TreePath path)
|
boolean |
isPathSelected(TreePath path)
|
boolean |
isRootVisible()
|
boolean |
isSelectionEmpty()
|
boolean |
isVisible(TreePath path)
Returns true if the value identified by path is currently viewable, which means it is either the root or all of its parents are expanded. |
void |
makeVisible(TreePath path)
|
void |
readFromRequest(FormContext formContext)
Lets this widget read its data from a request. |
void |
removeSelectionPath(TreePath path)
|
void |
removeSelectionPaths(TreePath[] paths)
|
void |
removeTreeSelectionListener(TreeSelectionListener listener)
|
void |
setExpandsSelectedPath(boolean value)
|
void |
setModel(TreeModel model)
|
void |
setRootVisible(boolean visible)
|
void |
setSelectionModel(int model)
|
void |
setSelectionPath(TreePath path)
|
void |
setSelectionPaths(TreePath[] paths)
|
| Methods inherited from class org.apache.cocoon.forms.formmodel.AbstractWidget |
|---|
addValidator, generateDisplayData, generateLabel, generateSaxFragment, getAttribute, getChild, getCombinedState, getForm, getFullName, getId, getLocation, getName, getParent, getRequestParameterName, getState, getValue, getWidget, getXMLElementAttributes, initialize, isRequired, isValid, lookupWidget, removeAttribute, removeValidator, setAttribute, setParent, setState, setValue, toString, validate, widgetNameChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int SINGLE_SELECTION
public static final int MULTIPLE_SELECTION
| Constructor Detail |
|---|
protected Tree(TreeDefinition definition)
| Method Detail |
|---|
public WidgetDefinition getDefinition()
AbstractWidgetnull they should also organize
own implementations of AbstractWidget.getId(), AbstractWidget.getLocation(),
AbstractWidget.validate(), AbstractWidget.generateLabel(ContentHandler) and
AbstractWidget.generateDisplayData(ContentHandler) to avoid NPE's.
getDefinition in interface WidgetgetDefinition in class AbstractWidgetWidgetDefinition.createInstance())protected String getXMLElementName()
AbstractWidgetAbstractWidget.generateSaxFragment(ContentHandler, Locale)
to produce the wrapping element for all the XML-instance-content of this Widget.
getXMLElementName in class AbstractWidget
protected void generateItemSaxFragment(ContentHandler contentHandler,
Locale locale)
throws SAXException
AbstractWidgetAbstractWidget.generateSaxFragment(ContentHandler, Locale)
The implementation on the AbstractWidget level inserts no additional XML.
Subclasses need to override to insert widget specific content.
generateItemSaxFragment in class AbstractWidgetcontentHandler - to send the SAX events tolocale - in which context potential content needs to be put.
SAXExceptionpublic void readFromRequest(FormContext formContext)
Widget
public TreeModel getModel()
public void setModel(TreeModel model)
public void setSelectionModel(int model)
public int getSelectionCount()
public TreePath getSelectionPath()
public TreePath[] getSelectionPaths()
public boolean isPathSelected(TreePath path)
public boolean isSelectionEmpty()
public void setSelectionPath(TreePath path)
public void setSelectionPaths(TreePath[] paths)
public void addSelectionPath(TreePath path)
public void addSelectionPaths(TreePath[] paths)
public void removeSelectionPath(TreePath path)
public void removeSelectionPaths(TreePath[] paths)
public void clearSelection()
public void addTreeSelectionListener(TreeSelectionListener listener)
public void removeTreeSelectionListener(TreeSelectionListener listener)
public boolean isCollapsed(TreePath path)
public boolean isExpanded(TreePath path)
public boolean isVisible(TreePath path)
public void makeVisible(TreePath path)
public boolean isRootVisible()
public void setRootVisible(boolean visible)
public void collapsePath(TreePath path)
public void expandPath(TreePath path)
public void collapseAll()
public void expandAll()
public void setExpandsSelectedPath(boolean value)
public Widget getWidgetForPath(TreePath path)
public void broadcastEvent(WidgetEvent event)
AbstractWidgetUnsupportedOperationException.
Concrete subclass widgets need to override when supporting event broadcasting.
broadcastEvent in interface WidgetbroadcastEvent in class AbstractWidget
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||