All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dtai.gwt.BorderGadget

java.lang.Object
   |
   +----dtai.gwt.Gadget
           |
           +----dtai.gwt.ContainerGadget
                   |
                   +----dtai.gwt.PanelGadget
                           |
                           +----dtai.gwt.BorderGadget

public class BorderGadget
extends PanelGadget
implements Cloneable
BorderGadget


Variable Index

 o EMBOSSED_OUT
 o ETCHED_IN
 o LINE
 o NONE
 o ROUND_RECT
 o THREED_IN
 o THREED_OUT

Constructor Index

 o BorderGadget()
BorderGadget constructor.

Method Index

 o clone()
Returns a new BorderGadget "equal" to this one.
 o drawFocus(GadgetGraphics)
drawFocus(g) method calls the three argument drawFocus method with g, the foreground color, and the focusThickness integer.
 o drawFocus(GadgetGraphics, Color, int)
Draws a rectangle based on the current margins and insets.
 o equals(BorderGadget)
Does an equality check between this BorderGadget and the given one.
 o getBorderColor()
Returns the value of the border color variable.
 o getBorderThickness()
Gets the value of the BorderThickness variable.
 o getBorderType()
Returns the value of the type variable.
 o getCloseShaved()
Returns the value of the closeShaved variable.
 o getDefaultThickness()
Returns the value of the defaultThickness variable.
 o getFocusThickness()
Gets the value of the focusThickness variable.
 o getInsets()
Returns the left, right, top, and bottom insets of the background of the current style.
 o getMargins()
Returns the left, right, top, and bottom margins.
 o getMaxMargin()
Gets the value of the MaxMargin varaible.
 o getMinMargin()
Gets the value of the MinMargin varaible.
 o getShadowColor()
Returns the value of the shadow color variable.
 o getShadowXOffset()
Gets the value of the shadowXOffset variable.
 o getShadowYOffset()
Gets the value of the shadowYOffset variable.
 o hasNoInsets()
Returns false if some insets are nonzero.
 o paint(GadgetGraphics)
Paints the shadow, background, and border, and draws the focus.
 o paintBorder(GadgetGraphics, int, int, int, int, Color)
Paints the border.
 o paintBorder(GadgetGraphics, int, int, int, int, int, Color, Color, int)
Paints the border
 o paintBorder(GadgetGraphics, int, int, int, int, int, Color, Color, int, int, boolean)
Paints the border.
 o setBorder(BorderGadget)
Sets this BorderGadget to be equal to the given one.
 o setBorderColor(Color)
Sets border variable to the supplied color.
 o setBorderThickness(int)
Sets the BorderThickness variable to the supplied value.
 o setBorderType(int)
Sets type variable to the supplied value.
 o setCloseShaved(boolean)
Sets closeShaved variable to the supplied value.
 o setDefaultThickness(int)
Sets defaultThickness variable to the supplied value.
 o setFocusThickness(int)
Sets the focusThickness variable to the supplied value.
 o setMargins(int)
Sets top, bottom, left, and right margins to the one supplied value.
 o setMargins(int, int, int, int)
Sets top, bottom, left, and right margins to the supplied values.
 o setNoInsets()
setNoInsets sets all margins, thicknesses and ofsets to zero.
 o setShadowColor(Color)
Sets shadow variable to the supplied color.
 o setShadowXOffset(int)
Sets the shadowXOffset variable to the supplied value.
 o setShadowYOffset(int)
Sets the shadowYOffset variable to the supplied value.
 o update(GadgetGraphics)

Variables

 o NONE
 public static final int NONE
 o LINE
 public static final int LINE
 o THREED_IN
 public static final int THREED_IN
 o THREED_OUT
 public static final int THREED_OUT
 o ETCHED_IN
 public static final int ETCHED_IN
 o EMBOSSED_OUT
 public static final int EMBOSSED_OUT
 o ROUND_RECT
 public static final int ROUND_RECT

Constructors

 o BorderGadget
 public BorderGadget()
BorderGadget constructor.

Methods

 o clone
 public Object clone()
Returns a new BorderGadget "equal" to this one.

Returns:
a new BorderGadget clone of this one.
Overrides:
clone in class Object
 o setBorder
 public void setBorder(BorderGadget rhs)
Sets this BorderGadget to be equal to the given one.

Parameters:
rhs - the BorderGadget that this BorderGadget will be made equal to, if it is not already.
 o equals
 public boolean equals(BorderGadget rhs)
Does an equality check between this BorderGadget and the given one.

Parameters:
rhs - a BorderGadget for comparison
Returns:
boolean result of comparison between the supplied Border Gadget and this one.
 o setBorderType
 public void setBorderType(int type)
Sets type variable to the supplied value.

Parameters:
type - new value for type
 o getBorderType
 public int getBorderType()
Returns the value of the type variable.

Returns:
int - the value of the type variable
 o setBorderColor
 public void setBorderColor(Color border)
Sets border variable to the supplied color.

Parameters:
border - new value for border color
 o getBorderColor
 public Color getBorderColor()
Returns the value of the border color variable.

Returns:
border color - the value of the border color variable
 o setDefaultThickness
 public void setDefaultThickness(int defaultThickness)
Sets defaultThickness variable to the supplied value.

Parameters:
defaultThickness - - new value for defaultThickness
 o getDefaultThickness
 public int getDefaultThickness()
Returns the value of the defaultThickness variable.

Returns:
int - the value of the defaultThickness variable
 o setCloseShaved
 public void setCloseShaved(boolean closeShaved)
