Skip to content
Snippets Groups Projects
Select Git revision
  • 26c3bac09f5866e64ce7f5498a5f047420cd731f
  • main default protected
  • variant
3 results

TargetStrategy.java

Blame
  • Forked from COUETOUX Basile / FirefighterStarter
    Source project has a limited visibility.
    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) {
    
        }
    }