Package bridge.klassen

Examples of bridge.klassen.DrawingAPI


       
        for (Shape shape : shapes) {
         
          for(int i=0; i<shape.getChildren().size(); i++) {
           
            DrawingAPI object = (DrawingAPI) shape.getGraphicObjectByIndex(i);
           
            System.out.println(shape.getGraphicObjectByIndex(i).toString());
           
            if(shape.getGraphicObjectByIndex(i).toString().contains("Dreieck")) {
              shape.switchObjectTo(new DreieckRot(object.getX(), object.getY(), object.getWidth(), object.getHeight()), i);
            }
           
            else if(shape.getGraphicObjectByIndex(i).toString().contains("Rechteck")) {
              shape.switchObjectTo(new RechteckRot(object.getX(), object.getY(), object.getWidth(), object.getHeight()), i);
            }
           
            else if(shape.getGraphicObjectByIndex(i).toString().contains("Kreis")) {
              shape.switchObjectTo(new KreisRot(object.getX(), object.getY(), object.getWidth(), object.getHeight()), i);
            }
          }
          }

        break;
       
       
 
     
      case DEFAULT:
       
        for (Shape shape : shapes) {
         
          for(int i=0; i<shape.getChildren().size(); i++) {
           
            DrawingAPI object = (DrawingAPI) shape.getGraphicObjectByIndex(i);
           
            System.out.println(shape.getGraphicObjectByIndex(i).toString());
           
            if(shape.getGraphicObjectByIndex(i).toString().contains("Dreieck")) {
              shape.switchObjectTo(new Dreieck(object.getX(), object.getY(), object.getWidth(), object.getHeight()), i);
            }
           
            else if(shape.getGraphicObjectByIndex(i).toString().contains("Rechteck")) {
              shape.switchObjectTo(new Rechteck(object.getX(), object.getY(), object.getWidth(), object.getHeight()), i);
            }
           
            else if(shape.getGraphicObjectByIndex(i).toString().contains("Kreis")) {
              shape.switchObjectTo(new Kreis(object.getX(), object.getY(), object.getWidth(), object.getHeight()), i);
            }
          }
          }

        break;
View Full Code Here

TOP

Related Classes of bridge.klassen.DrawingAPI

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.