Class NodeTools

java.lang.Object
de.ipk_gatersleben.ag_nw.graffiti.NodeTools
Direct Known Subclasses:
IAPnodeTools

public class NodeTools
extends Object
  • Constructor Details

    • NodeTools

      public NodeTools()
  • Method Details

    • getMaximumXY

      public static Vector2d getMaximumXY​(Collection<Node> nodeList, double factorXY, double minx, double miny, boolean includeSizeInformation)
    • getMaximumXY

      public static Vector2d getMaximumXY​(Collection<Node> nodeList, double factorXY, double minx, double miny, boolean includeSizeInformation, boolean includeInvisibleNodes)
    • getMinimumXY

      public static Vector2d getMinimumXY​(Collection<Node> nodeList, double factorXY, double subx, double suby, boolean includeSizeInformation)
    • getMinimumXY

      public static Vector2d getMinimumXY​(Collection<Node> nodeList, double factorXY, double subx, double suby, boolean includeSizeInformation, boolean includeInvisibleNodes)
    • getCenter

      public static Vector2d getCenter​(Collection<?> nodeList)
      Calculates the center of a number of given nodes (other Graph elements are ignored). If no nodes are given the position vector contains Double.NaN values.
      Parameters:
      nodeList - Node collection to work with. The collection has to contain either Node objects, or NodeCacheEntry objects.
      Returns:
      A Vector2d containing the position of the center.
    • getCenter3d

      public static Vector3d getCenter3d​(Collection<?> nodeList)
    • getClusterID

      public static String getClusterID​(GraphElement node, String idIfNoCluster)
    • setClusterID

      public static void setClusterID​(GraphElement node, String clusterId)
    • getDataTimePoints

      public static List<MyComparableDataPoint> getDataTimePoints​(GraphElement n, boolean useSampleAverage)
    • getMappedDataListFromNode

      public static List<SubstanceInterface> getMappedDataListFromNode​(GraphElement graphElement)
    • getSortedAverageDataSetValues

      public static List<MyComparableDataPoint> getSortedAverageDataSetValues​(SubstanceInterface xmldata)
      Get a list of MyComparableDataPoint entries from a xmldata-node.
      Parameters:
      xmldata - A xml data node or a specific xml series data node.
      Returns:
      A list of MyComparableDataPoint entries.
    • getSortedAverageDataSetValues

      public static List<MyComparableDataPoint> getSortedAverageDataSetValues​(SubstanceInterface xmldata, boolean removeEmptyConditions)
    • getSortedLines

      public static ArrayList<Node> getSortedLines​(NodeList lines)
    • getSortedDataSetValues

      public static List<MyComparableDataPoint> getSortedDataSetValues​(SubstanceInterface xmldata)
      Parameters:
      xmldata - A xml data mapping node or a specific xml line data node
      Returns:
    • setNodeComponentType

      public static void setNodeComponentType​(GraphElement ge, String nodeType)
    • getNodeComponentType

      public static String getNodeComponentType​(Node node)
    • getLabelFont

      public static Font getLabelFont​(Node node)
    • getLabelColor

      public static Color getLabelColor​(Node node)
    • getChartTitleFont

      public static Font getChartTitleFont​(GraphElement ge)
    • getChartTitleColor

      public static Paint getChartTitleColor​(GraphElement ge)
    • getChartBackgroundColor

      public static Color getChartBackgroundColor​(GraphElement ge)
    • getChartBackgroundColor

      public static Color getChartBackgroundColor​(GraphElement ge, int idx)
    • getGridColor

      public static Color getGridColor​(Graph g, Color defaultColor)
    • getAxisColor

      public static Color getAxisColor​(Graph g, Color defaultColor)
    • getCategoryBackgroundColorA

      public static Color getCategoryBackgroundColorA​(Graph g, Color defaultColor)
    • getCategoryBackgroundColorB

      public static Color getCategoryBackgroundColorB​(Graph g, Color defaultColor)
    • getCategoryBackgroundColorC

      public static Color getCategoryBackgroundColorC​(Graph g, Color defaultColor)
    • getColorAttributeValue

      public static Color getColorAttributeValue​(Graph g, String attName, Color defaultColor)
    • setCenter

      public static void setCenter​(List<Node> nodeList, Vector2d center)