Class NodeTools
java.lang.Object
de.ipk_gatersleben.ag_nw.graffiti.NodeTools
- Direct Known Subclasses:
IAPnodeTools
public class NodeTools extends Object
-
Constructor Summary
Constructors Constructor Description NodeTools()
-
Method Summary
Modifier and Type Method Description static Color
getAxisColor(Graph g, Color defaultColor)
static Color
getCategoryBackgroundColorA(Graph g, Color defaultColor)
static Color
getCategoryBackgroundColorB(Graph g, Color defaultColor)
static Color
getCategoryBackgroundColorC(Graph g, Color defaultColor)
static Vector2d
getCenter(Collection<?> nodeList)
Calculates the center of a number of given nodes (other Graph elements are ignored).static Vector3d
getCenter3d(Collection<?> nodeList)
static Color
getChartBackgroundColor(GraphElement ge)
static Color
getChartBackgroundColor(GraphElement ge, int idx)
static Paint
getChartTitleColor(GraphElement ge)
static Font
getChartTitleFont(GraphElement ge)
static String
getClusterID(GraphElement node, String idIfNoCluster)
static Color
getColorAttributeValue(Graph g, String attName, Color defaultColor)
static List<MyComparableDataPoint>
getDataTimePoints(GraphElement n, boolean useSampleAverage)
static Color
getGridColor(Graph g, Color defaultColor)
static Color
getLabelColor(Node node)
static Font
getLabelFont(Node node)
static List<SubstanceInterface>
getMappedDataListFromNode(GraphElement graphElement)
static Vector2d
getMaximumXY(Collection<Node> nodeList, double factorXY, double minx, double miny, boolean includeSizeInformation)
static Vector2d
getMaximumXY(Collection<Node> nodeList, double factorXY, double minx, double miny, boolean includeSizeInformation, boolean includeInvisibleNodes)
static Vector2d
getMinimumXY(Collection<Node> nodeList, double factorXY, double subx, double suby, boolean includeSizeInformation)
static Vector2d
getMinimumXY(Collection<Node> nodeList, double factorXY, double subx, double suby, boolean includeSizeInformation, boolean includeInvisibleNodes)
static String
getNodeComponentType(Node node)
static List<MyComparableDataPoint>
getSortedAverageDataSetValues(SubstanceInterface xmldata)
Get a list ofMyComparableDataPoint
entries from a xmldata-node.static List<MyComparableDataPoint>
getSortedAverageDataSetValues(SubstanceInterface xmldata, boolean removeEmptyConditions)
static List<MyComparableDataPoint>
getSortedDataSetValues(SubstanceInterface xmldata)
static ArrayList<Node>
getSortedLines(NodeList lines)
static void
setCenter(List<Node> nodeList, Vector2d center)
static void
setClusterID(GraphElement node, String clusterId)
static void
setNodeComponentType(GraphElement ge, String nodeType)
-
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
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 eitherNode
objects, orNodeCacheEntry
objects.- Returns:
- A
Vector2d
containing the position of the center.
-
getCenter3d
-
getClusterID
-
setClusterID
-
getDataTimePoints
public static List<MyComparableDataPoint> getDataTimePoints(GraphElement n, boolean useSampleAverage) -
getMappedDataListFromNode
-
getSortedAverageDataSetValues
public static List<MyComparableDataPoint> getSortedAverageDataSetValues(SubstanceInterface xmldata)Get a list ofMyComparableDataPoint
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
-
getSortedDataSetValues
- Parameters:
xmldata
- A xml data mapping node or a specific xml line data node- Returns:
-
setNodeComponentType
-
getNodeComponentType
-
getLabelFont
-
getLabelColor
-
getChartTitleFont
-
getChartTitleColor
-
getChartBackgroundColor
-
getChartBackgroundColor
-
getGridColor
-
getAxisColor
-
getCategoryBackgroundColorA
-
getCategoryBackgroundColorB
-
getCategoryBackgroundColorC
-
getColorAttributeValue
-
setCenter
-