Package java.awt

Examples of java.awt.Graphics.drawLine()


                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


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

       
        // draw a nice box around this shape.
        Graphics tempGraphics = inShader.getLineHighlightGraphics(inGraphics, inRecord.getAttributes(), inRecord.getAttributeNames());
        if (tempGraphics != null){
           
            tempGraphics.drawLine(tempTopX, tempTopY, tempBottomX, tempTopY);
            tempGraphics.drawLine(tempBottomX, tempTopY, tempBottomX, tempBottomY);
            tempGraphics.drawLine(tempTopX, tempTopY, tempTopX, tempBottomY);
            tempGraphics.drawLine(tempTopX, tempBottomY, tempBottomX, tempBottomY);
           
            // draw the points marking the corners
View Full Code Here

        // draw a nice box around this shape.
        Graphics tempGraphics = inShader.getLineHighlightGraphics(inGraphics, inRecord.getAttributes(), inRecord.getAttributeNames());
        if (tempGraphics != null){
           
            tempGraphics.drawLine(tempTopX, tempTopY, tempBottomX, tempTopY);
            tempGraphics.drawLine(tempBottomX, tempTopY, tempBottomX, tempBottomY);
            tempGraphics.drawLine(tempTopX, tempTopY, tempTopX, tempBottomY);
            tempGraphics.drawLine(tempTopX, tempBottomY, tempBottomX, tempBottomY);
           
            // draw the points marking the corners
            tempGraphics.drawOval(tempTopX, tempTopY, 4,4);
View Full Code Here

        Graphics tempGraphics = inShader.getLineHighlightGraphics(inGraphics, inRecord.getAttributes(), inRecord.getAttributeNames());
        if (tempGraphics != null){
           
            tempGraphics.drawLine(tempTopX, tempTopY, tempBottomX, tempTopY);
            tempGraphics.drawLine(tempBottomX, tempTopY, tempBottomX, tempBottomY);
            tempGraphics.drawLine(tempTopX, tempTopY, tempTopX, tempBottomY);
            tempGraphics.drawLine(tempTopX, tempBottomY, tempBottomX, tempBottomY);
           
            // draw the points marking the corners
            tempGraphics.drawOval(tempTopX, tempTopY, 4,4);
            tempGraphics.drawOval(tempTopX, tempBottomY, 4,4);
View Full Code Here

        if (tempGraphics != null){
           
            tempGraphics.drawLine(tempTopX, tempTopY, tempBottomX, tempTopY);
            tempGraphics.drawLine(tempBottomX, tempTopY, tempBottomX, tempBottomY);
            tempGraphics.drawLine(tempTopX, tempTopY, tempTopX, tempBottomY);
            tempGraphics.drawLine(tempTopX, tempBottomY, tempBottomX, tempBottomY);
           
            // draw the points marking the corners
            tempGraphics.drawOval(tempTopX, tempTopY, 4,4);
            tempGraphics.drawOval(tempTopX, tempBottomY, 4,4);
            tempGraphics.drawOval(tempBottomX, tempTopY, 4,4);
View Full Code Here

          if (pP != null)
          {
            int pX = pP.x + (blobSize/2);
            int pY = pP.y + (blobSize/2);
            graphics.setColor(featureColor.brighter());
            graphics.drawLine(x + (blobSize/2), y + (blobSize/2), pX, pY);
          }
        }
        previousPoints[i][j] = new Point(x, y);
       
        //record our position
View Full Code Here

                        if (cVI.selected)
                        {               
                            //draw connection
                            if (multi)
                            {
                                graphics.drawLine(x1 + blipWidth/2, y + blipHeight,
                                                  x2 + blipWidth/2, (height - y) - blipHeight);
                                if (thick)
                                    graphics.drawLine((x1 + blipWidth/2)+1, y + blipHeight,
                                                      (x2 + blipWidth/2)+1, (height - y) - blipHeight);
                            }
View Full Code Here

                            if (multi)
                            {
                                graphics.drawLine(x1 + blipWidth/2, y + blipHeight,
                                                  x2 + blipWidth/2, (height - y) - blipHeight);
                                if (thick)
                                    graphics.drawLine((x1 + blipWidth/2)+1, y + blipHeight,
                                                      (x2 + blipWidth/2)+1, (height - y) - blipHeight);
                            }
                            else
                            {
                                if (j == numFeatures - 1)
View Full Code Here

                            }
                            else
                            {
                                if (j == numFeatures - 1)
                                {
                                    graphics.drawLine(x1 + blipWidth/2, y + blipHeight,
                                                      x2 + blipWidth/2, (height - y) - blipHeight);
                                    if (thick)
                                        graphics.drawLine((x1 + blipWidth/2)+1, y + blipHeight,
                                                          (x2 + blipWidth/2)+1, (height - y) - blipHeight);
                                }
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.