Package org
Class AttributeHelper
java.lang.Object
org.AttributeHelper
- All Implemented Interfaces:
HelperClass
public class AttributeHelper extends Object implements HelperClass
Attribute Helper Class - Makes it more easy to work with graph/node
attributes.
- Version:
- $Revision: 1.129.2.1.2.1 $
- Author:
- Christian Klukas
-
Field Summary
Fields Modifier and Type Field Description static String
attributeSeparator
static String
id_ttestCircleSize
static Color[]
knownColors
static String
preFilePath
-
Constructor Summary
Constructors Constructor Description AttributeHelper()
-
Method Summary
Modifier and Type Method Description static void
addAttributeFolder(Attributable attributable, String path)
static void
addAttributeFolder(Attributable attributable, String path, boolean overwrite)
static CoordinateAttribute
addEdgeBend(Edge edge, double x, double y)
static CoordinateAttribute
addEdgeBend(Edge edge, double x, double y, boolean safeAdd)
static void
addEdgeBend(Edge edge, Vector2d point)
static void
addEdgeBends(Edge edge, Collection<Vector2d> points)
static boolean
addEdgeShape(String description, String className)
static void
copyReplaceStringAttribute(Attributable a, String path, String name, String copyTo, String searchString, String replaceString)
static boolean
deleteAttribute(Attributable attributable, String path, String name)
Removes a single attribute or a number of attributes from the Attributable.static String
formatNumber(double d, String pattern)
static String
getArrowhead(Edge edge)
static double
getArrowSize(Edge edge)
static String
getArrowtail(Edge edge)
static Attribute
getAttribute(Attributable attributable, String attributeName)
static Object
getAttributeValue(Attributable attributable, String path, String attributeName, Object defaultValue, Object resultType)
static Object
getAttributeValue(Attributable attributable, String path, String attributeName, Object defaultValue, Object resultType, boolean setDefaultIfMissing)
Return an Attribute value, if not present, return the defaultValue.static Set<Object>
getAttributeValueSet(Collection<Attributable> attributables, String path, String attributeName, Object defaultValue, Object resultType, boolean setDefaultIfMissing)
static Color
getColorFrom3floatValues0to1(String color, Color ifUnkown)
static Color
getColorFromAttribute(Attributable attr, String path, String name, Color defaultValue)
static Color
getColorFromName(String name, Color ifUnkown)
static String
getColorName(Color attrColor)
static float[]
getDashInfo(Edge edge)
static Date
getDateFromString(String value)
static String
getDateString(Date date)
If date is null, the current date is used!static String
getDefaultAttributeDescriptionFor(String id, String tabName, Attribute a)
static ImageIcon
getDefaultAttributeIconFor(String id)
static CollectionAttribute
getDefaultGraphicsAttributeForEdge(Color colArrow, Color colLine, boolean directed)
static CollectionAttribute
getDefaultGraphicsAttributeForKeggNode(double x, double y)
static CollectionAttribute
getDefaultGraphicsAttributeForNode(double x, double y)
static CollectionAttribute
getDefaultGraphicsAttributeForNode(Vector2d position)
static double
getDepth(Node node, double defaultReturn, boolean setDefault)
static ArrayList<CoordinateAttribute>
getEdgeBendCoordinateAttributes(Edge edge)
static ArrayList<Vector2d>
getEdgeBends(Edge edge)
static String
getEdgeBendStyle(Edge edge)
static HashMap<String,String>
getEdgeShapes()
static String
getEncodedUrl(String input)
static Color
getFillColor(Attributable attributable)
Returns the fill color of a givenAtttibutable
.static double
getFrameThickNess(GraphElement ge)
static HashSet<String>
getFuzzyLabels(String label)
static double
getHeatMapGamma(Graph graph)
static double
getHeatMapLowerBound(Graph graph)
static double
getHeatMapMiddleBound(Graph graph)
static double
getHeatMapUpperBound(Graph graph)
static double
getHeight(Node myNode)
static String
getHelpTopicFor(String tabName, String groupName)
static String
getLabel(int index, Attributable node, String defaultReturn)
static EdgeLabelAttribute
getLabel(int index, Edge edge)
Get EdgeLabelAttribute (if available)static NodeLabelAttribute
getLabel(int index, Node node)
Get NodeLabelAttribute (if available)static String
getLabel(Attributable node, String defaultReturn)
Gets the Label of a Nodestatic AlignmentSetting
getLabelAlignment(int index, Node node)
static Color
getLabelColor(Node n)
static String
getLabelConsumption(Edge e, String returnIfNull)
Vector2d
getLabelOffset(Attributable attributable)
Get the relative offset of label position from center of a node.static String
getLabelPath()
Get the Labelpathstatic String
getLabelPosition(Attributable attributable)
static String
getLabelProduction(Edge e, String returnIfNull)
static ArrayList<String>
getLabels(GraphElement graphElement)
static ArrayList<String>
getLabels(GraphElement graphElement, boolean includeMainLabel)
static String
getMD5fromFile(File f)
Deprecated.static String
getMD5fromFile(String filename)
Deprecated.static String
getMD5fromInputStream(InputStream is)
Deprecated.static String
getMD5fromInputStream(InputStream is, ObjectRef optFileSize)
Deprecated.static EdgeGraphicAttribute
getNewEdgeGraphicsAttribute(Color colArrow, Color colLine, boolean directed)
static String
getNiceEdgeOrNodeLabel(GraphElement ge, String nodeLabelIfMissing)
static String
getNiceIdFromAttributeId(String attributeId)
static Rectangle2D.Double
getNodeRectangle(Node node)
static Rectangle
getNodeRectangleAWT(Node node)
static double
getOpacity(GraphElement ge)
Gets the opacity of a given graph elementstatic Color
getOutlineColor(Attributable attributable)
Returns the outline color of a givenAtttibutable
.static String
getPathwayReference(Attributable a)
static ArrayList<String>
getPathwayReferences(Attributable a, boolean includeOnlyIndexed)
static Point2D
getPosition(Node a)
Returns the position of a nodestatic Vector2d
getPositionVec2d(Node a)
Returns the position of a nodestatic Vector2df
getPositionVec2df(Node a)
Returns the position of a nodestatic Vector3d
getPositionVec3d(Node node, boolean setDefault)
If setDefault is true, values will be initilized, saved and returned as 0.static Vector3d
getPositionVec3d(Node node, double zReturnIfNotAvailable, boolean setDefaultZ)
static double
getPositionX(Node a)
For getting the x position of a node through attribute access,static double
getPositionY(Node a)
For geting the y position of a node through attribute access,static double
getPositionZ(Node node, boolean setDefault)
static double
getPositionZ(Node node, double defaultReturn, boolean setDefault)
static String
getReferenceURL(Attributable ge)
static double
getRoundedEdges(Node node)
static String
getSaveAttributeName(String attributeName)
static String
getSBMLid(GraphElement ge)
static String
getSBMLrole(GraphElement ge)
static String
getShape(Node node)
static String[]
getShapeClasses()
static String
getShapeClassFromDescription(String desc)
static String
getShapeClassFromShapeName(String s)
static String[]
getShapeDescritions()
static Vector2d
getSize(Node myNode)
Gets the size of the Node.static Vector3d
getSize3D(Node myNode, double defaultDepth, boolean setDefault)
static Dimension
getSizeD(Node myNode)
Gets the size of the Node.static String
getStringList(File[] elements, String div)
static String
getStringList(String[] elements, String div)
static String
getStringList(ArrayList<?> elements, String div)
Deprecated.static String
getStringList(Collection elements, String div)
static String
getToBeDeletedPathFromAttributePath(String attributePath)
static String
getToolTipText(Attributable atta)
static ArrayList<String>
getWebPageContent(String urlText)
static double
getWidth(Node myNode)
static boolean
hasAttribute(Attributable n, String attributeName)
Check the existence of a named Attributestatic boolean
hasAttribute(Attributable n, String path, String attributeName)
static boolean
isHiddenGraphElement(GraphElement ge)
static boolean
isLabelAlignmentKnownConstant(int index, Node node)
static boolean
isSBMLreaction(GraphElement ge)
static boolean
isSBMLreversibleReaction(GraphElement ge)
static boolean
linuxRunning()
static boolean
macOSrunning()
static void
moveGraph(Graph graph, int x, int y)
static void
removeEdgeBends(Edge edge)
static void
removePathwayReferences(Attributable a, boolean includeNonIndexed)
static void
setArrowhead(Edge edge, boolean show)
static void
setArrowhead(Edge edge, String knownShapeClassName)
static void
setArrowSize(Edge edge, double arrowSize)
static void
setArrowtail(Edge edge, boolean show)
Assign a arrow shape in the opposite direction.of an edge.static void
setArrowtail(Edge edge, String knownShapeClassName)
static void
setAttribute(Attributable attributable, String path, String attributeName, Object attributeValue)
SetAttribute, sets or adds a attribute to the givenAttributeable
.static void
setAttributeTextField(Attributable attributable, String path, String attributeName, Object attributeValue)
setAttributeTextFieldstatic void
setBorderWidth(Edge edge, double frameThickness)
static void
setBorderWidth(GraphElement graphElement, double frameThickness)
static void
setBorderWidth(Node node, double frameThickness)
static void
setColorFromAttribute(Attributable attr, String path, String name, Color value)
static void
setDashArray(Edge edge, float[] dashArray)
static void
setDashArray(Edge edge, float[] dashArray, float dashphase)
static void
setDashInfo(GraphElement edgeOrNode, float[] values)
static void
setDashInfo(GraphElement edgeOrNode, float a, float b)
static void
setDefaultGraphicsAttribute(Node node, double x, double y)
static void
setDefaultGraphicsAttribute(Node newNode, Point2D position)
static void
setDeleteableAttribute(String attributePath, String pathToBeDeleted)
Memorizes an attribute, which's editor may be clicked, resulting in the deletion of an attribute (not necessarily the clicked one):static void
setDepth(Node node, double depth)
static void
setEdgeBendStyle(Edge edge, String shape)
static void
setFillColor(Attributable attributable, Color color)
Sets the fill color of a givenAtttibutable
.static void
setFillColorHEX(Attributable attr, String hexStr)
static void
setFont(LabelAttribute label, String fontName)
Sets the font to use when the label is drawed.static void
setFrameThickNess(GraphElement ge, double frameThinkness)
static void
setHeight(Node myNode, double height)
static void
setHidden(boolean doHide, GraphElement ge)
static void
setHidden(boolean doHide, Node n, boolean processOutEdges, boolean processInEdges, boolean processUndirEdges)
static void
setHidden(Collection<GraphElement> graphElements, boolean doHide)
static void
setHidden(Set<GraphElement> graphElements, boolean doHide)
static void
setKEGGhiddenCompoundInformation(Edge e, String compID)
static void
setLabel(int idx, GraphElement ge, String label, String fontName, String alignment)
static void
setLabel(Edge edge, String label)
Sets the Label of a Edgestatic void
setLabel(Edge edge, String label, String fontName)
Sets the label of an edgestatic void
setLabel(GraphElement ge, String label)
static void
setLabel(Node node, String label)
Sets the Label of a Node.static void
setLabel(Node node, String label, String fontName, String alignment)
Sets the label of a node.static void
setLabelAlignment(int index, Node node, AlignmentSetting align)
static void
setLabelColor(int index, GraphElement ge, Color color)
static void
setLabelConsumption(Edge e, String srcLabel)
static void
setLabelFrameStyle(int index, Node n, LabelFrameSetting setting)
static void
setLabelOffset(Attributable attributable, double offsetX, double offsetY)
Set the relative offset of label position from center of a node.static void
setLabelPosition(Node node, String pos)
static void
setLabelProduction(Edge e, String tgtLabel)
static void
setMacOSsettings(String applicationName)
static void
setNiceId(String attributeID, String description)
Memorize a attribute description, shown in the node, edge and graph tabs, for display instead of a attribute name.static void
setNodeGraphicsAttribute(double posx, double posy, double frameThickness_3, double width_25, double height_25, Color frameColor_0_0_0_255, Color fillColor_0_100_250_100, CollectionAttribute col)
static void
setOpacity(GraphElement ge, double opacity)
Sets the opacity of a given graph element This value will also influence the opacity of dependent Graph Attribute Components (Labels, Charts, etc)static void
setOutlineColor(Attributable attributable, Color color)
Sets the outline color of a givenAtttibutable
.static void
setOutlineColorHEX(Attributable attr, String hexStr)
static void
setPathwayReference(Attributable a, int idx, String url)
static void
setPathwayReference(GraphElement ge, String url)
static void
setPosition(Node n, double x, double y)
Sets the position of a nodestatic void
setPosition(Node n, Point2D p)
Sets the position of a nodestatic void
setPosition(Node node, Vector2d position)
static void
setPosition3d(Node n, double x, double y, double z)
static void
setPositionZ(Node node, double z)
static void
setReferenceURL(Attributable ge, String url)
static void
setRoundedEdges(Node node, double rounding)
static void
setSBMLid(GraphElement ge, String id)
static void
setSBMLmodelID(GraphElement ge, String modelID)
static void
setSBMLreversibleReaction(GraphElement ge, String reactionReversible)
static void
setSBMLrole(GraphElement ge, String role)
static void
setShape(Edge edge, String knownShapeClassName)
static void
setShape(Node node, String knownShapeClassName)
static void
setShapeEllipse(Node node)
static void
setShapeRectangle(Node node)
static void
setSize(Node myNode, double width, double height)
Sets the size of the Node.static void
setSize(Node myNode, int width, int height)
Sets the size of the Node.static void
setSize(Node myNode, Vector2d newSize)
Sets the size of the Node.static void
setToolTipText(Attributable atta, String statusText)
static void
setVisibilityOfChildElements(Collection<Node> nodes, boolean doHide)
static void
setWidth(Node myNode, double width)
static void
showInBrowser(String url)
static void
switchVisibilityOfChildElements(Collection<Node> nodes)
static boolean
windowsRunning()
-
Field Details
-
attributeSeparator
-
id_ttestCircleSize
-
knownColors
-
preFilePath
-
-
Constructor Details
-
AttributeHelper
public AttributeHelper()
-
-
Method Details
-
getEncodedUrl
-
showInBrowser
-
macOSrunning
public static boolean macOSrunning() -
setMacOSsettings
-
getDefaultAttributeDescriptionFor
-
setDeleteableAttribute
Memorizes an attribute, which's editor may be clicked, resulting in the deletion of an attribute (not necessarily the clicked one):attributePath:
- ".mapping.measurementdata" -> this attribute will be clickable
- ".mapping." -> this attribute and all child attributes will be clickable
- "mapping" -> attribute ".mapping" (and all child attributes) will be deleted
- "graphics.component" -> attribute ".graphics.component" (and all child attributes) will be deleted, but not any other ".graphics." attributes
- "mapping$charting" -> attributes ".mapping", ".charting" and all child attributes will be deleted. "$" may be used more than once
- Parameters:
attributePath
- The path of the attribute, which will be clickablepathToBeDeleted
- The path(s) of the attribute(s) to be deleted
-
getToBeDeletedPathFromAttributePath
-
setNiceId
Memorize a attribute description, shown in the node, edge and graph tabs, for display instead of a attribute name. Use "A:B" as the description, to create a group "A", which contains a item "B", for the given attributeID.- Parameters:
attributeID
- The name of the attributedescription
- The group and "nice name" of the attribute
-
getNiceIdFromAttributeId
-
getLabelPath
Get the Labelpath- Returns:
- Label Path
-
setLabel
Sets the Label of a Edge- Parameters:
edge
- The Node to work withlabel
- The new label for the node (created if not available)
-
setLabel
Sets the Label of a Node. If the given label is null, the label attribute is removed from the node.- Parameters:
node
- The Node to work withlabel
- The new label for the node (created if not available)
-
setLabel
Sets the label of an edge- Parameters:
edge
- - the edge to uselabel
- - the new label for the edge (created if not available)fontName
- - the name of the font to use with this label
-
setLabel
Sets the label of a node. If the given label is null, the label attribute is removed from the node.- Parameters:
node
- - the node to uselabel
- - the new label for the node (created if not available)fontName
- - the name of the font to use with this label
-
setLabel
public static void setLabel(int idx, GraphElement ge, String label, String fontName, String alignment)- Parameters:
idx
- Use -1 to get main label, use 0..99 to get annotation labels
-
setLabelAlignment
- Parameters:
index
- Use -1 to get main label, use 0..99 to get annotation labels
-
getLabelAlignment
- Parameters:
index
- Use -1 to get main label, use 0..99 to get annotation labels
-
isLabelAlignmentKnownConstant
- Parameters:
index
- Use -1 to get main label, use 0..99 to get annotation labels
-
setFont
Sets the font to use when the label is drawed.- Parameters:
label
- - the labelfontName
- - the name of the font
-
getLabel
Gets the Label of a Node- Parameters:
node
- The node to work withdefaultReturn
- The standard return value if no label is set- Returns:
- The actual label or the
labelDefaul
value, if the label-attribute is not set.
-
getLabels
-
getLabels
-
getLabel
- Parameters:
index
- Use -1 to get main label, use 0..99 to get annotation labels
-
hasAttribute
Check the existence of a named Attribute- Parameters:
n
- The node to work withattributeName
- The name of the attribute to be checked- Returns:
- True, if the attribute is available for the node
n
. False, if the attribute is not available.
-
hasAttribute
-
setPosition
Sets the position of a node- Parameters:
n
- The node to work withp
- The new position as aPoint2D
-
setPosition
Sets the position of a node- Parameters:
n
- The node to work withp
- The new position as aPoint2D
-
setPosition3d
-
getPositionX
For getting the x position of a node through attribute access,- Parameters:
a
- Node to be analyzed.- Returns:
- X position of node.
-
getPosition
Returns the position of a node- Parameters:
a
- The node to be analyzed.- Returns:
- The position of the Node (a
Point2D
structure)
-
getPositionVec2d
Returns the position of a node- Parameters:
a
- The node to be analyzed.- Returns:
- The position of the Node (a
Vector2d
structure)
-
getPositionVec2df
Returns the position of a node- Parameters:
a
- The node to be analyzed.- Returns:
- The position of the Node (a
Vector2df
structure)
-
getPositionY
For geting the y position of a node through attribute access,- Parameters:
a
- Node to be analysed.- Returns:
- Y position of node.
-
getSize
Gets the size of the Node.- Parameters:
myNode
-- Returns:
- Tehe size as a
Vector2d
structure.
-
setSize
Sets the size of the Node.- Parameters:
myNode
-width
- New widthheight
- New height
-
setHeight
-
setWidth
-
setSize
Sets the size of the Node.- Parameters:
myNode
-width
- New widthheight
- New height
-
setSize
Sets the size of the Node.- Parameters:
myNode
-newSize
- The new size as aVector2d
struct. X = width, Y = height.
-
setFillColor
Sets the fill color of a givenAtttibutable
.- Parameters:
attributable
- - the Attributable (Node, Edge, ...) to set the colorcolor
- - the color to set- See Also:
getFillColor(Attributable)
,setOutlineColor(Attributable, Color)
,getOutlineColor(Attributable)
-
getFillColor
Returns the fill color of a givenAtttibutable
.- Parameters:
attributable
- - the Attributable (Node, Edge, ...) to get the color from- See Also:
setFillColor(Attributable, Color)
,setOutlineColor(Attributable, Color)
,getOutlineColor(Attributable)
-
setOutlineColor
Sets the outline color of a givenAtttibutable
.- Parameters:
attributable
- - the Attributable (Node, Edge, ...) to set the colorcolor
- - the color to set- See Also:
getOutlineColor(Attributable)
,setFillColor(Attributable, Color)
,getFillColor(Attributable)
-
getOutlineColor
Returns the outline color of a givenAtttibutable
.- Parameters:
attributable
- - the Attributable (Node, Edge, ...) to get the color from- See Also:
setOutlineColor(Attributable, Color)
,setFillColor(Attributable, Color)
,getFillColor(Attributable)
-
setOpacity
Sets the opacity of a given graph element This value will also influence the opacity of dependent Graph Attribute Components (Labels, Charts, etc)- Parameters:
ge
- graph elementopacity
- a value between 0.0 (transparent) and 1.0 (opaque)
-
getOpacity
Gets the opacity of a given graph element- Parameters:
ge
- graph elementopacity
- a value between 0.0 (transparent) and 1.0 (opaque)
-
setAttribute
public static void setAttribute(Attributable attributable, String path, String attributeName, Object attributeValue)SetAttribute, sets or adds a attribute to the givenAttributeable
. If theattributeValue
is from a known type (Boolean, Byte, Double, Float, Integer, Long, Short or String) the attribute values are set with "standard attributes". If it has a unknown type aObjectAttribute
is added or set. These attributes can not be saved or loaded, so this should be avoided if possible. -
setAttributeTextField
public static void setAttributeTextField(Attributable attributable, String path, String attributeName, Object attributeValue)setAttributeTextField -
getAttributeValueSet
public static Set<Object> getAttributeValueSet(Collection<Attributable> attributables, String path, String attributeName, Object defaultValue, Object resultType, boolean setDefaultIfMissing) -
getAttributeValue
-
getAttributeValue
public static Object getAttributeValue(Attributable attributable, String path, String attributeName, Object defaultValue, Object resultType, boolean setDefaultIfMissing)Return an Attribute value, if not present, return the defaultValue. -
getAttribute
- Parameters:
attributable
-attributeName
-- Returns:
-
addAttributeFolder
- Parameters:
attributable
- An attributable is usually a graph, node or an edge.path
- Path can be a simple ID or a composite path built using attributeSeparators.
-
addAttributeFolder
- Parameters:
attributable
- An attributable is usually a graph, node or an edge.path
- Path can be a simple ID or a composite path built using attributeSeparators.overwrite
- Whether, while adding new folders, any existing folders should be overwritten.- Since:
- 2.7.0
-
getFrameThickNess
- Parameters:
ge
-- Returns:
-
setFrameThickNess
-
setDefaultGraphicsAttribute
- Parameters:
node
-
-
setNodeGraphicsAttribute
public static void setNodeGraphicsAttribute(double posx, double posy, double frameThickness_3, double width_25, double height_25, Color frameColor_0_0_0_255, Color fillColor_0_100_250_100, CollectionAttribute col)- Parameters:
posx
-posy
-frameThickness_3
-width_25
-height_25
-frameColor_0_0_0_255
-fillColor_0_100_250_100
-col
-
-
setDefaultGraphicsAttribute
- Parameters:
newNode
-position
-
-
getDefaultGraphicsAttributeForEdge
public static CollectionAttribute getDefaultGraphicsAttributeForEdge(Color colArrow, Color colLine, boolean directed) -
getNewEdgeGraphicsAttribute
public static EdgeGraphicAttribute getNewEdgeGraphicsAttribute(Color colArrow, Color colLine, boolean directed) -
getSizeD
Gets the size of the Node.- Parameters:
myNode
-- Returns:
- Tehe size as a
Vector2d
structure.
-
getSize3D
-
getWidth
-
getHeight
-
setPosition
- Parameters:
node
-oldPos
-
-
setToolTipText
-
getToolTipText
-
setBorderWidth
-
setBorderWidth
-
setBorderWidth
-
setArrowSize
-
getArrowSize
-
setFillColorHEX
- Parameters:
attr
-hexStr
- A color defined like #FFFFFF (must be 6 characters (hex) for the color components)
-
setOutlineColorHEX
- Parameters:
attr
-hexStr
- A color defined like #FFFFFF (must be 6 characters (hex) for the color components)
-
setSBMLid
-
getSBMLid
-
setSBMLmodelID
-
setSBMLreversibleReaction
-
isSBMLreversibleReaction
-
isSBMLreaction
-
setSBMLrole
-
getSBMLrole
-
setRoundedEdges
-
getRoundedEdges
-
getDefaultAttributeIconFor
-
getColorFrom3floatValues0to1
-
getColorFromName
-
getColorName
-
setDashInfo
-
setDashInfo
-
getDashInfo
-
getDefaultGraphicsAttributeForNode
-
getDefaultGraphicsAttributeForNode
-
getDefaultGraphicsAttributeForKeggNode
-
getHelpTopicFor
-
copyReplaceStringAttribute
-
setLabel
-
getLabelPosition
-
setLabelPosition
-
getLabelOffset
Get the relative offset of label position from center of a node. Offset is relative to node width/height; (0, 0) center of node, (-1, -1) top-left corner of node, (1, -1) top-right corner of node, (1, 1) bottom-right corner of node, (-1, 1) bottom-left corner of node.- Parameters:
attributable
- currently only a node- Returns:
- relative offset of label position from center of a node, default return (0, 0)
-
setLabelOffset
Set the relative offset of label position from center of a node. Offset is relative to node width/height; (0, 0) center of node, (-1, -1) top-left corner of node, (1, -1) top-right corner of node, (1, 1) bottom-right corner of node, (-1, 1) bottom-left corner of node.- Parameters:
attributable
- currently only a nodeoffsetX
- horizontal offset of label position from center of a nodeoffsetY
- vertical offset of label position from center of a node
-
getLabel
Get NodeLabelAttribute (if available)- Parameters:
index
- Use -1 to get main label, use 0..99 to get annotation labelsnode
- Node to be processed- Returns:
- NodeLabelAttribute, if present, otherwise null.
-
getLabel
Get EdgeLabelAttribute (if available)- Parameters:
index
- Use -1 to get main label, use 0..99 to get annotation labelsedge
- Edge to be processed- Returns:
- EdgeLabelAttribute, if present, otherwise null.
-
setLabelFrameStyle
-
formatNumber
-
setDashArray
-
setDashArray
-
setShapeEllipse
-
setShapeRectangle
-
setShape
-
setShape
-
getShape
-
setArrowtail
Assign a arrow shape in the opposite direction.of an edge.- Parameters:
edge
-show
- If set to true, the edge will have on both ends an arrow
-
setArrowhead
-
getArrowhead
-
getArrowtail
-
setArrowhead
-
setArrowtail
-
deleteAttribute
Removes a single attribute or a number of attributes from the Attributable. In case the name ends with "*", all attributes with a name, which starts with the same string, will be removed. Otherwise a single attribute (if available) with the exact name as given, is removed.- Parameters:
attributable
-path
-name
- A name of a single attribute "test" or a group of attributes "test*" (test1, test2, testA, testABC, ...).- Returns:
- True, if the removal was successful. Fals, if a error has occured, which is added to the system log.
-
setLabelColor
-
getLabelColor
-
addEdgeBend
-
addEdgeBends
-
addEdgeBend
-
addEdgeBend
-
getEdgeBends
-
getEdgeBendCoordinateAttributes
-
removeEdgeBends
-
setEdgeBendStyle
-
getEdgeShapes
-
addEdgeShape
-
getEdgeBendStyle
-
getWebPageContent
-
getNiceEdgeOrNodeLabel
-
getSaveAttributeName
-
getPositionVec3d
If setDefault is true, values will be initilized, saved and returned as 0. Behaviour may be different between different getPosition* methods. (AAA)- Parameters:
node
-setDefault
-- Returns:
- Position vector (3D)
-
getPositionVec3d
-
getPositionZ
-
getPositionZ
-
setPositionZ
-
getDepth
-
setDepth
-
isHiddenGraphElement
-
switchVisibilityOfChildElements
-
setVisibilityOfChildElements
-
setHidden
-
setHidden
public static void setHidden(boolean doHide, Node n, boolean processOutEdges, boolean processInEdges, boolean processUndirEdges) -
setHidden
-
setHidden
-
getStringList
-
getStringList
-
getStringList
-
getStringList
Deprecated. -
setReferenceURL
-
getReferenceURL
-
setPathwayReference
-
setPathwayReference
-
removePathwayReferences
-
getPathwayReference
-
getPathwayReferences
-
getHeatMapLowerBound
-
getHeatMapMiddleBound
-
getHeatMapUpperBound
-
getHeatMapGamma
-
moveGraph
-
linuxRunning
public static boolean linuxRunning() -
windowsRunning
public static boolean windowsRunning() -
getShapeClassFromShapeName
-
getShapeDescritions
-
getShapeClassFromDescription
-
getShapeClasses
-
getLabelConsumption
-
getLabelProduction
-
setLabelConsumption
-
setLabelProduction
-
getNodeRectangle
-
getNodeRectangleAWT
-
getColorFromAttribute
public static Color getColorFromAttribute(Attributable attr, String path, String name, Color defaultValue) -
setColorFromAttribute
-
getDateFromString
-
getMD5fromFile
Deprecated.- Throws:
Exception
-
getMD5fromFile
Deprecated.- Throws:
Exception
-
getMD5fromInputStream
Deprecated.- Throws:
Exception
-
getMD5fromInputStream
@Deprecated public static String getMD5fromInputStream(InputStream is, ObjectRef optFileSize) throws ExceptionDeprecated.- Throws:
Exception
-
getDateString
If date is null, the current date is used! -
getFuzzyLabels
-
StringManipulationTools.getStringList(ArrayList,String)
instead