|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgdl.base.ContentNode
public class ContentNode
the data structure for a content node; contains a list of references and children as well as the content and the id. Furthermore, every node holds its representation on the piccolo canvas and the degree interval he gets assigned on a ring. The icon for every node is stored can be be retrieved if it is available.
Constructor Summary | |
---|---|
ContentNode(org.jdom.Element el,
java.lang.String nodeTag,
java.lang.String linkTag,
java.lang.String idAttribute,
java.lang.String connectionTypeAttribute,
java.lang.String defaultIconLocation,
boolean iconsAvailable,
java.lang.String defaultIcon,
java.lang.Object curSizeConfigSet)
|
Method Summary | |
---|---|
void |
addTemporaryChild(ContentNode c)
|
void |
addToTmpWeightOfChildren(int c)
a helper function to temporarly calculate the sum of all the node's children's sizes in the current graph |
java.lang.String |
getAttribute(java.lang.String attribute)
|
edu.umd.cs.piccolo.PNode |
getCanvasPNode()
|
int |
getCanvasPNodeIndex()
|
java.lang.String[] |
getChildren()
|
java.lang.String |
getContentAsString()
|
java.lang.String |
getIcon()
|
java.lang.String |
getId()
get the id of the Content Node |
float |
getLowerDegreeInterval()
|
float |
getNextPosDegree()
|
float |
getNextPosRadius()
|
float |
getPosDegree()
|
float |
getPosRadius()
|
java.lang.String[][] |
getReferences()
|
int |
getSize()
returns mapped pixel value of the node size according to the currently active size configuration set. |
int |
getSumOfWeight()
|
java.util.LinkedList |
getTemporaryChildren()
|
ContentNode |
getTemporaryFather()
|
int |
getTmpWeightOfChildren()
|
float |
getUpperDegreeInterval()
|
void |
setCanvasPNode(edu.umd.cs.piccolo.PNode p)
store the Node representation on the canvas |
void |
setCanvasPNodeIndex(int canvasPNodeIndex)
|
void |
setCurPos(float r,
float phi)
used to set the position of the node on the canvas in polar coordinates |
void |
setDegreeInterval(float _lower,
float _upper)
set the degree interval of a content node for the specific ring he gets rendered on. |
void |
setNextPos(float r,
float phi)
temporarly store a nodes position: it is moved there afterwards by the nodeMover |
void |
setSizeConfigSet(java.lang.Object sizeConfigSet)
set a new config set for the node size: the Config Set specifies how to map the size attribute values from the XML |
void |
setSumOfWeight(int sumOfWeight)
|
void |
setTemporaryFather(ContentNode c)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContentNode(org.jdom.Element el, java.lang.String nodeTag, java.lang.String linkTag, java.lang.String idAttribute, java.lang.String connectionTypeAttribute, java.lang.String defaultIconLocation, boolean iconsAvailable, java.lang.String defaultIcon, java.lang.Object curSizeConfigSet)
el
- a JDom Element containing the complete xml node elementnodeTag
- a String that is used as the tag for nodeslinkTag
- a String that is used as the tag vor connectionsidAttribute
- the attribute that is used as an identifier for nodes and referencesconnectionTypeAttribute
- the XML attribute used to specify the connection typedefaultIconLocation
- the default icon locationiconsAvailable
- boolean flag indicating whether to use icons or notdefaultIcon
- the default icon file to use if no icon exists for a nodecurSizeConfigSet
- Oject: can either be RangeConfigSet or SwitchConfigSet - the current rules for size mappingMethod Detail |
---|
public void setSizeConfigSet(java.lang.Object sizeConfigSet)
sizeConfigSet
- public java.lang.String getId()
public java.lang.String[] getChildren()
public java.lang.String[][] getReferences()
public java.lang.String getAttribute(java.lang.String attribute)
attribute
- - the XML attribute you want to know
public void setDegreeInterval(float _lower, float _upper)
_lower
- _upper
- public float getLowerDegreeInterval()
public float getUpperDegreeInterval()
public void addTemporaryChild(ContentNode c)
c
- a content node that temporarily is a child of the node in the current graphpublic java.util.LinkedList getTemporaryChildren()
public void addToTmpWeightOfChildren(int c)
c
- public int getTmpWeightOfChildren()
public void setTemporaryFather(ContentNode c)
c
- ContentNode that is the father of the node in the current treepublic ContentNode getTemporaryFather()
public void setCurPos(float r, float phi)
r
- phi
- public float getPosRadius()
public float getPosDegree()
public void setNextPos(float r, float phi)
r
- phi
- public float getNextPosRadius()
public float getNextPosDegree()
public void setCanvasPNode(edu.umd.cs.piccolo.PNode p)
p
- public edu.umd.cs.piccolo.PNode getCanvasPNode()
public java.lang.String getContentAsString()
public int getCanvasPNodeIndex()
public void setCanvasPNodeIndex(int canvasPNodeIndex)
public java.lang.String getIcon()
public int getSize()
public int getSumOfWeight()
public void setSumOfWeight(int sumOfWeight)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |