Package java.awt

Examples of java.awt.Graphics.drawLine()


    g.drawLine(1, 1, TITLEBAR_HEIGHT - 2, TITLEBAR_HEIGHT - 2);
    g.drawLine(2, 1, TITLEBAR_HEIGHT - 2, TITLEBAR_HEIGHT - 3);
   
    /* /// */
    g.drawLine(TITLEBAR_HEIGHT - 3, 1, 1, TITLEBAR_HEIGHT - 3);
    g.drawLine(TITLEBAR_HEIGHT - 2, 1, 1, TITLEBAR_HEIGHT - 2);
    g.drawLine(TITLEBAR_HEIGHT - 2, 2, 2, TITLEBAR_HEIGHT - 2);

    g.dispose();
    return new ImageIcon(image);
  }
View Full Code Here


    g.drawLine(2, 1, TITLEBAR_HEIGHT - 2, TITLEBAR_HEIGHT - 3);
   
    /* /// */
    g.drawLine(TITLEBAR_HEIGHT - 3, 1, 1, TITLEBAR_HEIGHT - 3);
    g.drawLine(TITLEBAR_HEIGHT - 2, 1, 1, TITLEBAR_HEIGHT - 2);
    g.drawLine(TITLEBAR_HEIGHT - 2, 2, 2, TITLEBAR_HEIGHT - 2);

    g.dispose();
    return new ImageIcon(image);
  }
 
View Full Code Here

                   
                    // draw the lines
                    Graphics tempGraphics = getGISDisplay().getBufferImage().getGraphics();
                    // Line Shadows
                    tempGraphics.setColor(Color.black);
                    tempGraphics.drawLine(x1-1, y1-1,x2-1,y1-1);
                    tempGraphics.drawLine(x2-1, y1-1,x2-1,y2-1);
                    tempGraphics.drawLine(x1-1, y2-1,x2-1,y2-1);
                    tempGraphics.drawLine(x1-1, y1-1,x1-1,y2-1);
                   
                    // Lines
View Full Code Here

                    // draw the lines
                    Graphics tempGraphics = getGISDisplay().getBufferImage().getGraphics();
                    // Line Shadows
                    tempGraphics.setColor(Color.black);
                    tempGraphics.drawLine(x1-1, y1-1,x2-1,y1-1);
                    tempGraphics.drawLine(x2-1, y1-1,x2-1,y2-1);
                    tempGraphics.drawLine(x1-1, y2-1,x2-1,y2-1);
                    tempGraphics.drawLine(x1-1, y1-1,x1-1,y2-1);
                   
                    // Lines
                    tempGraphics.setColor(Color.red);
View Full Code Here

                    Graphics tempGraphics = getGISDisplay().getBufferImage().getGraphics();
                    // Line Shadows
                    tempGraphics.setColor(Color.black);
                    tempGraphics.drawLine(x1-1, y1-1,x2-1,y1-1);
                    tempGraphics.drawLine(x2-1, y1-1,x2-1,y2-1);
                    tempGraphics.drawLine(x1-1, y2-1,x2-1,y2-1);
                    tempGraphics.drawLine(x1-1, y1-1,x1-1,y2-1);
                   
                    // Lines
                    tempGraphics.setColor(Color.red);
                    tempGraphics.drawLine(x1, y1,x2,y1);
View Full Code Here

                    // Line Shadows
                    tempGraphics.setColor(Color.black);
                    tempGraphics.drawLine(x1-1, y1-1,x2-1,y1-1);
                    tempGraphics.drawLine(x2-1, y1-1,x2-1,y2-1);
                    tempGraphics.drawLine(x1-1, y2-1,x2-1,y2-1);
                    tempGraphics.drawLine(x1-1, y1-1,x1-1,y2-1);
                   
                    // Lines
                    tempGraphics.setColor(Color.red);
                    tempGraphics.drawLine(x1, y1,x2,y1);
                    tempGraphics.drawLine(x2, y1,x2,y2);
View Full Code Here

                    tempGraphics.drawLine(x1-1, y2-1,x2-1,y2-1);
                    tempGraphics.drawLine(x1-1, y1-1,x1-1,y2-1);
                   
                    // Lines
                    tempGraphics.setColor(Color.red);
                    tempGraphics.drawLine(x1, y1,x2,y1);
                    tempGraphics.drawLine(x2, y1,x2,y2);
                    tempGraphics.drawLine(x1, y2,x2,y2);
                    tempGraphics.drawLine(x1, y1,x1,y2);
                   
                    // Point shadows
View Full Code Here

                    tempGraphics.drawLine(x1-1, y1-1,x1-1,y2-1);
                   
                    // Lines
                    tempGraphics.setColor(Color.red);
                    tempGraphics.drawLine(x1, y1,x2,y1);
                    tempGraphics.drawLine(x2, y1,x2,y2);
                    tempGraphics.drawLine(x1, y2,x2,y2);
                    tempGraphics.drawLine(x1, y1,x1,y2);
                   
                    // Point shadows
                    tempGraphics.setColor(Color.black);
View Full Code Here

                   
                    // Lines
                    tempGraphics.setColor(Color.red);
                    tempGraphics.drawLine(x1, y1,x2,y1);
                    tempGraphics.drawLine(x2, y1,x2,y2);
                    tempGraphics.drawLine(x1, y2,x2,y2);
                    tempGraphics.drawLine(x1, y1,x1,y2);
                   
                    // Point shadows
                    tempGraphics.setColor(Color.black);
                    tempGraphics.fillOval(x1-3, y1-3, 4,4);
View Full Code Here

                g.fillOval(x-3, y-3, 8,8);
                g.setColor(Color.red);
                g.fillOval(x-3, y-3, 6,6);
                if (i>0){
                    g.setColor(Color.red);
                    g.drawLine(x,y,tempLastX, tempLastY);
                }
                tempLastX = x;
                tempLastY = y;
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.