Package org.netxms.client.datacollection
Class GraphFolder
- java.lang.Object
-
- org.netxms.client.datacollection.GraphFolder
-
public class GraphFolder extends Object
Virtual folder object for predefined graphs
-
-
Constructor Summary
Constructors Constructor Description GraphFolder(String name)Create new graph folder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFolder(GraphFolder f)Add sub-foldervoidaddGraph(GraphSettings g)Add graph to foldervoidclear()Clear folder (remove all children)Object[]getChildren()Get all child objects (subfolders and graphs) as an arrayStringgetDisplayName()Get display name (name with & shortcut marks removed)StringgetName()Get folder nameGraphFoldergetParent()Get parent folderbooleanhasChildren()Check if folder has child objectsbooleanhasParent()booleanremoveGraph(long id)Remove graph from the tree.voidsetParent(GraphFolder parent)Set parent folderStringtoString()voidupdateGraph(GraphSettings graph)Update graph in the tree
-
-
-
Constructor Detail
-
GraphFolder
public GraphFolder(String name)
Create new graph folder- Parameters:
name- folder name
-
-
Method Detail
-
clear
public void clear()
Clear folder (remove all children)
-
getName
public String getName()
Get folder name- Returns:
- folder name
-
getDisplayName
public String getDisplayName()
Get display name (name with & shortcut marks removed)- Returns:
- display name
-
getParent
public GraphFolder getParent()
Get parent folder- Returns:
- parent folder
-
setParent
public void setParent(GraphFolder parent)
Set parent folder- Parameters:
parent- new parent folder
-
hasParent
public boolean hasParent()
- Returns:
- true if folder has parent
-
getChildren
public Object[] getChildren()
Get all child objects (subfolders and graphs) as an array- Returns:
- array of all child objects
-
hasChildren
public boolean hasChildren()
Check if folder has child objects- Returns:
- true if folder has child objects
-
addGraph
public void addGraph(GraphSettings g)
Add graph to folder- Parameters:
g- graph to add
-
addFolder
public void addFolder(GraphFolder f)
Add sub-folder- Parameters:
f- sub-folder
-
updateGraph
public void updateGraph(GraphSettings graph)
Update graph in the tree- Parameters:
graph- new graph settings
-
removeGraph
public boolean removeGraph(long id)
Remove graph from the tree. Will also remove any empty folders.- Parameters:
id- graph settings ID- Returns:
- true if graph was removed
-
-