Package UI
Class ButtonBorder
- java.lang.Object
-
- javax.swing.border.AbstractBorder
-
- UI.ButtonBorder
-
- All Implemented Interfaces:
java.io.Serializable,javax.swing.border.Border
public class ButtonBorder extends javax.swing.border.AbstractBorderButtonBorder.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ButtonBorder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.InsetsgetBorderInsets(java.awt.Component c)Returns the insets of the border.java.awt.InsetsgetBorderInsets(java.awt.Component c, java.awt.Insets insets)Reinitializes the insets parameter with this border's current insets.voidpaintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)Paints the border of the specified component.protected voidpaintDisabled(javax.swing.AbstractButton b, java.awt.Graphics g, int x, int y, int width, int height)Paints the border for a disabled button state.protected voidpaintNormal(javax.swing.AbstractButton b, java.awt.Graphics g, int x, int y, int width, int height)Paints the border for a normal (default) button state.protected voidpaintPressed(javax.swing.AbstractButton b, java.awt.Graphics g, int x, int y, int width, int height)Paints the border for a pressed button state.protected voidpaintRollover(javax.swing.AbstractButton b, java.awt.Graphics g, int x, int y, int width, int height)Paints the border for a rollover button state.
-
-
-
Method Detail
-
paintBorder
public void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)Paints the border of the specified component. Determines the state of the button (pressed, rollover, enabled) and calls the appropriate paint method.- 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 Graphics context in which to paintx- 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
-
paintNormal
protected void paintNormal(javax.swing.AbstractButton b, java.awt.Graphics g, int x, int y, int width, int height)Paints the border for a normal (default) button state.- Parameters:
b- the button being paintedg- the Graphics context in which to paintx- 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
-
paintDisabled
protected void paintDisabled(javax.swing.AbstractButton b, java.awt.Graphics g, int x, int y, int width, int height)Paints the border for a disabled button state.- Parameters:
b- the button being paintedg- the Graphics context in which to paintx- 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
-
paintRollover
protected void paintRollover(javax.swing.AbstractButton b, java.awt.Graphics g, int x, int y, int width, int height)Paints the border for a rollover button state.- Parameters:
b- the button being paintedg- the Graphics context in which to paintx- 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
-
paintPressed
protected void paintPressed(javax.swing.AbstractButton b, java.awt.Graphics g, int x, int y, int width, int height)Paints the border for a pressed button state.- Parameters:
b- the button being paintedg- the Graphics context in which to paintx- 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
-
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c)
Returns the insets of the border.- 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:
- the insets of the border
-
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c, java.awt.Insets insets)Reinitializes the insets parameter with this border'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 insets of the border
-
-