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
-
EMBOSSED_OUT
-
-
ETCHED_IN
-
-
LINE
-
-
NONE
-
-
ROUND_RECT
-
-
THREED_IN
-
-
THREED_OUT
-
-
BorderGadget()
- BorderGadget constructor.
-
clone()
- Returns a new BorderGadget "equal" to this one.
-
drawFocus(GadgetGraphics)
- drawFocus(g) method calls the three argument drawFocus method
with g, the foreground color, and the focusThickness integer.
-
drawFocus(GadgetGraphics, Color, int)
- Draws a rectangle based on the current margins and insets.
-
equals(BorderGadget)
- Does an equality check between this BorderGadget
and the given one.
-
getBorderColor()
- Returns the value of the border color variable.
-
getBorderThickness()
- Gets the value of the BorderThickness variable.
-
getBorderType()
- Returns the value of the type variable.
-
getCloseShaved()
- Returns the value of the closeShaved variable.
-
getDefaultThickness()
- Returns the value of the defaultThickness variable.
-
getFocusThickness()
- Gets the value of the focusThickness variable.
-
getInsets()
- Returns the left, right, top, and bottom insets of the background of the
current style.
-
getMargins()
- Returns the left, right, top, and bottom margins.
-
getMaxMargin()
- Gets the value of the MaxMargin varaible.
-
getMinMargin()
- Gets the value of the MinMargin varaible.
-
getShadowColor()
- Returns the value of the shadow color variable.
-
getShadowXOffset()
- Gets the value of the shadowXOffset variable.
-
getShadowYOffset()
- Gets the value of the shadowYOffset variable.
-
hasNoInsets()
- Returns false if some insets are nonzero.
-
paint(GadgetGraphics)
- Paints the shadow, background, and border, and draws the focus.
-
paintBorder(GadgetGraphics, int, int, int, int, Color)
- Paints the border.
-
paintBorder(GadgetGraphics, int, int, int, int, int, Color, Color, int)
- Paints the border
-
paintBorder(GadgetGraphics, int, int, int, int, int, Color, Color, int, int, boolean)
- Paints the border.
-
setBorder(BorderGadget)
- Sets this BorderGadget to be equal to the given one.
-
setBorderColor(Color)
- Sets border variable to the supplied color.
-
setBorderThickness(int)
- Sets the BorderThickness variable to the supplied value.
-
setBorderType(int)
- Sets type variable to the supplied value.
-
setCloseShaved(boolean)
- Sets closeShaved variable to the supplied value.
-
setDefaultThickness(int)
- Sets defaultThickness variable to the supplied value.
-
setFocusThickness(int)
- Sets the focusThickness variable to the supplied value.
-
setMargins(int)
- Sets top, bottom, left, and right margins to the
one supplied value.
-
setMargins(int, int, int, int)
- Sets top, bottom, left, and right margins to the
supplied values.
-
setNoInsets()
- setNoInsets sets all margins, thicknesses and ofsets to zero.
-
setShadowColor(Color)
- Sets shadow variable to the supplied color.
-
setShadowXOffset(int)
- Sets the shadowXOffset variable to the supplied value.
-
setShadowYOffset(int)
- Sets the shadowYOffset variable to the supplied value.
-
update(GadgetGraphics)
-
NONE
public static final int NONE
LINE
public static final int LINE
THREED_IN
public static final int THREED_IN
THREED_OUT
public static final int THREED_OUT
ETCHED_IN
public static final int ETCHED_IN
EMBOSSED_OUT
public static final int EMBOSSED_OUT
ROUND_RECT
public static final int ROUND_RECT
BorderGadget
public BorderGadget()
- BorderGadget constructor.
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
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.
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.
setBorderType
public void setBorderType(int type)
- Sets type variable to the supplied value.
- Parameters:
- type - new value for type
getBorderType
public int getBorderType()
- Returns the value of the type variable.
- Returns:
- int - the value of the type variable
setBorderColor
public void setBorderColor(Color border)
- Sets border variable to the supplied color.
- Parameters:
- border - new value for border color
getBorderColor
public Color getBorderColor()
- Returns the value of the border color variable.
- Returns:
- border color - the value of the border color variable
setDefaultThickness
public void setDefaultThickness(int defaultThickness)
- Sets defaultThickness variable to the supplied value.
- Parameters:
- defaultThickness - - new value for defaultThickness
getDefaultThickness
public int getDefaultThickness()
- Returns the value of the defaultThickness variable.
- Returns:
- int - the value of the defaultThickness variable
setCloseShaved
public void setCloseShaved(boolean closeShaved)
- Sets closeShaved variable to the supplied value.
- Parameters:
- closeShaved - new value for closeShaved
getCloseShaved
public boolean getCloseShaved()
- Returns the value of the closeShaved variable.
- Returns:
- boolean - the value of the closeShaved variable
setShadowColor
public void setShadowColor(Color shadow)
- Sets shadow variable to the supplied color.
- Parameters:
- shadow - new color for shadow
getShadowColor
public Color getShadowColor()
- Returns the value of the shadow color variable.
- Returns:
- Color - value for the shadow color variable
setNoInsets
public void setNoInsets()
- setNoInsets sets all margins, thicknesses and ofsets to zero.
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.
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
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
getBorderThickness
public int getBorderThickness()
- Gets the value of the BorderThickness variable.
- Returns:
- int - the value of the BorderThickness variable
setBorderThickness
public void setBorderThickness(int borderThickness)
- Sets the BorderThickness variable to the supplied value.
- Parameters:
- borderThickness - new value for borderThickness
getFocusThickness
public int getFocusThickness()
- Gets the value of the focusThickness variable.
- Returns:
- int - value of the focusThickness variable
setFocusThickness
public void setFocusThickness(int focusThickness)
- Sets the focusThickness variable to the supplied value.
- Parameters:
- focusThickness - new value for focusThickness
getShadowXOffset
public int getShadowXOffset()
- Gets the value of the shadowXOffset variable.
- Returns:
- int - value of the shadowXOffset variable
setShadowXOffset
public void setShadowXOffset(int shadowXOffset)
- Sets the shadowXOffset variable to the supplied value.
- Parameters:
- shadowXOffset - new value for shadowXOffset
getShadowYOffset
public int getShadowYOffset()
- Gets the value of the shadowYOffset variable.
- Returns:
- int - value of the shadowYOffset variable
setShadowYOffset
public void setShadowYOffset(int shadowYOffset)
- Sets the shadowYOffset variable to the supplied value.
- Parameters:
- shadowYOffset - new value for shadowYOffset
getMinMargin
public int getMinMargin()
- Gets the value of the MinMargin varaible.
- Returns:
- int - value of the MinMargin variable
getMaxMargin
public int getMaxMargin()
- Gets the value of the MaxMargin varaible.
- Returns:
- int - value of the MaxMargin variable
getMargins
public Insets getMargins()
- Returns the left, right, top, and bottom margins.
- Returns:
- Insets an Insets object
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
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
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
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
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
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.
update
public void update(GadgetGraphics g)
- Parameters:
- g - the GadgetGraphics object to do the painting.
- Overrides:
- update in class ContainerGadget
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