Package main.components

Examples of main.components.Oval


            if(jRadioButtonLine.isSelected()){
                panel.addShape(new Line(x, y, _x, _y));
            }
            if(jRadioButtonOval.isSelected()){
                if(x > _x && y > _y){
                    panel.addShape(new Oval(_x, _y, x - _x, y - _y));
                }
                else if(x > _x && y < _y){
                    panel.addShape(new Oval(_x, y, x - _x, _y - y));
                }
                else if(x < _x && y > _y){
                    panel.addShape(new Oval(x, _y, _x - x, y - _y));
                }
                else{
                    panel.addShape(new Oval(x, y, _x - x, _y - y));
                }
            }
            if(jRadioButtonRectangle.isSelected()){
                if(x > _x && y > _y){
                    panel.addShape(new Rectangle(_x, _y, x - _x, y - _y));
View Full Code Here


                     tmpLine = (Line) shape;
                     save.write(tmpLine.getX_() + "\n");
                     save.write(tmpLine.getY_() + "\n");
                }
                if(shape instanceof Oval){
                     Oval tmpOval = new Oval();
                     tmpOval = (Oval) shape;
                     save.write(tmpOval.getWidth()+ "\n");
                     save.write(tmpOval.getHeight()+ "\n");
                }
                if(shape instanceof Rectangle){
                     Rectangle tmpRect = new Rectangle();
                     tmpRect = (Rectangle) shape;
                     save.write(tmpRect.getWidth()+ "\n");
View Full Code Here

                    case "main.components.Oval":
                        tmp_x = Integer.parseInt(reader.readLine());
                        tmp_y = Integer.parseInt(reader.readLine());
                        tmp_width = Integer.parseInt(reader.readLine());
                        tmp_height = (Integer.parseInt(reader.readLine()));
                        panel.addShape(new Oval(tmp_x, tmp_y, tmp_width, tmp_height));
                        break;
                    case "main.components.Line":
                        tmp_x = Integer.parseInt(reader.readLine());
                        tmp_y = Integer.parseInt(reader.readLine());
                        tmp_width = Integer.parseInt(reader.readLine());
View Full Code Here

TOP

Related Classes of main.components.Oval

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.