directededgefactory.java

来自「UML设计测试工具」· Java 代码 · 共 404 行 · 第 1/2 页

JAVA
404
字号
     * @param fragmentLength length of a single dash     * @param intersectionLength intersection between two dashes     * @return UML dashed edge     * @throws Exception     */    public static I_DirectedEdge createDashedEdge(final int sourceX, final int sourceY,                                                  final int targetX, final int targetY,                                                  final int fragmentLength, final int intersectionLength)            throws Exception {        return new DirectedEdge(DirectedGraphicFactory.EMPTY_HEAD, DashedDirectedLine.class,                sourceX, sourceY, targetX, targetY, fragmentLength, intersectionLength);    }    /**     * Creates and draws an UML inheritance edge between the given coordinates into the given graphic     *     * @param graphic graphic to draw into     * @param sourceX X coordinate of source point     * @param sourceY Y coordinate of source point     * @param targetX X coordinate of target point     * @param targetY Y coordinate of target point     * @return UML inheritance edge     * @throws Exception     */    public static I_DirectedEdge drawInheritance(final Graphics graphic, final int sourceX,                                                 final int sourceY, final int targetX, final int targetY)            throws Exception {        return createInheritance(sourceX, sourceY, targetX, targetY).draw(graphic);    }    /**     * Creates and draws an UML implementation edge between the given coordinates into the given graphic with     * default length of dashes     *     * @param graphic graphic to draw into     * @param sourceX X coordinate of source point     * @param sourceY Y coordinate of source point     * @param targetX X coordinate of target point     * @param targetY Y coordinate of target point     * @return UML implementation edge     * @throws Exception     */    public static I_DirectedEdge drawImplementation(final Graphics graphic, final int sourceX,                                                    final int sourceY, final int targetX, final int targetY)            throws Exception {        return createImplementation(sourceX, sourceY, targetX, targetY).draw(graphic);    }    /**     * Creates and draws an UML implementation edge between the given coordinates into the given graphic with     * customized length of dashes     *     * @param graphic            graphic to draw into     * @param sourceX            X coordinate of source point     * @param sourceY            Y coordinate of source point     * @param targetX            X coordinate of target point     * @param targetY            Y coordinate of target point     * @param fragmentLength     length of a single dash     * @param intersectionLength intersection between two dashes     * @return UML implementation edge     * @throws Exception     */    public static I_DirectedEdge drawImplementation(final Graphics graphic, final int sourceX,                                                    final int sourceY, final int targetX, final int targetY,                                                    final int fragmentLength, final int intersectionLength)    throws Exception {        return createImplementation(sourceX, sourceY, targetX, targetY,                                     fragmentLength, intersectionLength).draw(graphic);    }    /**     * Creates and draws an UML aggregation edge between the given coordinates into the given graphic     *     * @param graphic graphic to draw into     * @param sourceX X coordinate of source point     * @param sourceY Y coordinate of source point     * @param targetX X coordinate of target point     * @param targetY Y coordinate of target point     * @return UML aggregation edge     * @throws Exception     */    public static I_DirectedEdge drawAggregation(final Graphics graphic, final int sourceX,                                                 final int sourceY, final int targetX, final int targetY)            throws Exception {        return createAggregation(sourceX, sourceY, targetX, targetY).draw(graphic);    }    /**     * Creates and draws an UML composition edge between the given coordinates into the given graphic     *     * @param graphic graphic to draw into     * @param sourceX X coordinate of source point     * @param sourceY Y coordinate of source point     * @param targetX X coordinate of target point     * @param targetY Y coordinate of target point     * @return UML composition edge     * @throws Exception     */    public static I_DirectedEdge drawComposition(final Graphics graphic, final int sourceX,                                                 final int sourceY, final int targetX, final int targetY)            throws Exception {        return createComposition(sourceX, sourceY, targetX, targetY).draw(graphic);    }    /**     * Creates and draws an UML dependency edge between the given coordinates into the given graphic with     * default length of dashes     *     * @param graphic graphic to draw into     * @param sourceX X coordinate of source point     * @param sourceY Y coordinate of source point     * @param targetX X coordinate of target point     * @param targetY Y coordinate of target point     * @return UML dependency edge     * @throws Exception     */    public static I_DirectedEdge drawDependency(final Graphics graphic, final int sourceX,                                                final int sourceY, final int targetX, final int targetY)            throws Exception {        return createDependency(sourceX, sourceY, targetX, targetY).draw(graphic);    }    /**     * Creates and draws an UML dependency edge between the given coordinates into the given graphic with     * customized length of dashes     *     * @param graphic            graphic to draw into     * @param sourceX            X coordinate of source point     * @param sourceY            Y coordinate of source point     * @param targetX            X coordinate of target point     * @param targetY            Y coordinate of target point     * @param fragmentLength     length of a single dash     * @param intersectionLength intersection between two dashes     * @return UML dependency edge     * @throws Exception     */    public static I_DirectedEdge drawDependency(final Graphics graphic, final int sourceX,                                                final int sourceY, final int targetX, final int targetY,                                                final int fragmentLength, final int intersectionLength)            throws Exception {        return createDependency(sourceX, sourceY, targetX, targetY, fragmentLength, intersectionLength).draw(graphic);    }    /**     * Creates and draws an UML associtation edge between the given coordinates into the given graphic     *     * @param graphic graphic to draw into     * @param sourceX X coordinate of source point     * @param sourceY Y coordinate of source point     * @param targetX X coordinate of target point     * @param targetY Y coordinate of target point     * @return UML associtation edge     * @throws Exception     */    public static I_DirectedEdge drawAssociation(final Graphics graphic, final int sourceX,                                                 final int sourceY, final int targetX, final int targetY)            throws Exception {        return createAssociation(sourceX, sourceY, targetX, targetY).draw(graphic);    }    /**     * Creates and draws an UML dashed edge between the given coordinates into the given graphic     *     * @param graphic graphic to draw into     * @param sourceX X coordinate of source point     * @param sourceY Y coordinate of source point     * @param targetX X coordinate of target point     * @param targetY Y coordinate of target point     * @return UML dashed edge     * @throws Exception     */    public static I_DirectedEdge drawDashedEdge(final Graphics graphic, final int sourceX,                                                final int sourceY, final int targetX, final int targetY)            throws Exception {        return createDashedEdge(sourceX, sourceY, targetX, targetY).draw(graphic);    }    /**     * Creates and draws an UML dashed edge between the given coordinates into the given graphic with     * customized length of dashes     *     * @param graphic graphic to draw into     * @param sourceX X coordinate of source point     * @param sourceY Y coordinate of source point     * @param targetX X coordinate of target point     * @param targetY Y coordinate of target point     * @param fragmentLength length of a single dash     * @param intersectionLength intersection between two dashes     * @return UML dashed edge     * @throws Exception     */    public static I_DirectedEdge drawDashedEdge(final Graphics graphic, final int sourceX,                                                final int sourceY, final int targetX, final int targetY,                                                 final int fragmentLength, final int intersectionLength)            throws Exception {        return createDashedEdge(sourceX, sourceY, targetX, targetY, fragmentLength, intersectionLength).draw(graphic);    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?