Lines Matching refs:border

25 package javax.swing.border;
43 * A class which implements an arbitrary border
47 * If the border, font, or color property values are not
53 * <li>&quot;TitledBorder.border&quot;
73 protected Border border;
85 /** Position the title above the border's top line. */
87 /** Position the title in the middle of the border's top line. */
89 /** Position the title below the border's top line. */
91 /** Position the title above the border's bottom line. */
93 /** Position the title in the middle of the border's bottom line. */
95 /** Position the title below the border's bottom line. */
102 /** Position title text at the left side of the border line. */
104 /** Position title text in the center of the border line. */
106 /** Position title text at the right side of the border line. */
108 /** Position title text at the left side of the border line
110 * border line for right to left orientation.
113 /** Position title text at the right side of the border line
115 * border line for right to left orientation.
119 // Space between the border and the component's edge
122 // Space between the border and text
131 * @param title the title the border should display
138 * Creates a TitledBorder instance with the specified border
141 * @param border the border
143 public TitledBorder(Border border) {
144 this(border, "", LEADING, DEFAULT_POSITION, null, null);
148 * Creates a TitledBorder instance with the specified border
151 * @param border the border
152 * @param title the title the border should display
154 public TitledBorder(Border border, String title) {
155 this(border, title, LEADING, DEFAULT_POSITION, null, null);
159 * Creates a TitledBorder instance with the specified border,
162 * @param border the border
163 * @param title the title the border should display
167 public TitledBorder(Border border,
171 this(border, title, titleJustification,
176 * Creates a TitledBorder instance with the specified border,
179 * @param border the border
180 * @param title the title the border should display
185 public TitledBorder(Border border,
190 this(border, title, titleJustification,
195 * Creates a TitledBorder instance with the specified border,
199 * @param border the border
200 * @param title the title the border should display
206 @ConstructorProperties({"border", "title", "titleJustification", "titlePosition", "titleFont", "titleColor"})
207 public TitledBorder(Border border,
214 this.border = border;
227 * Paints the border for the specified component with the
229 * @param c the component for which this border is being painted
231 * @param x the x position of the painted border
232 * @param y the y position of the painted border
233 * @param width the width of the painted border
234 * @param height the height of the painted border
237 Border border = getBorder();
240 int edge = (border instanceof TitledBorder) ? 0 : EDGE_SPACING;
243 Insets insets = getBorderInsets(border, c, new Insets(0, 0, 0, 0));
313 if (border != null) {
315 border.paintBorder(c, g, borderX, borderY, borderW, borderH);
328 border.paintBorder(c, g2, borderX, borderY, borderW, borderH);
337 else if (border != null) {
338 border.paintBorder(c, g, x, y, width, height);
344 * @param c the component for which this border insets value applies
348 Border border = getBorder();
349 insets = getBorderInsets(border, c, insets);
353 int edge = (border instanceof TitledBorder) ? 0 : EDGE_SPACING;
392 * Returns whether or not the border is opaque.
399 * Returns the title of the titled border.
401 * @return the title of the titled border
408 * Returns the border of the titled border.
410 * @return the border of the titled border
413 return border != null
414 ? border
415 : UIManager.getBorder("TitledBorder.border");
419 * Returns the title-position of the titled border.
421 * @return the title-position of the titled border
428 * Returns the title-justification of the titled border.
430 * @return the title-justification of the titled border
437 * Returns the title-font of the titled border.
439 * @return the title-font of the titled border
446 * Returns the title-color of the titled border.
448 * @return the title-color of the titled border
458 * Sets the title of the titled border.
459 * @param title the title for the border
466 * Sets the border of the titled border.
467 * @param border the border
469 public void setBorder(Border border) {
470 this.border = border;
474 * Sets the title-position of the titled border.
475 * @param titlePosition the position for the border
495 * Sets the title-justification of the titled border.
496 * @param titleJustification the justification for the border
515 * Sets the title-font of the titled border.
516 * @param titleFont the font for the border title
523 * Sets the title-color of the titled border.
524 * @param titleColor the color for the border title
531 * Returns the minimum dimensions this border requires
532 * in order to fully display the border and title.
533 * @param c the component where this border will be drawn
574 Border border = getBorder();
577 int edge = (border instanceof TitledBorder) ? 0 : EDGE_SPACING;
580 Insets insets = getBorderInsets(border, c, new Insets(0, 0, 0, 0));
608 * Returns an enum indicating how the baseline of the border
719 private static Insets getBorderInsets(Border border, Component c, Insets insets) {
720 if (border == null) {
723 else if (border instanceof AbstractBorder) {
724 AbstractBorder ab = (AbstractBorder) border;
728 Insets i = border.getBorderInsets(c);