Package org.eclnt.ccaddons.diagram.util
Class ChartUtils
java.lang.Object
org.eclnt.ccaddons.diagram.util.ChartUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int[]adjustToBorder(int x, int y, int x1, int x2, int y1, int y2) static intadjustToBorders(int i, int lower, int upper) static int[]adjustToLine(int x, int y, int[][] points) static intcalculateAnchorNumberLeftRight(int size, int pos, int anchorCount) static intcalculateAnchorNumberTopBottom(int size, int pos, int anchorCount, ShapeType shapeType) static int[][]calculateLineCoords(ChartLineInstance cli, ChartShapeInstance csi_from, ChartShapeInstance csi_to, ShapeType csi_fromType, ShapeType csi_toType) static booleancheckAndCorrectArrowTypes(ShapeRepository repository, ChartLineInstance lineInstance) static booleancheckIfShapeIntersect(int outerX, int outerY, int outerWidth, int outerHeight, int innerX, int innerY, int innerWidth, int innerHeight) static booleancheckIfShapeIntersect(int outerX, int outerY, int outerWidth, int outerHeight, ChartShapeInstance inner) static booleancheckIfShapeIsContained(ChartShapeInstance outer, int[] innerBounds) static booleancheckIfShapeIsContained(ChartShapeInstance outer, ChartShapeInstance inner) static booleancheckIfShapeIsInside(int outerX, int outerY, int outerWidth, int outerHeight, int innerX, int innerY, int innerWidth, int innerHeight) static booleancheckIfShapeIsInside(int outerX, int outerY, int outerWidth, int outerHeight, ChartShapeInstance inner) static int[]static ENUMLineAnchorfindAnchorByQuadrant(int[] coords, ChartShapeInstance csi, ENUMLineAnchor anchor, ENUMLineAnchor defaultAnchor) static ChartShapeInstancefindContainerShape(ShapeRepository repository, Chart chart, ChartShapeInstance innerShape) static ChartShapeInstancefindContainerShapeContains(ShapeRepository repository, Chart chart, int[] bounds) static ChartShapeInstancefindContainerShapeIntersect(ShapeRepository repository, Chart chart, int[] bounds) static LineTypefindPreferredLineType(ShapeRepository repository, ChartShapeInstance shapeFrom, ChartShapeInstance shapeTo) static List<ChartShapeInstance>findShapesContained(Chart chart, ChartShapeInstance outerShape) static final Stringstatic final Stringstatic booleanintersect(ChartShapeInstance csi, int[] coordsFrom, int[] coordsTo) static boolean
-
Constructor Details
-
ChartUtils
public ChartUtils()
-
-
Method Details
-
findAnchorByQuadrant
public static ENUMLineAnchor findAnchorByQuadrant(int[] coords, ChartShapeInstance csi, ENUMLineAnchor anchor, ENUMLineAnchor defaultAnchor) -
isLineConnectedToShape
-
intersect
-
calculateLineCoords
public static int[][] calculateLineCoords(ChartLineInstance cli, ChartShapeInstance csi_from, ChartShapeInstance csi_to, ShapeType csi_fromType, ShapeType csi_toType) throws Exception - Throws:
Exception
-
decodeCSV2IntArray
-
adjustToBorder
public static int[] adjustToBorder(int x, int y, int x1, int x2, int y1, int y2) -
adjustToBorders
public static int adjustToBorders(int i, int lower, int upper) -
adjustToLine
public static int[] adjustToLine(int x, int y, int[][] points) -
findShapesContained
public static List<ChartShapeInstance> findShapesContained(Chart chart, ChartShapeInstance outerShape) -
findContainerShape
public static ChartShapeInstance findContainerShape(ShapeRepository repository, Chart chart, ChartShapeInstance innerShape) -
checkIfShapeIsContained
-
checkIfShapeIsContained
-
checkIfShapeIsInside
public static boolean checkIfShapeIsInside(int outerX, int outerY, int outerWidth, int outerHeight, ChartShapeInstance inner) -
checkIfShapeIsInside
public static boolean checkIfShapeIsInside(int outerX, int outerY, int outerWidth, int outerHeight, int innerX, int innerY, int innerWidth, int innerHeight) -
checkIfShapeIntersect
public static boolean checkIfShapeIntersect(int outerX, int outerY, int outerWidth, int outerHeight, ChartShapeInstance inner) -
checkIfShapeIntersect
public static boolean checkIfShapeIntersect(int outerX, int outerY, int outerWidth, int outerHeight, int innerX, int innerY, int innerWidth, int innerHeight) -
findContainerShapeContains
public static ChartShapeInstance findContainerShapeContains(ShapeRepository repository, Chart chart, int[] bounds) -
findContainerShapeIntersect
public static ChartShapeInstance findContainerShapeIntersect(ShapeRepository repository, Chart chart, int[] bounds) -
findPreferredLineType
public static LineType findPreferredLineType(ShapeRepository repository, ChartShapeInstance shapeFrom, ChartShapeInstance shapeTo) -
checkAndCorrectArrowTypes
public static boolean checkAndCorrectArrowTypes(ShapeRepository repository, ChartLineInstance lineInstance) -
getSVGTextAlign
-
getTextAlign
-
calculateAnchorNumberLeftRight
public static int calculateAnchorNumberLeftRight(int size, int pos, int anchorCount) -
calculateAnchorNumberTopBottom
public static int calculateAnchorNumberTopBottom(int size, int pos, int anchorCount, ShapeType shapeType)
-