Package UI
Class GBevelBorder
- java.lang.Object
-
- javax.swing.border.AbstractBorder
-
- javax.swing.border.BevelBorder
-
- javax.swing.border.SoftBevelBorder
-
- UI.GBevelBorder
-
- All Implemented Interfaces:
java.io.Serializable,javax.swing.border.Border
public class GBevelBorder extends javax.swing.border.SoftBevelBorderGBevelBorder is a custom border class that extends SoftBevelBorder. It provides a beveled border with customizable colors and styles.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GBevelBorder(int t)Constructs a GBevelBorder with a specified bevel type.GBevelBorder(int t, int type)Constructs a GBevelBorder with a specified bevel type and custom type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.InsetsgetBorderInsets(java.awt.Component c, java.awt.Insets insets)Returns the insets of the border.voidpaintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)Paints the border for the specified component.voidpaintBorder1(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)Paints the primary border for the specified component.-
Methods inherited from class javax.swing.border.BevelBorder
getBevelType, getHighlightInnerColor, getHighlightInnerColor, getHighlightOuterColor, getHighlightOuterColor, getShadowInnerColor, getShadowInnerColor, getShadowOuterColor, getShadowOuterColor, paintLoweredBevel, paintRaisedBevel
-
-
-
-
Constructor Detail
-
GBevelBorder
public GBevelBorder(int t)
Constructs a GBevelBorder with a specified bevel type.- Parameters:
t- the bevel type (RAISED or LOWERED)
-
GBevelBorder
public GBevelBorder(int t, int type)Constructs a GBevelBorder with a specified bevel type and custom type.- Parameters:
t- the bevel type (RAISED or LOWERED)type- the custom type for additional styling
-
-
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 for the specified component. Draws the custom border and additional lines based on the component's dimensions.- Specified by:
paintBorderin interfacejavax.swing.border.Border- Overrides:
paintBorderin classjavax.swing.border.SoftBevelBorder- 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
-
paintBorder1
public void paintBorder1(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)Paints the primary border for the specified component. Draws the beveled border based on the component's dimensions and bevel type.- 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
-
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c, java.awt.Insets insets)Returns the insets of the border. Adjusts the insets based on the custom type.- Overrides:
getBorderInsetsin classjavax.swing.border.SoftBevelBorder- Parameters:
c- the component for which this border insets value appliesinsets- the object to be reinitialized- Returns:
- the insets of the border
-
-