Skip to content
Snippets Groups Projects
Select Git revision
  • f49e231fa341a241696fb8e5f84bab30dfab95d7
  • master default protected
2 results

Main.java

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    StateRectangle0.java 692 B
    package TP5.state;
    
    import TP5.shape.Rectangle;
    
    public class StateRectangle0 implements DrawerState{
        public StateRectangle0() { }
    
        @Override
        public void mousePressed(DrawerContext context, double x, double y) {
            Rectangle rectangle = new Rectangle(x, y,0,0);
            rectangle.setFinished(false);
            context.getDrawer().addShape(rectangle);
            context.setState(new StateRectangle1(rectangle));
        }
    
        @Override
        public void mouseReleased(DrawerContext context, double x, double y) {
    
        }
    
        @Override
        public void mouseMoved(DrawerContext context, double x, double y) {
    
        }
    
        @Override
        public void paint(DrawerContext context) {
    
        }
    }