Examples of ModelAddAction


Examples of com.cburch.draw.actions.ModelAddAction

            CanvasObject add = null;
            if (bds.getWidth() != 0 && bds.getHeight() != 0) {
                CanvasModel model = canvas.getModel();
                add = createShape(bds.getX(), bds.getY(),
                        bds.getWidth(), bds.getHeight());
                canvas.doAction(new ModelAddAction(model, add));
                repaintArea(canvas, oldBounds.add(bds));
            }
            canvas.toolGestureComplete(this, add);
        }
    }
View Full Code Here

Examples of com.cburch.draw.actions.ModelAddAction

                canvasAction = new ModelReorderAction(getModel(), mod);
            }
        }

        if (canvasAction instanceof ModelAddAction) {
            ModelAddAction addAction = (ModelAddAction) canvasAction;
            int cur = addAction.getDestinationIndex();
            int max = getMaxIndex(getModel());
            if (cur > max) {
                canvasAction = new ModelAddAction(getModel(),
                        addAction.getObjects(), max + 1);
            }
        }

        proj.doAction(new CanvasActionAdapter(circuit, canvasAction));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.