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

StateRectangle0.java

Blame
  • Forked from COUETOUX Basile / graphic-2020
    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) {
    
        }
    }