Package sw_digitalworks.Model

Examples of sw_digitalworks.Model.Component.copy()


     * @throws IOException
     */
    private void cloneComposite() throws FileNotFoundException, IOException {
        if (Main.Components.containsKey(command) && Pattern.matches("\\(\\d{1,4}\\,\\d{1,4}\\)", param1)) {
            Component composite = Main.Components.get(command);
            Composit newcomp = (Composit)composite.copy();
            Main.controller.getDisplayView().addComponentView(new CompositeView(getPosX(param1),getPosY(param1),newcomp));
            System.out.println(newcomp.getName() + " CREATED a copy of " + composite.getName());
            output += newcomp.getName() + " CREATED a copy of " + composite.getName() + "\n";
        } else if (Main.Components.containsKey(command) && param1.equals("")){
            Component composite = Main.Components.get(command);
View Full Code Here


            Main.controller.getDisplayView().addComponentView(new CompositeView(getPosX(param1),getPosY(param1),newcomp));
            System.out.println(newcomp.getName() + " CREATED a copy of " + composite.getName());
            output += newcomp.getName() + " CREATED a copy of " + composite.getName() + "\n";
        } else if (Main.Components.containsKey(command) && param1.equals("")){
            Component composite = Main.Components.get(command);
            Composit newcomp = (Composit)composite.copy();
            Main.controller.getDisplayView().addComponentView(new CompositeView(0,0,newcomp));
            System.out.println(newcomp.getName() + " CREATED a copy of " + composite.getName());
            output += newcomp.getName() + " CREATED a copy of " + composite.getName() + "\n";
        } else {
            System.out.println("Bad command.");
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.