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()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.toString()Answers a string containing a concise, human-readable description of the receiver.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
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
-