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 ColorgetAxisColor(Graph g, Color defaultColor)static ColorgetCategoryBackgroundColorA(Graph g, Color defaultColor)static ColorgetCategoryBackgroundColorB(Graph g, Color defaultColor)static ColorgetCategoryBackgroundColorC(Graph g, Color defaultColor)static Vector2dgetCenter(Collection<?> nodeList)Calculates the center of a number of given nodes (other Graph elements are ignored).static Vector3dgetCenter3d(Collection<?> nodeList)static ColorgetChartBackgroundColor(GraphElement ge)static ColorgetChartBackgroundColor(GraphElement ge, int idx)static PaintgetChartTitleColor(GraphElement ge)static FontgetChartTitleFont(GraphElement ge)static StringgetClusterID(GraphElement node, String idIfNoCluster)static ColorgetColorAttributeValue(Graph g, String attName, Color defaultColor)static List<MyComparableDataPoint>getDataTimePoints(GraphElement n, boolean useSampleAverage)static ColorgetGridColor(Graph g, Color defaultColor)static ColorgetLabelColor(Node node)static FontgetLabelFont(Node node)static List<SubstanceInterface>getMappedDataListFromNode(GraphElement graphElement)static Vector2dgetMaximumXY(Collection<Node> nodeList, double factorXY, double minx, double miny, boolean includeSizeInformation)static Vector2dgetMaximumXY(Collection<Node> nodeList, double factorXY, double minx, double miny, boolean includeSizeInformation, boolean includeInvisibleNodes)static Vector2dgetMinimumXY(Collection<Node> nodeList, double factorXY, double subx, double suby, boolean includeSizeInformation)static Vector2dgetMinimumXY(Collection<Node> nodeList, double factorXY, double subx, double suby, boolean includeSizeInformation, boolean includeInvisibleNodes)static StringgetNodeComponentType(Node node)static List<MyComparableDataPoint>getSortedAverageDataSetValues(SubstanceInterface xmldata)Get a list ofMyComparableDataPointentries 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 voidsetCenter(List<Node> nodeList, Vector2d center)static voidsetClusterID(GraphElement node, String clusterId)static voidsetNodeComponentType(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 eitherNodeobjects, orNodeCacheEntryobjects.- Returns:
- A
Vector2dcontaining 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 ofMyComparableDataPointentries from a xmldata-node.- Parameters:
xmldata- A xml data node or a specific xml series data node.- Returns:
- A list of
MyComparableDataPointentries.
-
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
-