Package weka.gui.knowledgeflow
Class ShadowBorder
- java.lang.Object
-
- javax.swing.border.AbstractBorder
-
- weka.gui.knowledgeflow.ShadowBorder
-
- All Implemented Interfaces:
java.io.Serializable,javax.swing.border.Border
public class ShadowBorder extends javax.swing.border.AbstractBorderBorder implementation that provides a drop shadow- Version:
- $Revision: $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ShadowBorder()Constructor.ShadowBorder(int width)Constructor.ShadowBorder(int width, java.awt.Color color)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.InsetsgetBorderInsets(java.awt.Component c)Returns a new Insets instance where the top and left are 1, the bottom and right fields are the border width + 1.java.awt.InsetsgetBorderInsets(java.awt.Component c, java.awt.Insets insets)Reinitialies theinsetsparameter with this ShadowBorder's current Insets.booleanisBorderOpaque()This implementation always returns true.voidpaintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)Paints the drop shadow border around the given component.
-
-
-
Constructor Detail
-
ShadowBorder
public ShadowBorder()
Constructor. Drop shadow with default width of 2 pixels and black color.
-
ShadowBorder
public ShadowBorder(int width)
Constructor. Drop shadow, default shadow color is black.- Parameters:
width- the width of the shadow.
-
ShadowBorder
public ShadowBorder(int width, java.awt.Color color)Constructor. Drop shadow, width and color are adjustable.- Parameters:
width- the width of the shadow.color- the color of the shadow.
-
-
Method Detail
-
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c)
Returns a new Insets instance where the top and left are 1, the bottom and right fields are the border width + 1.- Specified by:
getBorderInsetsin interfacejavax.swing.border.Border- Overrides:
getBorderInsetsin classjavax.swing.border.AbstractBorder- Parameters:
c- the component for which this border insets value applies- Returns:
- a new Insets object initialized as stated above.
-
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c, java.awt.Insets insets)Reinitialies theinsetsparameter with this ShadowBorder's current Insets.- Overrides:
getBorderInsetsin classjavax.swing.border.AbstractBorder- Parameters:
c- the component for which this border insets value appliesinsets- the object to be reinitialized- Returns:
- the given
insetsobject
-
isBorderOpaque
public boolean isBorderOpaque()
This implementation always returns true.- Specified by:
isBorderOpaquein interfacejavax.swing.border.Border- Overrides:
isBorderOpaquein classjavax.swing.border.AbstractBorder- Returns:
- true
-
paintBorder
public void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)Paints the drop shadow border around the given component.- Specified by:
paintBorderin interfacejavax.swing.border.Border- Overrides:
paintBorderin classjavax.swing.border.AbstractBorder- Parameters:
c- the component for which this border is being paintedg- the paint graphicsx- the x position of the painted bordery- the y position of the painted borderwidth- the width of the painted borderheight- the height of the painted border
-
-