Package diva.canvas.toolbox

Examples of diva.canvas.toolbox.BasicRectangle


        Line2D line2 = new Line2D.Double(70, 50, 90, 50);
        graphic.add(new PaintedPath(line2));

        // Create the icon
        BasicRectangle background = new BasicRectangle(0, 0, 100, 100,
                Color.green.brighter().brighter());
        IconFigure _icon1 = new IconFigure(background, graphic);
        layer.add(_icon1);
        _icon1.setInteractor(defaultInteractor);
View Full Code Here


    /** Create the figures.
     */
    public void createFigures() {
        FigureLayer layer = graphicsPane.getForegroundLayer();

        _rectangle = new BasicRectangle(50, 50, 80, 80, Color.black);
        layer.add(_rectangle);

        _circle = new BasicEllipse(150, 50, 80, 80, Color.green);
        layer.add(_circle);

View Full Code Here

        // Create the interactor to do the work.
        Interactor dragger = new DragInteractor();
        dragger.setMouseFilter(MouseFilter.defaultFilter);

        // Create a rectangle and make it draggable
        BasicFigure blue = new BasicRectangle(10.0, 10.0, 50.0, 50.0,
                Color.blue);
        layer.add(blue);
        blue.setInteractor(dragger);

        // Create a circle and make it draggable
        BasicFigure red = new BasicEllipse(200.0, 200.0, 50.0, 50.0, Color.red);
        layer.add(red);
        red.setInteractor(dragger);
View Full Code Here

    /** Create a composite figure that does not have a background
     */
    public void createCompositeFigure() {
        CompositeFigure tc = new CompositeFigure();
        Figure bg = new BasicRectangle(100.0, 100.0, 100.0, 100.0, Color.green);
        tc.add(bg);
        layer.add(tc);
        tc.setInteractor(defaultInteractor);
        addPorts(tc);
    }
View Full Code Here

    /** Create a composite figure that uses the background facility.
     * Generally, for figures of this nature, this is a better thing to do.
     */
    public void createBackgroundedCompositeFigure() {
        CompositeFigure tc = new CompositeFigure();
        Figure bg = new BasicRectangle(100.0, 100.0, 100.0, 100.0, Color.blue);
        tc.setBackgroundFigure(bg);
        layer.add(tc);
        tc.setInteractor(defaultInteractor);
        addPorts(tc);
        tc.translate(200.0, 0);
View Full Code Here

     * This is fairly uninteresting.
     */
    public void createFigures() {
        FigureLayer layer = graphicsPane.getForegroundLayer();

        figureA = new BasicRectangle(10.0, 10.0, 100.0, 50.0, Color.red);
        figureB = new BasicEllipse(100.0, 100.0, 100.0, 100.0, Color.green);
        figureC = new BasicEllipse(300.0, 100.0, 100.0, 100.0, Color.blue);

        layer.add(figureA);
        layer.add(figureB);
View Full Code Here

            Line2D line2 = new Line2D.Double(70, 50, 90, 50);
            graphic.add(new PaintedPath(line2));

            // Create the icon
            BasicRectangle background = new BasicRectangle(0, 0, 100, 100,
                    Color.green);
            IconFigure icon = new IconFigure(background, graphic);

            // Add its terminals
            createTerminals(icon);
View Full Code Here

    public static class CompositeFigureFactory1 implements
            FigureTest.FigureFactory {
        // FindBugs suggests making this class static so as to decrease
        // the size of instances and avoid dangling references.
        public Figure createFigure() {
            Figure bg = new BasicRectangle(10, 10, 20, 20, Color.blue);
            Figure cf = new CompositeFigure(bg);
            return cf;
        }
View Full Code Here

    public static class PaneWrapperFactory implements FigureTest.FigureFactory {
        // FindBugs suggests making this class static so as to decrease
        // the size of instances and avoid dangling references.

        public Figure createFigure() {
            Figure bg = new BasicRectangle(10, 10, 20, 20, Color.blue);
            CanvasPane pane = new GraphicsPane();
            pane.setSize(300.0, 300.0);

            PaneWrapper wrapper = new PaneWrapper(pane);
            wrapper.setBackground(bg);
View Full Code Here

            FigureTest.FigureFactory {
        // FindBugs suggests making this class static so as to decrease
        // the size of instances and avoid dangling references.

        public Figure createFigure() {
            return new BasicRectangle(10, 10, 20, 20);
        }
View Full Code Here

TOP

Related Classes of diva.canvas.toolbox.BasicRectangle

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.