Package lifesbest23.SquaresDrawer

Examples of lifesbest23.SquaresDrawer.SquaresPanel$FreeDrawTool


            for(Color[] l:toolColors)
              for(int i = 0; i < y; i++)
                l[i] = clearColor;
           
            //create Circle
            Circle c = new Circle(startX, startY,
                (int)Point.distance(startX, startY,
                    xt, yt));
            //
            Point[] ps = c.getPoints();
            for(Point p:ps)
              if(p.x >= 0 && p.x < x && p.y >= 0 && p.y < y)
                toolColors[p.x][p.y] = clickColors[buttonPressed + clickCount - 1];
           
            repaint();
View Full Code Here


            Color clearColor = new Color(0,0,0,0);
            for(Color[] l:toolColors)
              for(int i = 0; i < y; i++)
                l[i] = clearColor;;
            //create Line
            Line c = new Line(new Point(xt, yt),
                  new Point(startX, startY));
            Point[] ps = c.getPoints();
            for(Point p:ps)
              if(p.x >= 0 && p.x < x && p.y >= 0 && p.y < y)
                toolColors[p.x][p.y] = clickColors[buttonPressed + clickCount - 1];
           
            repaint();
View Full Code Here

          int yt = e.getY()/squareSize;
         
          if(xt >= squareSize*x || yt >= squareSize*y || xt < 0 || yt < 0)
            stopThread();
         
          Line l = new Line(new Point(xt, yt),
              new Point(xtOld, ytOld));
          Point[] ps = l.getPoints();
          for(Point p:ps)
            if(p.x >= 0 && p.x < x && p.y >= 0 && p.y < y)
              toolColors[p.x][p.y] = clickColors[buttonPressed + clickCount - 1];
         
          repaint();
View Full Code Here

  SquaresFrame(){
    super();
    this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
    this.setSize(400, 400);
    this.setTitle(String.format("Squares Editor - *New File - %d_%d*", 10, 10));
    this.addWindowListener(new WindowAdapter(){
      @Override public void windowClosing( WindowEvent event )
        {
        exit();
        }
    });
View Full Code Here

    //WindowPreparation
    super(frame, modal);
    this.setLayout(new GridLayout(3, 2, 5, 5));
    this.setTitle("New");
    this.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
    this.addWindowListener(new WindowAdapter(){
      @Override public void windowClosing( WindowEvent event )
        {
        close();
      }
    });
View Full Code Here

        toolChangeFillArea();
      }
    };
    aboutAction = new AbstractAction( "About..." ) {
      public void actionPerformed( ActionEvent e){
        new aboutDialog(null, false, "Squares", "In this Application you can draw pictures.\n" +
            "They consist of squares and you can draw by clicking" +
            "one to three times with the left or right mouse Button" +
            "to coloar the sqare\n" +
            "You can also navigate with wasd or arrow keys the yellow marked Field" +
            "and color the currently selected field by pressing enter.");
View Full Code Here

TOP

Related Classes of lifesbest23.SquaresDrawer.SquaresPanel$FreeDrawTool

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.