Class ChartUtils

java.lang.Object
org.eclnt.ccaddons.diagram.util.ChartUtils

public class ChartUtils extends Object
  • Constructor Details

    • ChartUtils

      public ChartUtils()
  • Method Details

    • findAnchorByQuadrant

      public static ENUMLineAnchor findAnchorByQuadrant(int[] coords, ChartShapeInstance csi, ENUMLineAnchor anchor, ENUMLineAnchor defaultAnchor)
    • isLineConnectedToShape

      public static boolean isLineConnectedToShape(ChartLineInstance cli, ChartShapeInstance csi)
    • intersect

      public static boolean intersect(ChartShapeInstance csi, int[] coordsFrom, int[] coordsTo)
    • calculateLineCoords

      public static int[][] calculateLineCoords(ChartLineInstance cli, ChartShapeInstance csi_from, ChartShapeInstance csi_to, ShapeType csi_fromType, ShapeType csi_toType) throws Exception
      Throws:
      Exception
    • decodeCSV2IntArray

      public static int[] decodeCSV2IntArray(String s)
    • 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

      public static boolean checkIfShapeIsContained(ChartShapeInstance outer, ChartShapeInstance inner)
    • checkIfShapeIsContained

      public static boolean checkIfShapeIsContained(ChartShapeInstance outer, int[] innerBounds)
    • 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

      public static final String getSVGTextAlign(ChartLineInstance cli)
    • getTextAlign

      public static final String getTextAlign(ChartLineInstance cli)
    • calculateAnchorNumberLeftRight

      public static int calculateAnchorNumberLeftRight(int size, int pos, int anchorCount)
    • calculateAnchorNumberTopBottom

      public static int calculateAnchorNumberTopBottom(int size, int pos, int anchorCount, ShapeType shapeType)