ElegantJ Gauges Java API Specification v1.1

com.elegantj.gauges
Class GaugeBorder

java.lang.Object
  extended bycom.elegantj.editors.AWTBorder
      extended bycom.elegantj.gauges.GaugeBorder
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class GaugeBorder
extends AWTBorder

This class represents different borders for the gauges.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.elegantj.editors.AWTBorder
borderColor, borderType, borderWidth, LOWERED, NONE, POINT1, POINT2, POINT3, POINT4, POINT5, RAISED, SIMPLE
 
Constructor Summary
GaugeBorder()
           
GaugeBorder(int borderType, int borderWidth, java.awt.Color borderColor)
          Constructs the gauge border object with specified parameters
 
Method Summary
 int getActualBorderWidth()
          Returns the actual width of the border.
 void paintEllipticalBorder(java.awt.Graphics g, int x, int y, int width, int height)
           
 void paintEllipticalBorder(java.awt.Graphics g, int x, int y, int width, int height, int startAngle, int arcAngle)
          Paints the elliptical gauge border arc covering the specified rectangle.
 void paintPolygonalBorder(java.awt.Graphics g, int[] xPoints, int[] yPoints, int nPoints)
          Paints the polygonal gauge border defined by arrays of x and y coordinates.
 void paintRectangularBorder(java.awt.Graphics g, int x, int y, int width, int height)
          Paints the rectangular gauge border with the specified position and size.
 
Methods inherited from class com.elegantj.editors.AWTBorder
getBorderColor, getBorderType, getBorderWidth, paintBorder, readExternal, setBorderColor, setBorderType, setBorderWidth, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GaugeBorder

public GaugeBorder()

GaugeBorder

public GaugeBorder(int borderType,
                   int borderWidth,
                   java.awt.Color borderColor)
Constructs the gauge border object with specified parameters

Parameters:
borderType - The border type @see NONE, SIMPLE, RAISED, LOWERED
borderWidth - The border width
borderColor - The border color
Method Detail

getActualBorderWidth

public int getActualBorderWidth()
Returns the actual width of the border.


paintRectangularBorder

public void paintRectangularBorder(java.awt.Graphics g,
                                   int x,
                                   int y,
                                   int width,
                                   int height)
Paints the rectangular gauge border with the specified position and size.

Parameters:
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

paintEllipticalBorder

public void paintEllipticalBorder(java.awt.Graphics g,
                                  int x,
                                  int y,
                                  int width,
                                  int height)

paintEllipticalBorder

public void paintEllipticalBorder(java.awt.Graphics g,
                                  int x,
                                  int y,
                                  int width,
                                  int height,
                                  int startAngle,
                                  int arcAngle)
Paints the elliptical gauge border arc covering the specified rectangle.

Parameters:
g - the paint graphics
x - the x coordinate of the upper-left corner of the arc to be drawn.
y - the y coordinate of the upper-left corner of the arc to be drawn.
width - the width of the arc to be drawn.
height - the height of the arc to be drawn.
startAngle - the beginning angle, default 0
arcAngle - the angular extent of the arc, relative to the start angle, default 360.

paintPolygonalBorder

public void paintPolygonalBorder(java.awt.Graphics g,
                                 int[] xPoints,
                                 int[] yPoints,
                                 int nPoints)
Paints the polygonal gauge border defined by arrays of x and y coordinates.

Parameters:
g - the paint graphics
xPoints - an array of x coordinates.
yPoints - an array of y coordinates.
nPoints - the total number of points

ElegantJ Gauges Java API Specification v1.1

Submit a bug or feature

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjcharts.com
All Rights Reserved.