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 int
adjustToBorders
(int i, int lower, int upper) static int[]
adjustToLine
(int x, int y, int[][] points) static int
calculateAnchorNumberLeftRight
(int size, int pos, int anchorCount) static int
calculateAnchorNumberTopBottom
(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 boolean
checkAndCorrectArrowTypes
(ShapeRepository repository, ChartLineInstance lineInstance) static boolean
checkIfShapeIntersect
(int outerX, int outerY, int outerWidth, int outerHeight, int innerX, int innerY, int innerWidth, int innerHeight) static boolean
checkIfShapeIntersect
(int outerX, int outerY, int outerWidth, int outerHeight, ChartShapeInstance inner) static boolean
checkIfShapeIsContained
(ChartShapeInstance outer, int[] innerBounds) static boolean
checkIfShapeIsContained
(ChartShapeInstance outer, ChartShapeInstance inner) static boolean
checkIfShapeIsInside
(int outerX, int outerY, int outerWidth, int outerHeight, int innerX, int innerY, int innerWidth, int innerHeight) static boolean
checkIfShapeIsInside
(int outerX, int outerY, int outerWidth, int outerHeight, ChartShapeInstance inner) static int[]
static ENUMLineAnchor
findAnchorByQuadrant
(int[] coords, ChartShapeInstance csi, ENUMLineAnchor anchor, ENUMLineAnchor defaultAnchor) static ChartShapeInstance
findContainerShape
(ShapeRepository repository, Chart chart, ChartShapeInstance innerShape) static ChartShapeInstance
findContainerShapeContains
(ShapeRepository repository, Chart chart, int[] bounds) static ChartShapeInstance
findContainerShapeIntersect
(ShapeRepository repository, Chart chart, int[] bounds) static LineType
findPreferredLineType
(ShapeRepository repository, ChartShapeInstance shapeFrom, ChartShapeInstance shapeTo) static List<ChartShapeInstance>
findShapesContained
(Chart chart, ChartShapeInstance outerShape) static final String
static final String
static boolean
intersect
(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)
-