|
||||||||||
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 String |
DEFAULT_ICON
|
static String |
DEFAULT_ICON_CONTENT
|
static String |
DEFAULT_ICON_CONTENTNODE
|
static String |
DEFAULT_ICON_NODEDATA
|
static String |
DOCROOT
|
static String |
ICONDOCROOT
|
static 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
|
Constructor Summary | |
---|---|
Tree(String repository,
javax.servlet.http.HttpServletRequest request)
Deprecated. use Tree(name, repository) instead |
|
Tree(String name,
String repository)
Constructor. |
|
Tree(String name,
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(String itemName)
Convenience method to add a function bar item that already exists in the context menu. |
void |
addIcon(String typeName,
String icon)
|
void |
addItemType(ItemType s)
Add a itemType to the itemTypes that will be shown in this branch. |
void |
addItemType(String s)
Deprecated. pass the icon to use as a second parameter |
void |
addItemType(String type,
boolean strict)
|
void |
addItemType(String type,
String icon)
Adds an itemType to the list of existing types and associates an icon with it. |
void |
addItemType(String type,
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 Iterator |
collectRenderedItems(Content parentNode,
String itemType)
|
String |
createNode(String itemType)
|
String |
createNode(String label,
String itemType)
Creates a new node (either NodeData or Content ) with the specified name (label)
and type. |
String |
getColumnResizer()
|
List |
getColumns()
|
TreeColumn |
getColumns(int col)
|
boolean |
getDrawShifter()
|
FunctionBar |
getFunctionBar()
|
int |
getHeight()
|
HierarchyManager |
getHierarchyManager()
|
String |
getHtml()
Returns an empty string. |
String |
getHtmlBranch()
|
String |
getHtmlChildren()
|
String |
getHtmlChildrenOfOneType(Content parentNode,
String itemType)
|
String |
getHtmlFooter()
|
String |
getHtmlHeader()
|
protected void |
getHtmlOfSingleItem(StringBuffer html,
Content parentNode,
String itemType,
Object item)
|
protected String |
getIcon(Content node,
NodeData nodedata,
String itemType)
|
protected String |
getIcon(String itemType)
|
String |
getIconContentNode()
|
String |
getIconNodeData()
|
String |
getIconOndblclick()
|
String |
getIconPage()
|
int |
getIndentionWidth()
|
List |
getItemTypes()
|
String |
getJavascriptTree()
|
ContextMenu |
getMenu()
|
protected int |
getPaddingLeft(Content parentNode)
|
String |
getPath()
|
protected String |
getPathCurrent()
|
String |
getPathOpen()
|
String |
getPathSelected()
|
String |
getRepository()
|
String |
getRootPath()
|
String |
getShifterCollapse()
|
String |
getShifterEmpty()
|
String |
getShifterExpand()
|
boolean |
getSnippetMode()
|
Comparator |
getSortComparator()
|
protected String |
getUniqueLabel(String label)
|
protected boolean |
hasSub(Content c,
String type)
|
boolean |
isBrowseMode()
|
protected void |
onGetHtmlOfSingleItem(StringBuffer html,
Content parentNode,
String itemType,
Object item,
String idPre)
|
protected Map |
populateTemplateParameters()
|
String |
saveNodeData(String nodeDataName,
String value,
boolean isMeta)
|
String |
saveNodeDataType(String nodeDataName,
int type)
|
void |
setBrowseMode(boolean browseMode)
|
void |
setColumnResizer(String src)
|
void |
setColums(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(String typeName,
String icon)
Deprecated. since 4.4 use addIcon(String, String) instead. |
void |
setIconContentNode(String src)
Deprecated. since 4.4, use addIcon(ItemType.CONTENTNODE.getSystemName(), src) instead |
void |
setIconNodeData(String src)
Deprecated. since 4.4, use addIcon(ItemType.MGNL_NODE_DATA, src) instead |
void |
setIconOndblclick(String s)
Set the double click event of the icon. |
void |
setIconPage(String src)
Deprecated. since 4.4, use addIcon(ItemType.CONTENT.getSystemName(), src) instead |
void |
setIndentionWidth(int i)
|
void |
setJavascriptTree(String variableName)
Set the name of the javascript tree object. |
void |
setMenu(ContextMenu menu)
|
protected void |
setPathCurrent(String s)
|
void |
setPathOpen(String s)
|
void |
setPathSelected(String s)
Sets which path will be selected (and opened - overwrites pathOpen). |
void |
setRepository(String s)
|
void |
setRootPath(String rootPath)
|
void |
setShifterCollapse(String src)
Set the shifter image (collapse branch). |
void |
setShifterEmpty(String src)
Set the shifter image when no children are available (not expandable). |
void |
setShifterExpand(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(Comparator sortComperator)
|
protected boolean |
showNode(Content node,
NodeData nodedata,
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 String DOCROOT
public static final String ICONDOCROOT
public static final String DEFAULT_ICON
public static final String DEFAULT_ICON_CONTENT
public static final String DEFAULT_ICON_CONTENTNODE
public static final String DEFAULT_ICON_NODEDATA
@Deprecated public static final 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(String name, String repository, javax.servlet.http.HttpServletRequest request)
public Tree(String name, String repository)
name
- name of the tree (name of the treehandler)repository
- name of the repository (i.e. "website", "users")@Deprecated public Tree(String repository, javax.servlet.http.HttpServletRequest request)
repository
- request
- Method Detail |
---|
public void setRepository(String s)
public String getRepository()
public void setPathOpen(String s)
public String getPathOpen()
public void setPathSelected(String s)
s
- public String getPathSelected()
public String getPath()
getPath
in class ControlImpl
protected void setPathCurrent(String s)
protected String getPathCurrent()
public void setIndentionWidth(int i)
public int getIndentionWidth()
public List getItemTypes()
@Deprecated public void addItemType(String s)
public void addItemType(String type, 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(String type, boolean strict)
public void addItemType(String type, 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(String src)
src
- source of the imagepublic String getIconPage()
@Deprecated public void setIconContentNode(String src)
src
- source of the imagepublic String getIconContentNode()
@Deprecated public void setIconNodeData(String src)
src
- source of the imagepublic String getIconNodeData()
protected String getIcon(String itemType)
protected String getIcon(Content node, NodeData nodedata, String itemType)
@Deprecated public void setIcon(String typeName, String icon)
addIcon(String, String)
instead.
public void addIcon(String typeName, String icon)
public void setIconOndblclick(String s)
s
- javascriopt methodpublic String getIconOndblclick()
public void setShifterExpand(String src)
src
- source of the imagepublic String getShifterExpand()
public void setShifterCollapse(String src)
src
- source of the imagepublic String getShifterCollapse()
public void setShifterEmpty(String src)
src
- source of the imagepublic String getShifterEmpty()
public void setDrawShifter(boolean b)
public boolean getDrawShifter()
public void setHeight(int i)
public int getHeight()
public void setColums(List al)
al
- list of TreeColumnspublic List getColumns()
public TreeColumn getColumns(int col)
public void addColumn(TreeColumn tc)
public void setJavascriptTree(String variableName)
variableName
- public String getJavascriptTree()
public void setSnippetMode(boolean b)
b
- true: snippet onlypublic boolean getSnippetMode()
public void setColumnResizer(String src)
public String getColumnResizer()
public String createNode(String itemType)
public String createNode(String label, String itemType)
NodeData
or Content
) with the specified name (label)
and type.
label
- new node nameitemType
- new node typepublic String saveNodeData(String nodeDataName, String value, boolean isMeta)
public String saveNodeDataType(String nodeDataName, int type)
protected String getUniqueLabel(String label)
label
-
public String getHtml()
ControlImpl
getHtml
in interface Control
getHtml
in class ControlImpl
Control.getHtml()
public String getHtmlHeader()
public String getHtmlFooter()
protected Map populateTemplateParameters()
public String getHtmlBranch()
public String getHtmlChildren()
public String getHtmlChildrenOfOneType(Content parentNode, String itemType)
protected void getHtmlOfSingleItem(StringBuffer html, Content parentNode, String itemType, Object item) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected void onGetHtmlOfSingleItem(StringBuffer html, Content parentNode, String itemType, Object item, String idPre)
protected Iterator collectRenderedItems(Content parentNode, String itemType)
protected int getPaddingLeft(Content parentNode) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected boolean hasSub(Content c, String type)
protected boolean showNode(Content node, NodeData nodedata, String itemType)
node
- nodedata
- itemType
-
public void addMenuItem(ContextMenuItem item)
item
- ContextMenuItempublic void addFunctionBarItem(FunctionBarItem item)
item
- FunctionBarItempublic void addFunctionBarItemFromContextMenu(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 Comparator getSortComparator()
public void setSortComparator(Comparator sortComperator)
public String getRootPath()
public void setRootPath(String rootPath)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |