Package simtools.shapes

Examples of simtools.shapes.AbstractShape.addListener()


          io = new ObjectInputStream(bi);
          svg=(ShapesContainer)io.readObject();
          editor.addComponent(svg.getComponent());
          for (Iterator it = svg.iterator(); it.hasNext();) {
            AbstractShape abs = (AbstractShape)it.next();
            abs.addListener( (ShapeListener)svg.getComponent());
          }
             
        } catch (IOException e1) {
          e1.printStackTrace();
        } catch (ClassNotFoundException e2) {
View Full Code Here


    protected void restoreAbsoluteLinks(ShapesContainer sc, File f) throws IOException{
        for (Iterator it = sc.iterator(); it.hasNext();) {
            try {
                AbstractShape abs = (AbstractShape) it.next();
                abs.addListener( (ShapeListener)sc.getComponent());
                if (!(abs instanceof Linkable)) {
                    continue;
                }
                Linkable l = (Linkable) abs;
                // Now trying to restore absolute file
View Full Code Here

                is.close();
                fis.close(); // also closes the file
                for (Iterator it = sc.iterator(); it.hasNext();) {
                    try {
                        AbstractShape abs = (AbstractShape) it.next();
                        abs.addListener( (ShapeListener)sc.getComponent());
                        if (!(abs instanceof Linkable)) {
                            continue;
                        }
                        Linkable l = (Linkable) abs;
                        // Now trying to restore absolute file
View Full Code Here

        sc.getComponent().setName(name);
        // Restoring absolute links
        for (Iterator it = sc.iterator(); it.hasNext();) {
            try {
                AbstractShape abs = (AbstractShape) it.next();
                abs.addListener( (ShapeListener)sc.getComponent());
                if (!(abs instanceof Linkable)) {
                    continue;
                }
                Linkable l = (Linkable) abs;
                // Now trying to restore absolute file
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.