|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.gui.control.ControlImpl info.magnolia.cms.gui.control.Tree
public class Tree
Field Summary | |
---|---|
static int |
ACTION_ACTIVATE
|
static int |
ACTION_COPY
|
static int |
ACTION_DEACTIVATE
|
static int |
ACTION_MOVE
|
static java.lang.String |
DEFAULT_ICON
|
static java.lang.String |
DEFAULT_ICON_CONTENT
|
static java.lang.String |
DEFAULT_ICON_CONTENTNODE
|
static java.lang.String |
DEFAULT_ICON_NODEDATA
|
static java.lang.String |
DOCROOT
|
static java.lang.String |
ICONDOCROOT
|
static java.lang.String |
ITEM_TYPE_NODEDATA
Deprecated. since 4.4, use ItemType.MGNL_NODE_DATA instead |
static int |
PASTETYPE_ABOVE
|
static int |
PASTETYPE_BELOW
|
static int |
PASTETYPE_LAST
|
static int |
PASTETYPE_SUB
|
Fields inherited from class info.magnolia.cms.gui.control.ControlImpl |
---|
BUTTONSTATE_DISABLED, BUTTONSTATE_MOUSEDOWN, BUTTONSTATE_MOUSEOVER, BUTTONSTATE_NORMAL, BUTTONSTATE_PUSHED, BUTTONTYPE_CHECKBOX, BUTTONTYPE_PUSHBUTTON, BUTTONTYPE_RADIO, CSSCLASS_CONTROLBAR, CSSCLASS_CONTROLBARSMALL, CSSCLASS_CONTROLBUTTON, CSSCLASS_CONTROLBUTTONSMALL, ENCODING_BASE64, ENCODING_NO, ENCODING_UNIX, RICHEDIT_FCK, RICHEDIT_KUPU, RICHEDIT_NONE, VALUETYPE_MULTIPLE, VALUETYPE_SINGLE |
Constructor Summary | |
---|---|
Tree(java.lang.String repository,
javax.servlet.http.HttpServletRequest request)
Deprecated. use Tree(name, repository) instead |
|
Tree(java.lang.String name,
java.lang.String repository)
Constructor. |
|
Tree(java.lang.String name,
java.lang.String repository,
javax.servlet.http.HttpServletRequest request)
Deprecated. don't pass the request |
Method Summary | |
---|---|
void |
addColumn(TreeColumn tc)
|
void |
addFunctionBarItem(FunctionBarItem item)
|
void |
addFunctionBarItemFromContextMenu(java.lang.String itemName)
Convenience method to add a function bar item that already exists in the context menu. |
void |
addIcon(java.lang.String typeName,
java.lang.String icon)
|
void |
addItemType(ItemType s)
Add a itemType to the itemTypes that will be shown in this branch. |
void |
addItemType(java.lang.String s)
Deprecated. pass the icon to use as a second parameter |
void |
addItemType(java.lang.String type,
java.lang.String icon)
Adds an itemType to the list of existing types and associates an icon with it. |
void |
addItemType(java.lang.String type,
java.lang.String icon,
boolean strict)
Adds an itemType to the list of existing types and associates an icon with it. |
void |
addMenuItem(ContextMenuItem item)
|
void |
addSeparator()
Add a separator line between context menu items. |
protected java.util.Iterator |
collectRenderedItems(Content parentNode,
java.lang.String itemType)
|
java.lang.String |
createNode(java.lang.String itemType)
|
java.lang.String |
createNode(java.lang.String label,
java.lang.String itemType)
Creates a new node (either NodeData or Content ) with the specified name (label)
and type. |
java.lang.String |
getColumnResizer()
|
java.util.List |
getColumns()
|
TreeColumn |
getColumns(int col)
|
boolean |
getDrawShifter()
|
FunctionBar |
getFunctionBar()
|
int |
getHeight()
|
HierarchyManager |
getHierarchyManager()
|
java.lang.String |
getHtml()
Returns an empty string. |
java.lang.String |
getHtmlBranch()
|
java.lang.String |
getHtmlChildren()
|
java.lang.String |
getHtmlChildrenOfOneType(Content parentNode,
java.lang.String itemType)
|
java.lang.String |
getHtmlFooter()
|
java.lang.String |
getHtmlHeader()
|
protected void |
getHtmlOfSingleItem(java.lang.StringBuffer html,
Content parentNode,
java.lang.String itemType,
java.lang.Object item)
|
protected java.lang.String |
getIcon(Content node,
NodeData nodedata,
java.lang.String itemType)
|
protected java.lang.String |
getIcon(java.lang.String itemType)
|
java.lang.String |
getIconContentNode()
|
java.lang.String |
getIconNodeData()
|
java.lang.String |
getIconOndblclick()
|
java.lang.String |
getIconPage()
|
int |
getIndentionWidth()
|
java.util.List |
getItemTypes()
|
java.lang.String |
getJavascriptTree()
|
ContextMenu |
getMenu()
|
protected int |
getPaddingLeft(Content parentNode)
|
java.lang.String |
getPath()
|
protected java.lang.String |
getPathCurrent()
|
java.lang.String |
getPathOpen()
|
java.lang.String |
getPathSelected()
|
java.lang.String |
getRepository()
|
java.lang.String |
getRootPath()
|
java.lang.String |
getShifterCollapse()
|
java.lang.String |
getShifterEmpty()
|
java.lang.String |
getShifterExpand()
|
boolean |
getSnippetMode()
|
java.util.Comparator |
getSortComparator()
|
protected java.lang.String |
getUniqueLabel(java.lang.String label)
|
protected boolean |
hasSub(Content c,
java.lang.String type)
|
boolean |
isBrowseMode()
|
protected void |
onGetHtmlOfSingleItem(java.lang.StringBuffer html,
Content parentNode,
java.lang.String itemType,
java.lang.Object item,
java.lang.String idPre)
|
protected java.util.Map |
populateTemplateParameters()
|
java.lang.String |
saveNodeData(java.lang.String nodeDataName,
java.lang.String value,
boolean isMeta)
|
java.lang.String |
saveNodeDataType(java.lang.String nodeDataName,
int type)
|
void |
setBrowseMode(boolean browseMode)
|
void |
setColumnResizer(java.lang.String src)
|
void |
setColums(java.util.List al)
Set the columns (for pages and content nodes only). |
void |
setDrawShifter(boolean b)
|
void |
setFunctionBar(FunctionBar functionBar)
|
void |
setHeight(int i)
|
void |
setIcon(java.lang.String typeName,
java.lang.String icon)
Deprecated. since 4.4 use addIcon(String, String) instead. |
void |
setIconContentNode(java.lang.String src)
Deprecated. since 4.4, use addIcon(ItemType.CONTENTNODE.getSystemName(), src) instead |
void |
setIconNodeData(java.lang.String src)
Deprecated. since 4.4, use addIcon(ItemType.MGNL_NODE_DATA, src) instead |
void |
setIconOndblclick(java.lang.String s)
Set the double click event of the icon. |
void |
setIconPage(java.lang.String src)
Deprecated. since 4.4, use addIcon(ItemType.CONTENT.getSystemName(), src) instead |
void |
setIndentionWidth(int i)
|
void |
setJavascriptTree(java.lang.String variableName)
Set the name of the javascript tree object. |
void |
setMenu(ContextMenu menu)
|
protected void |
setPathCurrent(java.lang.String s)
|
void |
setPathOpen(java.lang.String s)
|
void |
setPathSelected(java.lang.String s)
Sets which path will be selected (and opened - overwrites pathOpen). |
void |
setRepository(java.lang.String s)
|
void |
setRootPath(java.lang.String rootPath)
|
void |
setShifterCollapse(java.lang.String src)
Set the shifter image (collapse branch). |
void |
setShifterEmpty(java.lang.String src)
Set the shifter image when no children are available (not expandable). |
void |
setShifterExpand(java.lang.String src)
Set the shifter image (expand branch). |
void |
setSnippetMode(boolean b)
Sets if only a snippet (requested branch) shall be returnde or including the surounding html (tree header, js/css links etc). |
void |
setSortComparator(java.util.Comparator sortComperator)
|
protected boolean |
showNode(Content node,
NodeData nodedata,
java.lang.String itemType)
Override to make special exclusions. |
Methods inherited from class info.magnolia.cms.gui.control.ControlImpl |
---|
escapeHTML, getCssClass, getCssStyles, getCssStyles, getCssStyles, getEncoding, getEvents, getHtmlCssClass, getHtmlCssStyles, getHtmlEvents, getHtmlId, getHtmlInter, getHtmlInter, getHtmlPost, getHtmlPost, getHtmlPre, getHtmlPre, getHtmlSaveInfo, getId, getIsRichEditValue, getLabel, getName, getNodeCollectionName, getNodeCollectionName, getNodeName, getNodeName, getRequest, getSaveInfo, getType, getValue, getValues, getValueType, getWebsiteNode, println, setCssClass, setCssStyles, setCssStyles, setEncoding, setEvent, setEvent, setEvents, setHtmlInter, setHtmlPost, setHtmlPre, setId, setIsRichEditValue, setLabel, setName, setNodeCollectionName, setNodeName, setPath, setRequest, setSaveInfo, setType, setType, setValue, setValues, setValueType, setWebsiteNode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DOCROOT
public static final java.lang.String ICONDOCROOT
public static final java.lang.String DEFAULT_ICON
public static final java.lang.String DEFAULT_ICON_CONTENT
public static final java.lang.String DEFAULT_ICON_CONTENTNODE
public static final java.lang.String DEFAULT_ICON_NODEDATA
@Deprecated public static final java.lang.String ITEM_TYPE_NODEDATA
public static final int ACTION_MOVE
public static final int ACTION_COPY
public static final int ACTION_ACTIVATE
public static final int ACTION_DEACTIVATE
public static final int PASTETYPE_ABOVE
public static final int PASTETYPE_BELOW
public static final int PASTETYPE_SUB
public static final int PASTETYPE_LAST
Constructor Detail |
---|
@Deprecated public Tree(java.lang.String name, java.lang.String repository, javax.servlet.http.HttpServletRequest request)
public Tree(java.lang.String name, java.lang.String repository)
name
- name of the tree (name of the treehandler)repository
- name of the repository (i.e. "website", "users")@Deprecated public Tree(java.lang.String repository, javax.servlet.http.HttpServletRequest request)
repository
- request
- Method Detail |
---|
public void setRepository(java.lang.String s)
public java.lang.String getRepository()
public void setPathOpen(java.lang.String s)
public java.lang.String getPathOpen()
public void setPathSelected(java.lang.String s)
s
- public java.lang.String getPathSelected()
public java.lang.String getPath()
getPath
in class ControlImpl
protected void setPathCurrent(java.lang.String s)
protected java.lang.String getPathCurrent()
public void setIndentionWidth(int i)
public int getIndentionWidth()
public java.util.List getItemTypes()
@Deprecated public void addItemType(java.lang.String s)
public void addItemType(java.lang.String type, java.lang.String icon)
addItemType(String, String, boolean)
type
- The item typeicon
- The icon used to display items of given typeaddItemType(String, String, boolean)
public void addItemType(java.lang.String type, java.lang.String icon, boolean strict)
type
- The item typeicon
- The icon used to display items of given typestrict
- Flag specifying whether or not to show also items of sub type of given typepublic void addItemType(ItemType s)
s
- itemType (one of: ItemType.CONTENT, ItemType.CONTENTNODE)@Deprecated public void setIconPage(java.lang.String src)
src
- source of the imagepublic java.lang.String getIconPage()
@Deprecated public void setIconContentNode(java.lang.String src)
src
- source of the imagepublic java.lang.String getIconContentNode()
@Deprecated public void setIconNodeData(java.lang.String src)
src
- source of the imagepublic java.lang.String getIconNodeData()
protected java.lang.String getIcon(java.lang.String itemType)
protected java.lang.String getIcon(Content node, NodeData nodedata, java.lang.String itemType)
@Deprecated public void setIcon(java.lang.String typeName, java.lang.String icon)
addIcon(String, String)
instead.
public void addIcon(java.lang.String typeName, java.lang.String icon)
public void setIconOndblclick(java.lang.String s)
s
- javascriopt methodpublic java.lang.String getIconOndblclick()
public void setShifterExpand(java.lang.String src)
src
- source of the imagepublic java.lang.String getShifterExpand()
public void setShifterCollapse(java.lang.String src)
src
- source of the imagepublic java.lang.String getShifterCollapse()
public void setShifterEmpty(java.lang.String src)
src
- source of the imagepublic java.lang.String getShifterEmpty()
public void setDrawShifter(boolean b)
public boolean getDrawShifter()
public void setHeight(int i)
public int getHeight()
public void setColums(java.util.List al)
al
- list of TreeColumnspublic java.util.List getColumns()
public TreeColumn getColumns(int col)
public void addColumn(TreeColumn tc)
public void setJavascriptTree(java.lang.String variableName)
variableName
- public java.lang.String getJavascriptTree()
public void setSnippetMode(boolean b)
b
- true: snippet onlypublic boolean getSnippetMode()
public void setColumnResizer(java.lang.String src)
public java.lang.String getColumnResizer()
public java.lang.String createNode(java.lang.String itemType)
public java.lang.String createNode(java.lang.String label, java.lang.String itemType)
NodeData
or Content
) with the specified name (label)
and type.
label
- new node nameitemType
- new node typepublic java.lang.String saveNodeData(java.lang.String nodeDataName, java.lang.String value, boolean isMeta)
public java.lang.String saveNodeDataType(java.lang.String nodeDataName, int type)
protected java.lang.String getUniqueLabel(java.lang.String label)
label
-
public java.lang.String getHtml()
ControlImpl
getHtml
in interface Control
getHtml
in class ControlImpl
Control.getHtml()
public java.lang.String getHtmlHeader()
public java.lang.String getHtmlFooter()
protected java.util.Map populateTemplateParameters()
public java.lang.String getHtmlBranch()
public java.lang.String getHtmlChildren()
public java.lang.String getHtmlChildrenOfOneType(Content parentNode, java.lang.String itemType)
protected void getHtmlOfSingleItem(java.lang.StringBuffer html, Content parentNode, java.lang.String itemType, java.lang.Object item) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected void onGetHtmlOfSingleItem(java.lang.StringBuffer html, Content parentNode, java.lang.String itemType, java.lang.Object item, java.lang.String idPre)
protected java.util.Iterator collectRenderedItems(Content parentNode, java.lang.String itemType)
protected int getPaddingLeft(Content parentNode) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected boolean hasSub(Content c, java.lang.String type)
protected boolean showNode(Content node, NodeData nodedata, java.lang.String itemType)
node
- nodedata
- itemType
-
public void addMenuItem(ContextMenuItem item)
item
- ContextMenuItempublic void addFunctionBarItem(FunctionBarItem item)
item
- FunctionBarItempublic void addFunctionBarItemFromContextMenu(java.lang.String itemName)
public void addSeparator()
public ContextMenu getMenu()
public FunctionBar getFunctionBar()
public void setMenu(ContextMenu menu)
public void setFunctionBar(FunctionBar functionBar)
functionBar
- the function bar objectpublic boolean isBrowseMode()
public void setBrowseMode(boolean browseMode)
browseMode
- The browseMode to set.public HierarchyManager getHierarchyManager()
public java.util.Comparator getSortComparator()
public void setSortComparator(java.util.Comparator sortComperator)
public java.lang.String getRootPath()
public void setRootPath(java.lang.String rootPath)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |