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 Details

    • attributeSeparator

      public static String attributeSeparator
    • id_ttestCircleSize

      public static String id_ttestCircleSize
    • knownColors

      public static final Color[] knownColors
    • preFilePath

      public static String preFilePath
  • Constructor Details

    • AttributeHelper

      public AttributeHelper()
  • Method Details

    • getEncodedUrl

      public static String getEncodedUrl​(String input)
    • showInBrowser

      public static void showInBrowser​(String url)
    • macOSrunning

      public static boolean macOSrunning()
    • setMacOSsettings

      public static void setMacOSsettings​(String applicationName)
    • getDefaultAttributeDescriptionFor

      public static String getDefaultAttributeDescriptionFor​(String id, String tabName, Attribute a)
    • setDeleteableAttribute

      public 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):

      attributePath:

      • ".mapping.measurementdata" -> this attribute will be clickable
      • ".mapping." -> this attribute and all child attributes will be clickable
      pathToBeDeleted:
      • "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 clickable
      pathToBeDeleted - The path(s) of the attribute(s) to be deleted
    • getToBeDeletedPathFromAttributePath

      public static String getToBeDeletedPathFromAttributePath​(String attributePath)
    • setNiceId

      public 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. 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 attribute
      description - The group and "nice name" of the attribute
    • getNiceIdFromAttributeId

      public static String getNiceIdFromAttributeId​(String attributeId)
    • getLabelPath

      public static String getLabelPath()
      Get the Labelpath
      Returns:
      Label Path
    • setLabel

      public static void setLabel​(Edge edge, String label)
      Sets the Label of a Edge
      Parameters:
      edge - The Node to work with
      label - The new label for the node (created if not available)
    • setLabel

      public static void setLabel​(Node node, String label)
      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 with
      label - The new label for the node (created if not available)
    • setLabel

      public static void setLabel​(Edge edge, String label, String fontName)
      Sets the label of an edge
      Parameters:
      edge - - the edge to use
      label - - the new label for the edge (created if not available)
      fontName - - the name of the font to use with this label
    • setLabel

      public static void setLabel​(Node node, String label, String fontName, String alignment)
      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 use
      label - - 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

      public static void setLabelAlignment​(int index, Node node, AlignmentSetting align)
      Parameters:
      index - Use -1 to get main label, use 0..99 to get annotation labels
    • getLabelAlignment

      public static AlignmentSetting getLabelAlignment​(int index, Node node)
      Parameters:
      index - Use -1 to get main label, use 0..99 to get annotation labels
    • isLabelAlignmentKnownConstant

      public static boolean isLabelAlignmentKnownConstant​(int index, Node node)
      Parameters:
      index - Use -1 to get main label, use 0..99 to get annotation labels
    • setFont

      public static void setFont​(LabelAttribute label, String fontName)
      Sets the font to use when the label is drawed.
      Parameters:
      label - - the label
      fontName - - the name of the font
    • getLabel

      public static String getLabel​(Attributable node, String defaultReturn)
      Gets the Label of a Node
      Parameters:
      node - The node to work with
      defaultReturn - 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

      public static ArrayList<String> getLabels​(GraphElement graphElement, boolean includeMainLabel)
    • getLabels

      public static ArrayList<String> getLabels​(GraphElement graphElement)
    • getLabel

      public static String getLabel​(int index, Attributable node, String defaultReturn)
      Parameters:
      index - Use -1 to get main label, use 0..99 to get annotation labels
    • hasAttribute

      public static boolean hasAttribute​(Attributable n, String attributeName)
      Check the existence of a named Attribute
      Parameters:
      n - The node to work with
      attributeName - 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

      public static boolean hasAttribute​(Attributable n, String path, String attributeName)
    • setPosition

      public static void setPosition​(Node n, Point2D p)
      Sets the position of a node
      Parameters:
      n - The node to work with
      p - The new position as a Point2D
    • setPosition

      public static void setPosition​(Node n, double x, double y)
      Sets the position of a node
      Parameters:
      n - The node to work with
      p - The new position as a Point2D
    • setPosition3d

      public static void setPosition3d​(Node n, double x, double y, double z)
    • getPositionX

      public static double getPositionX​(Node a)
      For getting the x position of a node through attribute access,
      Parameters:
      a - Node to be analyzed.
      Returns:
      X position of node.
    • getPosition

      public static Point2D getPosition​(Node a)
      Returns the position of a node
      Parameters:
      a - The node to be analyzed.
      Returns:
      The position of the Node (aPoint2D structure)
    • getPositionVec2d

      public static Vector2d getPositionVec2d​(Node a)
      Returns the position of a node
      Parameters:
      a - The node to be analyzed.
      Returns:
      The position of the Node (aVector2d structure)
    • getPositionVec2df

      public static Vector2df getPositionVec2df​(Node a)
      Returns the position of a node
      Parameters:
      a - The node to be analyzed.
      Returns:
      The position of the Node (aVector2df structure)
    • getPositionY

      public static double getPositionY​(Node a)
      For geting the y position of a node through attribute access,
      Parameters:
      a - Node to be analysed.
      Returns:
      Y position of node.
    • getSize

      public static Vector2d getSize​(Node myNode)
      Gets the size of the Node.
      Parameters:
      myNode -
      Returns:
      Tehe size as a Vector2d structure.
    • setSize

      public static void setSize​(Node myNode, double width, double height)
      Sets the size of the Node.
      Parameters:
      myNode -
      width - New width
      height - New height
    • setHeight

      public static void setHeight​(Node myNode, double height)
    • setWidth

      public static void setWidth​(Node myNode, double width)
    • setSize

      public static void setSize​(Node myNode, int width, int height)
      Sets the size of the Node.
      Parameters:
      myNode -
      width - New width
      height - New height
    • setSize

      public static void setSize​(Node myNode, Vector2d newSize)
      Sets the size of the Node.
      Parameters:
      myNode -
      newSize - The new size as a Vector2d struct. X = width, Y = height.
    • setFillColor

      public static void setFillColor​(Attributable attributable, Color color)
      Sets the fill color of a given Atttibutable.
      Parameters:
      attributable - - the Attributable (Node, Edge, ...) to set the color
      color - - the color to set
      See Also:
      getFillColor(Attributable), setOutlineColor(Attributable, Color), getOutlineColor(Attributable)
    • getFillColor

      public static Color getFillColor​(Attributable attributable)
      Returns the fill color of a given Atttibutable.
      Parameters:
      attributable - - the Attributable (Node, Edge, ...) to get the color from
      See Also:
      setFillColor(Attributable, Color), setOutlineColor(Attributable, Color), getOutlineColor(Attributable)
    • setOutlineColor

      public static void setOutlineColor​(Attributable attributable, Color color)
      Sets the outline color of a given Atttibutable.
      Parameters:
      attributable - - the Attributable (Node, Edge, ...) to set the color
      color - - the color to set
      See Also:
      getOutlineColor(Attributable), setFillColor(Attributable, Color), getFillColor(Attributable)
    • getOutlineColor

      public static Color getOutlineColor​(Attributable attributable)
      Returns the outline color of a given Atttibutable.
      Parameters:
      attributable - - the Attributable (Node, Edge, ...) to get the color from
      See Also:
      setOutlineColor(Attributable, Color), setFillColor(Attributable, Color), getFillColor(Attributable)
    • setOpacity

      public 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)
      Parameters:
      ge - graph element
      opacity - a value between 0.0 (transparent) and 1.0 (opaque)
    • getOpacity

      public static double getOpacity​(GraphElement ge)
      Gets the opacity of a given graph element
      Parameters:
      ge - graph element
      opacity - 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 given Attributeable. If the attributeValue 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 a ObjectAttribute 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

      public static Object getAttributeValue​(Attributable attributable, String path, String attributeName, Object defaultValue, Object resultType)
    • 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

      public static Attribute getAttribute​(Attributable attributable, String attributeName)
      Parameters:
      attributable -
      attributeName -
      Returns:
    • addAttributeFolder

      public static void addAttributeFolder​(Attributable attributable, String path)
      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

      public static void addAttributeFolder​(Attributable attributable, String path, boolean overwrite)
      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

      public static double getFrameThickNess​(GraphElement ge)
      Parameters:
      ge -
      Returns:
    • setFrameThickNess

      public static void setFrameThickNess​(GraphElement ge, double frameThinkness)
    • setDefaultGraphicsAttribute

      public static void setDefaultGraphicsAttribute​(Node node, double x, double y)
      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

      public static void setDefaultGraphicsAttribute​(Node newNode, Point2D position)
      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

      public static Dimension getSizeD​(Node myNode)
      Gets the size of the Node.
      Parameters:
      myNode -
      Returns:
      Tehe size as a Vector2d structure.
    • getSize3D

      public static Vector3d getSize3D​(Node myNode, double defaultDepth, boolean setDefault)
    • getWidth

      public static double getWidth​(Node myNode)
    • getHeight

      public static double getHeight​(Node myNode)
    • setPosition

      public static void setPosition​(Node node, Vector2d position)
      Parameters:
      node -
      oldPos -
    • setToolTipText

      public static void setToolTipText​(Attributable atta, String statusText)
    • getToolTipText

      public static String getToolTipText​(Attributable atta)
    • setBorderWidth

      public static void setBorderWidth​(Node node, double frameThickness)
    • setBorderWidth

      public static void setBorderWidth​(GraphElement graphElement, double frameThickness)
    • setBorderWidth

      public static void setBorderWidth​(Edge edge, double frameThickness)
    • setArrowSize

      public static void setArrowSize​(Edge edge, double arrowSize)
    • getArrowSize

      public static double getArrowSize​(Edge edge)
    • setFillColorHEX

      public static void setFillColorHEX​(Attributable attr, String hexStr)
      Parameters:
      attr -
      hexStr - A color defined like #FFFFFF (must be 6 characters (hex) for the color components)
    • setOutlineColorHEX

      public static void setOutlineColorHEX​(Attributable attr, String hexStr)
      Parameters:
      attr -
      hexStr - A color defined like #FFFFFF (must be 6 characters (hex) for the color components)
    • setSBMLid

      public static void setSBMLid​(GraphElement ge, String id)
    • getSBMLid

      public static String getSBMLid​(GraphElement ge)
    • setSBMLmodelID

      public static void setSBMLmodelID​(GraphElement ge, String modelID)
    • setSBMLreversibleReaction

      public static void setSBMLreversibleReaction​(GraphElement ge, String reactionReversible)
    • isSBMLreversibleReaction

      public static boolean isSBMLreversibleReaction​(GraphElement ge)
    • isSBMLreaction

      public static boolean isSBMLreaction​(GraphElement ge)
    • setSBMLrole

      public static void setSBMLrole​(GraphElement ge, String role)
    • getSBMLrole

      public static String getSBMLrole​(GraphElement ge)
    • setRoundedEdges

      public static void setRoundedEdges​(Node node, double rounding)
    • getRoundedEdges

      public static double getRoundedEdges​(Node node)
    • setKEGGhiddenCompoundInformation

      public static void setKEGGhiddenCompoundInformation​(Edge e, String compID)
    • getDefaultAttributeIconFor

      public static ImageIcon getDefaultAttributeIconFor​(String id)
    • getColorFrom3floatValues0to1

      public static Color getColorFrom3floatValues0to1​(String color, Color ifUnkown)
    • getColorFromName

      public static Color getColorFromName​(String name, Color ifUnkown)
    • getColorName

      public static String getColorName​(Color attrColor)
    • setDashInfo

      public static void setDashInfo​(GraphElement edgeOrNode, float a, float b)
    • setDashInfo

      public static void setDashInfo​(GraphElement edgeOrNode, float[] values)
    • getDashInfo

      public static float[] getDashInfo​(Edge edge)
    • getDefaultGraphicsAttributeForNode

      public static CollectionAttribute getDefaultGraphicsAttributeForNode​(Vector2d position)
    • getDefaultGraphicsAttributeForNode

      public static CollectionAttribute getDefaultGraphicsAttributeForNode​(double x, double y)
    • getDefaultGraphicsAttributeForKeggNode

      public static CollectionAttribute getDefaultGraphicsAttributeForKeggNode​(double x, double y)
    • getHelpTopicFor

      public static String getHelpTopicFor​(String tabName, String groupName)
    • copyReplaceStringAttribute

      public static void copyReplaceStringAttribute​(Attributable a, String path, String name, String copyTo, String searchString, String replaceString)
    • setLabel

      public static void setLabel​(GraphElement ge, String label)
    • getLabelPosition

      public static String getLabelPosition​(Attributable attributable)
    • setLabelPosition

      public static void setLabelPosition​(Node node, String pos)
    • getLabelOffset

      public Vector2d getLabelOffset​(Attributable attributable)
      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

      public static void setLabelOffset​(Attributable attributable, double offsetX, double offsetY)
      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 node
      offsetX - horizontal offset of label position from center of a node
      offsetY - vertical offset of label position from center of a node
    • getLabel

      public static NodeLabelAttribute getLabel​(int index, Node node)
      Get NodeLabelAttribute (if available)
      Parameters:
      index - Use -1 to get main label, use 0..99 to get annotation labels
      node - Node to be processed
      Returns:
      NodeLabelAttribute, if present, otherwise null.
    • getLabel

      public static EdgeLabelAttribute getLabel​(int index, Edge edge)
      Get EdgeLabelAttribute (if available)
      Parameters:
      index - Use -1 to get main label, use 0..99 to get annotation labels
      edge - Edge to be processed
      Returns:
      EdgeLabelAttribute, if present, otherwise null.
    • setLabelFrameStyle

      public static void setLabelFrameStyle​(int index, Node n, LabelFrameSetting setting)
    • formatNumber

      public static String formatNumber​(double d, String pattern)
    • setDashArray

      public static void setDashArray​(Edge edge, float[] dashArray)
    • setDashArray

      public static void setDashArray​(Edge edge, float[] dashArray, float dashphase)
    • setShapeEllipse

      public static void setShapeEllipse​(Node node)
    • setShapeRectangle

      public static void setShapeRectangle​(Node node)
    • setShape

      public static void setShape​(Node node, String knownShapeClassName)
    • setShape

      public static void setShape​(Edge edge, String knownShapeClassName)
    • getShape

      public static String getShape​(Node node)
    • setArrowtail

      public static void setArrowtail​(Edge edge, boolean show)
      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

      public static void setArrowhead​(Edge edge, boolean show)
    • getArrowhead

      public static String getArrowhead​(Edge edge)
    • getArrowtail

      public static String getArrowtail​(Edge edge)
    • setArrowhead

      public static void setArrowhead​(Edge edge, String knownShapeClassName)
    • setArrowtail

      public static void setArrowtail​(Edge edge, String knownShapeClassName)
    • deleteAttribute

      public static boolean deleteAttribute​(Attributable attributable, String path, String name)
      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

      public static void setLabelColor​(int index, GraphElement ge, Color color)
    • getLabelColor

      public static Color getLabelColor​(Node n)
    • addEdgeBend

      public static void addEdgeBend​(Edge edge, Vector2d point)
    • addEdgeBends

      public static void addEdgeBends​(Edge edge, Collection<Vector2d> points)
    • addEdgeBend

      public static CoordinateAttribute addEdgeBend​(Edge edge, double x, double y)
    • addEdgeBend

      public static CoordinateAttribute addEdgeBend​(Edge edge, double x, double y, boolean safeAdd)
    • getEdgeBends

      public static ArrayList<Vector2d> getEdgeBends​(Edge edge)
    • getEdgeBendCoordinateAttributes

      public static ArrayList<CoordinateAttribute> getEdgeBendCoordinateAttributes​(Edge edge)
    • removeEdgeBends

      public static void removeEdgeBends​(Edge edge)
    • setEdgeBendStyle

      public static void setEdgeBendStyle​(Edge edge, String shape)
    • getEdgeShapes

      public static HashMap<String,​String> getEdgeShapes()
    • addEdgeShape

      public static boolean addEdgeShape​(String description, String className)
    • getEdgeBendStyle

      public static String getEdgeBendStyle​(Edge edge)
    • getWebPageContent

      public static ArrayList<String> getWebPageContent​(String urlText)
    • getNiceEdgeOrNodeLabel

      public static String getNiceEdgeOrNodeLabel​(GraphElement ge, String nodeLabelIfMissing)
    • getSaveAttributeName

      public static String getSaveAttributeName​(String attributeName)
    • getPositionVec3d

      public static Vector3d getPositionVec3d​(Node node, boolean setDefault)
      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

      public static Vector3d getPositionVec3d​(Node node, double zReturnIfNotAvailable, boolean setDefaultZ)
    • getPositionZ

      public static double getPositionZ​(Node node, boolean setDefault)
    • getPositionZ

      public static double getPositionZ​(Node node, double defaultReturn, boolean setDefault)
    • setPositionZ

      public static void setPositionZ​(Node node, double z)
    • getDepth

      public static double getDepth​(Node node, double defaultReturn, boolean setDefault)
    • setDepth

      public static void setDepth​(Node node, double depth)
    • isHiddenGraphElement

      public static boolean isHiddenGraphElement​(GraphElement ge)
    • switchVisibilityOfChildElements

      public static void switchVisibilityOfChildElements​(Collection<Node> nodes)
    • setVisibilityOfChildElements

      public static void setVisibilityOfChildElements​(Collection<Node> nodes, boolean doHide)
    • setHidden

      public static void setHidden​(boolean doHide, GraphElement ge)
    • setHidden

      public static void setHidden​(boolean doHide, Node n, boolean processOutEdges, boolean processInEdges, boolean processUndirEdges)
    • setHidden

      public static void setHidden​(Collection<GraphElement> graphElements, boolean doHide)
    • setHidden

      public static void setHidden​(Set<GraphElement> graphElements, boolean doHide)
    • getStringList

      public static String getStringList​(String[] elements, String div)
    • getStringList

      public static String getStringList​(File[] elements, String div)
    • getStringList

      public static String getStringList​(Collection elements, String div)
    • getStringList

      @Deprecated public static String getStringList​(ArrayList<?> elements, String div)
    • setReferenceURL

      public static void setReferenceURL​(Attributable ge, String url)
    • getReferenceURL

      public static String getReferenceURL​(Attributable ge)
    • setPathwayReference

      public static void setPathwayReference​(GraphElement ge, String url)
    • setPathwayReference

      public static void setPathwayReference​(Attributable a, int idx, String url)
    • removePathwayReferences

      public static void removePathwayReferences​(Attributable a, boolean includeNonIndexed)
    • getPathwayReference

      public static String getPathwayReference​(Attributable a)
    • getPathwayReferences

      public static ArrayList<String> getPathwayReferences​(Attributable a, boolean includeOnlyIndexed)
    • getHeatMapLowerBound

      public static double getHeatMapLowerBound​(Graph graph)
    • getHeatMapMiddleBound

      public static double getHeatMapMiddleBound​(Graph graph)
    • getHeatMapUpperBound

      public static double getHeatMapUpperBound​(Graph graph)
    • getHeatMapGamma

      public static double getHeatMapGamma​(Graph graph)
    • moveGraph

      public static void moveGraph​(Graph graph, int x, int y)
    • linuxRunning

      public static boolean linuxRunning()
    • windowsRunning

      public static boolean windowsRunning()
    • getShapeClassFromShapeName

      public static String getShapeClassFromShapeName​(String s)
    • getShapeDescritions

      public static String[] getShapeDescritions()
    • getShapeClassFromDescription

      public static String getShapeClassFromDescription​(String desc)
    • getShapeClasses

      public static String[] getShapeClasses()
    • getLabelConsumption

      public static String getLabelConsumption​(Edge e, String returnIfNull)
    • getLabelProduction

      public static String getLabelProduction​(Edge e, String returnIfNull)
    • setLabelConsumption

      public static void setLabelConsumption​(Edge e, String srcLabel)
    • setLabelProduction

      public static void setLabelProduction​(Edge e, String tgtLabel)
    • getNodeRectangle

      public static Rectangle2D.Double getNodeRectangle​(Node node)
    • getNodeRectangleAWT

      public static Rectangle getNodeRectangleAWT​(Node node)
    • getColorFromAttribute

      public static Color getColorFromAttribute​(Attributable attr, String path, String name, Color defaultValue)
    • setColorFromAttribute

      public static void setColorFromAttribute​(Attributable attr, String path, String name, Color value)
    • getDateFromString

      public static Date getDateFromString​(String value)
    • getMD5fromFile

      @Deprecated public static String getMD5fromFile​(String filename) throws Exception
      Deprecated.
      Throws:
      Exception
    • getMD5fromFile

      @Deprecated public static String getMD5fromFile​(File f) throws Exception
      Deprecated.
      Throws:
      Exception
    • getMD5fromInputStream

      @Deprecated public static String getMD5fromInputStream​(InputStream is) throws Exception
      Deprecated.
      Throws:
      Exception
    • getMD5fromInputStream

      @Deprecated public static String getMD5fromInputStream​(InputStream is, ObjectRef optFileSize) throws Exception
      Deprecated.
      Throws:
      Exception
    • getDateString

      public static String getDateString​(Date date)
      If date is null, the current date is used!
    • getFuzzyLabels

      public static HashSet<String> getFuzzyLabels​(String label)