ElegantJ Gauges Java API Specification v1.1

com.elegantj.editors
Class AWTBorder

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

public class AWTBorder
extends java.lang.Object
implements java.io.Externalizable

This class represents different borders. There are four basic types of the borders NONE, SIMPLE, RAISED, LOWERED with specified border size and specified border color

See Also:
Serialized Form

Field Summary
protected  java.awt.Color borderColor
           
protected  int borderType
           
protected  int borderWidth
           
static int LOWERED
          Lowered border
static int NONE
          No border
static int POINT1
          point 1 border width
static int POINT2
          point 2 border width
static int POINT3
          point 3 border width
static int POINT4
          point 4 border width
static int POINT5
          point 5 border width
static int RAISED
          Raised border
static int SIMPLE
          Simple border
 
Constructor Summary
AWTBorder()
          Default constructor
AWTBorder(int borderType, int borderWidth, java.awt.Color borderColor)
          Constructs the border object with specified parameters
 
Method Summary
 java.awt.Color getBorderColor()
          Method which returns the border color
 int getBorderType()
          Method which returns the border type
 int getBorderWidth()
          Method which returns the border widht
 void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
          Paints the border for the specified component with the specified position and size.
 void readExternal(java.io.ObjectInput in)
          Implementation of the readExternal
 void setBorderColor(java.awt.Color borderColor)
          Method which sets the border color
 void setBorderType(int borderType)
          Method which sets the border type
 void setBorderWidth(int borderWidth)
          Method which sets the border width
 void writeExternal(java.io.ObjectOutput out)
          Implementation of the writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POINT1

public static final int POINT1
point 1 border width

See Also:
Constant Field Values

POINT2

public static final int POINT2
point 2 border width

See Also:
Constant Field Values

POINT3

public static final int POINT3
point 3 border width

See Also:
Constant Field Values

POINT4

public static final int POINT4
point 4 border width

See Also:
Constant Field Values

POINT5

public static final int POINT5
point 5 border width

See Also:
Constant Field Values

NONE

public static final int NONE
No border

See Also:
Constant Field Values

SIMPLE

public static final int SIMPLE
Simple border

See Also:
Constant Field Values

RAISED

public static final int RAISED
Raised border

See Also:
Constant Field Values

LOWERED

public static final int LOWERED
Lowered border

See Also:
Constant Field Values

borderType

protected int borderType

borderWidth

protected int borderWidth

borderColor

protected java.awt.Color borderColor
Constructor Detail

AWTBorder

public AWTBorder()
Default constructor


AWTBorder

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

Parameters:
borderType - The border type
borderWidth - The border width
borderColor - The border color
Method Detail

setBorderType

public void setBorderType(int borderType)
Method which sets the border type


getBorderType

public int getBorderType()
Method which returns the border type

Returns:
the border type

setBorderWidth

public void setBorderWidth(int borderWidth)
Method which sets the border width

Parameters:
borderWidth - the border width

getBorderWidth

public int getBorderWidth()
Method which returns the border widht

Returns:
The border width

setBorderColor

public void setBorderColor(java.awt.Color borderColor)
Method which sets the border color


getBorderColor

public java.awt.Color getBorderColor()
Method which returns the border color

Returns:
The border color

paintBorder

public void paintBorder(java.awt.Component c,
                        java.awt.Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Paints the border for the specified component with the specified position and size.

Parameters:
c - the component for which this border is being painted
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

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Implementation of the writeExternal

Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Implementation of the readExternal

Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

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.