Package net.sf.graphiti.ui.figure.shapes

Examples of net.sf.graphiti.ui.figure.shapes.IShape


    // attributes
    int width = (Integer) type.getAttribute(ObjectType.ATTRIBUTE_WIDTH);
    int height = (Integer) type.getAttribute(ObjectType.ATTRIBUTE_HEIGHT);
    Color color = (Color) type.getAttribute(ObjectType.ATTRIBUTE_COLOR);
    String name = (String) type.getAttribute(ObjectType.ATTRIBUTE_SHAPE);
    IShape shape = ShapeFactory.createShape(name);

    // adjust width and height
    double ratio = (double) width / (double) height;
    width = 16;
    height = (int) (width / ratio);
View Full Code Here


    // Get dimension, color, shape
    Dimension dimension = new Dimension(width, height);
    Color color = (Color) vertex.getAttribute(ObjectType.ATTRIBUTE_COLOR);
    String name = (String) vertex.getAttribute(ObjectType.ATTRIBUTE_SHAPE);
    IShape shape = ShapeFactory.createShape(name);

    // Creates the figure with the specified properties, sets its id
    Font font = ((GraphicalEditPart) getParent()).getFigure().getFont();
    VertexFigure figure = new VertexFigure(font, dimension, color, shape);
    String id = (String) vertex.getValue(ObjectType.PARAMETER_ID);
View Full Code Here

TOP

Related Classes of net.sf.graphiti.ui.figure.shapes.IShape

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.