com.tecnick.jddm
Class ButtonBevel

java.lang.Object
  extended by com.tecnick.jddm.ButtonBevel

public class ButtonBevel
extends java.lang.Object

Title: Button Bevel

Description: Class to draw a 3D button bevel (rectangle) on a Graphics area


Copyright (c) 2002-2006 Tecnick.com S.r.l (www.tecnick.com) Via Ugo Foscolo n.19 - 09045 Quartu Sant'Elena (CA) - ITALY - www.tecnick.com - info@tecnick.com
Project homepage: http://jxhtmledit.sourceforge.net
License: http://www.gnu.org/copyleft/gpl.html GPL 2

Version:
2.1.003
Author:
Nicola Asuni [www.tecnick.com].

Field Summary
private  int bevel_width
          bevel width in pixels
private  int h
          component height in pixels
static int IN
          constant to indicate the "IN" drawing mode (button pushed)
private  int mode
          bevel mode (IN = pushed, OUT = unpushed)
static int OUT
          constant to indicate the "OUT" drawing mode (button unpushed)
(package private)  java.awt.Component parent
          parent component
private  int w
          component width in pixels
private  int x
          starting horizontal position in pixels
private  int y
          starting vertical position in pixels
 
Constructor Summary
ButtonBevel(java.awt.Component c, int X, int Y, int width, int height, int bw)
          Create button bevel with specified measures
 
Method Summary
 void paint(java.awt.Graphics g)
          paint the border
 void setDrawingMode(int m)
          Set the drawing mode (pushed - unpushed)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IN

public static final int IN
constant to indicate the "IN" drawing mode (button pushed)

See Also:
Constant Field Values

OUT

public static final int OUT
constant to indicate the "OUT" drawing mode (button unpushed)

See Also:
Constant Field Values

parent

java.awt.Component parent
parent component


w

private int w
component width in pixels


h

private int h
component height in pixels


x

private int x
starting horizontal position in pixels


y

private int y
starting vertical position in pixels


bevel_width

private int bevel_width
bevel width in pixels


mode

private int mode
bevel mode (IN = pushed, OUT = unpushed)

Constructor Detail

ButtonBevel

public ButtonBevel(java.awt.Component c,
                   int X,
                   int Y,
                   int width,
                   int height,
                   int bw)
Create button bevel with specified measures

Parameters:
c - component where you want add bevel
X - starting horizontal position in pixels
Y - starting vertical position in pixels
width - component width in pixels
height - component height in pixels
bw - bevel width in pixels
Method Detail

setDrawingMode

public void setDrawingMode(int m)
Set the drawing mode (pushed - unpushed)

Parameters:
m - drawing mode. Possible values are: ButtonBevel.IN, ButtonBevel.OUT

paint

public void paint(java.awt.Graphics g)
paint the border

Parameters:
g - Graphics