Sets closeShaved variable to the supplied value.

Parameters:
closeShaved - new value for closeShaved
 o getCloseShaved
 public boolean getCloseShaved()
Returns the value of the closeShaved variable.

Returns:
boolean - the value of the closeShaved variable
 o setShadowColor
 public void setShadowColor(Color shadow)
Sets shadow variable to the supplied color.

Parameters:
shadow - new color for shadow
 o getShadowColor
 public Color getShadowColor()
Returns the value of the shadow color variable.

Returns:
Color - value for the shadow color variable
 o setNoInsets
 public void setNoInsets()
setNoInsets sets all margins, thicknesses and ofsets to zero.

 o hasNoInsets
 public boolean hasNoInsets()
Returns false if some insets are nonzero. If all insets are zero, returns true.

Returns:
true if maxMargin, borderThickness, focusThickness defaultThickness, shadowXOffset, and shadowYOffset are all zero, else returns false.
 o setMargins
 public final synchronized void setMargins(int margin)
Sets top, bottom, left, and right margins to the one supplied value.

Parameters:
margin - new value for all four margins
 o setMargins
 public void setMargins(int top,
                        int left,
                        int bottom,
                        int right)
Sets top, bottom, left, and right margins to the supplied values.

Parameters:
top - new value for top margin
left - new value for left margin
bottom - new value for bottom margin
right - new value for right margin
 o getBorderThickness
 public int getBorderThickness()
Gets the value of the BorderThickness variable.

Returns:
int - the value of the BorderThickness variable
 o setBorderThickness
 public void setBorderThickness(int borderThickness)
Sets the BorderThickness variable to the supplied value.

Parameters:
borderThickness - new value for borderThickness
 o getFocusThickness
 public int getFocusThickness()
Gets the value of the focusThickness variable.

Returns:
int - value of the focusThickness variable
 o setFocusThickness
 public void setFocusThickness(int focusThickness)
Sets the focusThickness variable to the supplied value.

Parameters:
focusThickness - new value for focusThickness
 o getShadowXOffset
 public int getShadowXOffset()
Gets the value of the shadowXOffset variable.

Returns:
int - value of the shadowXOffset variable
 o setShadowXOffset
 public void setShadowXOffset(int shadowXOffset)
Sets the shadowXOffset variable to the supplied value.

Parameters:
shadowXOffset - new value for shadowXOffset
 o getShadowYOffset
 public int getShadowYOffset()
Gets the value of the shadowYOffset variable.

Returns:
int - value of the shadowYOffset variable
 o setShadowYOffset
 public void setShadowYOffset(int shadowYOffset)
Sets the shadowYOffset variable to the supplied value.

Parameters:
shadowYOffset - new value for shadowYOffset
 o getMinMargin
 public int getMinMargin()
Gets the value of the MinMargin varaible.

Returns:
int - value of the MinMargin variable
 o getMaxMargin
 public int getMaxMargin()
Gets the value of the MaxMargin varaible.

Returns:
int - value of the MaxMargin variable
 o getMargins
 public Insets getMargins()
Returns the left, right, top, and bottom margins.

Returns:
Insets an Insets object
 o getInsets
 public Insets getInsets()
Returns the left, right, top, and bottom insets of the background of the current style.

Returns:
Insets an Insets object
Overrides:
getInsets in class ContainerGadget
 o paintBorder
 protected void paintBorder(GadgetGraphics g,
                            int x,
                            int y,
                            int width,
                            int height,
                            Color background)
Paints the border.

Parameters:
g - the GadgetGraphics object
x - x coordinate
y - y coordinate
width - width
height - height
background - background color
 o paintBorder
 public static void paintBorder(GadgetGraphics g,
                                int x,
                                int y,
                                int width,
                                int height,
                                int type,
                                Color background,
                                Color border,
                                int borderThickness)
Paints the border

Parameters:
g - the GadgetGraphics object
x - x coordinate
y - y coordinate
width - width
height - height
type - type
background - background color
border - border color
borderThickness - border thickness
 o paintBorder
 public static void paintBorder(GadgetGraphics g,
                                int x,
                                int y,
                                int width,
                                int height,
                                int type,
                                Color background,
                                Color border,
                                int borderThickness,
                                int minMargin,
                                boolean closeShaved)
Paints the border.

Parameters:
g - the GadgetGraphics object
x - x coordinate
y - y coordinate
width - width
height - height
type - type
background - background color
border - border color
borderThickness - border thickness
minMargin - mimimum margin
closeShaved - is/is not closeShaved
 o drawFocus
 public void drawFocus(GadgetGraphics g,
                       Color fg,
                       int thickness)
Draws a rectangle based on the current margins and insets. Rectangle uses the thickness parameter for dashOnLen, dashOfflen, and alignment.

Parameters:
g - GadgetGraphics object to do the painting
fg - color
thickness - thickness
See Also:
drawRect
 o drawFocus
 public void drawFocus(GadgetGraphics g)
drawFocus(g) method calls the three argument drawFocus method with g, the foreground color, and the focusThickness integer.

Parameters:
g - the GadgetGraphics object to do the painting.
 o update
 public void update(GadgetGraphics g)
Parameters:
g - the GadgetGraphics object to do the painting.
Overrides:
update in class ContainerGadget
 o paint
 public void paint(GadgetGraphics g)
Paints the shadow, background, and border, and draws the focus.

Parameters:
g - the GadgetGraphics object to do the painting.
Overrides:
paint in class Gadget

All Packages  Class Hierarchy  This Package  Previous  Next  Index