Examples of SketchCanvas


Examples of org.joshy.sketch.canvas.SketchCanvas

        EventBus.getSystem().addListener(sp, ChangedEvent.DoubleChanged, new Callback<ChangedEvent>(){
            public void call(ChangedEvent event) {
                offset = (Double) event.getValue();
                if(context.getCanvas() instanceof SketchCanvas) {
                    SketchCanvas sc = (SketchCanvas) context.getCanvas();
                    if(vertical) {
                        offset += sc.offsetY;
                    } else {
                        offset += sc.offsetX;
                    }
View Full Code Here

Examples of org.joshy.sketch.canvas.SketchCanvas

    private TreeViewPanel treePanel;
    private DrawArrowTool drawArrowTool;

    public VectorDocContext(Main main, VectorModeHelper helper) {
        super(main,helper);
        canvas =  new SketchCanvas(this);

        EventBus.getSystem().addListener(SystemMenuEvent.FileDrop, new Callback<SystemMenuEvent>() {
            public void call(SystemMenuEvent event) throws Exception {
                if(event.getSource() == getStage()) {
                    //u.p("the user dropped some files in:");
View Full Code Here

Examples of org.joshy.sketch.canvas.SketchCanvas

    //test loading version -1 and auto-upgrading it to version 0
    @Test public void versionN1to0Test() throws Exception {
        u.p("running a version upgrade test");
        VectorModeHelper helper = new VectorModeHelper(null);
        VectorDocContext context = helper.createDocContext(null);
        SketchCanvas canvas = new SketchCanvas(context);
        OpenAction action = new OpenAction(null);
        u.p("Url = " + this.getClass().getResource("oldVersion_-1.xml"));
        action.load(this.getClass().getResourceAsStream("oldVersion_-1.xml"),null,"oldVersion_-1.xml",null);
        SketchDocument doc = canvas.getDocument();
        u.p("canvas doc = " + doc);
        for(SNode shape : doc.getCurrentPage().getNodes()) {
            u.p("shape = " + shape);
        }
    }
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.