Class BorderUIResource.TitledBorderUIResource
java.lang.Object
javax.swing.border.AbstractBorder
javax.swing.border.TitledBorder
javax.swing.plaf.BorderUIResource.TitledBorderUIResource
- All Implemented Interfaces:
Serializable, Border, UIResource
- Enclosing class:
BorderUIResource
public static class BorderUIResource.TitledBorderUIResource
extends TitledBorder
implements UIResource
A titled border UI resource.
-
Field Summary
Fields declared in class TitledBorder
ABOVE_BOTTOM, ABOVE_TOP, BELOW_BOTTOM, BELOW_TOP, border, BOTTOM, CENTER, DEFAULT_JUSTIFICATION, DEFAULT_POSITION, EDGE_SPACING, LEADING, LEFT, RIGHT, TEXT_INSET_H, TEXT_SPACING, title, titleColor, titleFont, titleJustification, titlePosition, TOP, TRAILINGModifier and TypeFieldDescriptionstatic final intPosition the title above the border's bottom line.static final intPosition the title above the border's top line.static final intPosition the title below the border's bottom line.static final intPosition the title below the border's top line.protected BorderThe border.static final intPosition the title in the middle of the border's bottom line.static final intPosition title text in the center of the border line.static final intUse the default justification for the title text.static final intUse the default vertical orientation for the title text.protected static final intSpace between the border and the component's edgestatic final intPosition title text at the left side of the border line for left to right orientation, at the right side of the border line for right to left orientation.static final intPosition title text at the left side of the border line.static final intPosition title text at the right side of the border line.protected static final intHorizontal inset of text that is left or right justifiedprotected static final intSpace between the border and textprotected StringThe title the border should display.protected ColorThe color of the title.protected FontThe font for rendering the title.protected intThe justification for the title.protected intThe position for the title.static final intPosition the title in the middle of the border's top line.static final intPosition title text at the right side of the border line for left to right orientation, at the left side of the border line for right to left orientation. -
Constructor Summary
ConstructorsConstructorDescriptionTitledBorderUIResource(String title) Constructs aTitledBorderUIResource.TitledBorderUIResource(Border border) Constructs aTitledBorderUIResource.TitledBorderUIResource(Border border, String title) Constructs aTitledBorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition) Constructs aTitledBorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont) Constructs aTitledBorderUIResource.TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) Constructs aTitledBorderUIResource. -
Method Summary
Methods declared in class TitledBorder
getBaseline, getBaselineResizeBehavior, getBorder, getBorderInsets, getFont, getMinimumSize, getTitle, getTitleColor, getTitleFont, getTitleJustification, getTitlePosition, isBorderOpaque, paintBorder, setBorder, setTitle, setTitleColor, setTitleFont, setTitleJustification, setTitlePositionModifier and TypeMethodDescriptionintgetBaseline(Component c, int width, int height) Returns the baseline.Returns an enum indicating how the baseline of the border changes as the size changes.Returns the border of the titled border.getBorderInsets(Component c, Insets insets) Reinitialize the insets parameter with this Border's current Insets.protected FontReturns default font of the titled border.Returns the minimum dimensions this border requires in order to fully display the border and title.getTitle()Returns the title of the titled border.Returns the title-color of the titled border.Returns the title-font of the titled border.intReturns the title-justification of the titled border.intReturns the title-position of the titled border.booleanReturns whether or not the border is opaque.voidpaintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.voidSets the border of the titled border.voidSets the title of the titled border.voidsetTitleColor(Color titleColor) Sets the title-color of the titled border.voidsetTitleFont(Font titleFont) Sets the title-font of the titled border.voidsetTitleJustification(int titleJustification) Sets the title-justification of the titled border.voidsetTitlePosition(int titlePosition) Sets the title-position of the titled border.Methods declared in class AbstractBorder
getBorderInsets, getInteriorRectangle, getInteriorRectangleModifier and TypeMethodDescriptionThis default implementation returns a newInsetsobject that is initialized by theAbstractBorder.getBorderInsets(Component,Insets)method.getInteriorRectangle(Component c, int x, int y, int width, int height) This convenience method calls the static method.static RectanglegetInteriorRectangle(Component c, Border b, int x, int y, int width, int height) Returns a rectangle using the arguments minus the insets of the border.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Creates and returns a copy of this object.booleanIndicates whether some other object is "equal to" this one.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.Finalization is deprecated and subject to removal in a future release.final Class<?> getClass()Returns the runtime class of thisObject.inthashCode()Returns a hash code value for this object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.toString()Returns a string representation of the object.final voidwait()Causes the current thread to wait until it is awakened, typically by being notified or interrupted.final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
Constructor Details
-
TitledBorderUIResource
Constructs aTitledBorderUIResource.- Parameters:
title- the title the border should display
-
TitledBorderUIResource
Constructs aTitledBorderUIResource.- Parameters:
border- the border
-
TitledBorderUIResource
-
TitledBorderUIResource
public TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition) Constructs aTitledBorderUIResource.- Parameters:
border- the bordertitle- the title the border should displaytitleJustification- the justification for the titletitlePosition- the position for the title
-
TitledBorderUIResource
public TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont) Constructs aTitledBorderUIResource.- Parameters:
border- the bordertitle- the title the border should displaytitleJustification- the justification for the titletitlePosition- the position for the titletitleFont- the font for rendering the title
-
TitledBorderUIResource
@ConstructorProperties({"border","title","titleJustification","titlePosition","titleFont","titleColor"}) public TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) Constructs aTitledBorderUIResource.- Parameters:
border- the bordertitle- the title the border should displaytitleJustification- the justification for the titletitlePosition- the position for the titletitleFont- the font for rendering the titletitleColor- the color of the title
-