Package org.joshy.sketch.model

Examples of org.joshy.sketch.model.SShape$SShapeListener


            if(context.getSelection().isEmpty()) return;
            if(context.getSelection().size() != 1) return;

            SNode first = context.getSelection().firstItem();
            if(! (first instanceof SShape)) return;
            SShape shape = (SShape) first;
            if(shape instanceof SPath) return;

            SPath path = shape.toPath();
            SketchDocument.SketchPage page = context.getDocument().getCurrentPage();
            page.remove(shape);
            page.add(path);
            context.redraw();
        }
View Full Code Here


                }
                if(underCursor.isEmpty()) {
                } else {
                    SNode node = underCursor.get(underCursor.size() - 1);
                    if(node instanceof SShape) {
                        SShape shape = ((SShape)node);
                        if(shape.getFillPaint() instanceof FlatColor) {
                            return (FlatColor) shape.getFillPaint();
                        }
                    }
                }

                return super.getColorAt(event);    //To change body of overridden methods use File | Settings | File Templates.
View Full Code Here

                    applyToArea(area, node, count);
                    count++;
                }
                final SArea sarea = new SArea(area);
                if(selection.get(0) instanceof SShape) {
                    SShape first = (SShape) selection.get(0);
                    sarea.setFillPaint(first.getFillPaint().duplicate());
                    sarea.setFillOpacity(first.getFillOpacity());
                    sarea.setStrokePaint(first.getStrokePaint());
                    sarea.setStrokeWidth(first.getStrokeWidth());
                }
                page.add(sarea);

                context.getSelection().setSelectedNode(sarea);
                context.getCanvas().redraw();
View Full Code Here

TOP

Related Classes of org.joshy.sketch.model.SShape$SShapeListener

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.