javax.swing.plaf
Class BorderUIResource.TitledBorderUIResource
- BorderUIResource
- Border, Serializable, UIResource
A
TitledBorder
that also implements the
UIResource
marker interface. This is useful for
implementing pluggable look-and-feels: When switching the current
LookAndFeel, only those borders are replaced that are marked as
UIResource
. For this reason, a look-and-feel should
always install borders that implement
UIResource
,
such as the borders provided by this class.
ABOVE_BOTTOM , ABOVE_TOP , BELOW_BOTTOM , BELOW_TOP , BOTTOM , CENTER , DEFAULT_JUSTIFICATION , DEFAULT_POSITION , EDGE_SPACING , LEADING , LEFT , RIGHT , TEXT_INSET_H , TEXT_SPACING , TOP , TRAILING , border , title , titleColor , titleFont , titleJustification , titlePosition |
TitledBorderUIResource(String title) - Constructs a TitledBorderUIResource given the text of its title.
|
TitledBorderUIResource(Border border) - Constructs an initially untitled TitledBorderUIResource
given another border.
|
TitledBorderUIResource(Border border, String title) - Constructs a TitledBorder given its border and title text.
|
TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition) - Constructs a TitledBorderUIResource given its border, title
text, horizontal alignment, and vertical position.
|
TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont) - Constructs a TitledBorder given its border, title text,
horizontal alignment, vertical position, and font.
|
TitledBorderUIResource(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) - Constructs a TitledBorder given its border, title text,
horizontal alignment, vertical position, font, and color.
|
getBorder , getBorderInsets , getBorderInsets , getFont , getMinimumSize , getTitle , getTitleColor , getTitleFont , getTitleJustification , getTitlePosition , isBorderOpaque , paintBorder , setBorder , setTitle , setTitleColor , setTitleFont , setTitleJustification , setTitlePosition |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
TitledBorderUIResource
public TitledBorderUIResource(String title)
Constructs a TitledBorderUIResource given the text of its title.
title
- the title text, or null
to use no
title text.
TitledBorderUIResource
public TitledBorderUIResource(Border border)
Constructs an initially untitled TitledBorderUIResource
given another border.
border
- the border underneath the title, or
null
to use a default from
the current look and feel.
TitledBorderUIResource
public TitledBorderUIResource(Border border,
String title)
Constructs a TitledBorder given its border and title text.
border
- the border underneath the title, or
null
to use a default from
the current look and feel.title
- the title text, or null
to use no title text.
TitledBorderUIResource
public TitledBorderUIResource(Border border,
String title,
int titleJustification,
int titlePosition)
Constructs a TitledBorderUIResource given its border, title
text, horizontal alignment, and vertical position.
border
- the border underneath the title, or
null
to use a default
from the current look and feel.title
- the title text, or null
to use no title text.titleJustification
- the horizontal alignment of the title
text in relation to the border. The value must be one of
TitledBorder.LEFT
,
TitledBorder.CENTER
,
TitledBorder.RIGHT
,
TitledBorder.LEADING
,
TitledBorder.TRAILING
, or
TitledBorder.DEFAULT_JUSTIFICATION
.titlePosition
- the vertical position of the title text
in relation to the border. The value must be one of
TitledBorder.ABOVE_TOP
,
TitledBorder.TOP
,
TitledBorder.BELOW_TOP
,
TitledBorder.ABOVE_BOTTOM
,
TitledBorder.BOTTOM
,
TitledBorder.BELOW_BOTTOM
,
or TitledBorder.DEFAULT_POSITION
.
TitledBorderUIResource
public TitledBorderUIResource(Border border,
String title,
int titleJustification,
int titlePosition,
Font titleFont)
Constructs a TitledBorder given its border, title text,
horizontal alignment, vertical position, and font.
border
- the border underneath the title, or
null
to use a default
from the current look and feel.title
- the title text, or null
to use no title text.titleJustification
- the horizontal alignment of the title
text in relation to the border. The value must be one of
TitledBorder.LEFT
,
TitledBorder.CENTER
,
TitledBorder.RIGHT
,
TitledBorder.LEADING
,
TitledBorder.TRAILING
, or
TitledBorder.DEFAULT_JUSTIFICATION
.titlePosition
- the vertical position of the title text
in relation to the border. The value must be one of
TitledBorder.ABOVE_TOP
,
TitledBorder.TOP
,
TitledBorder.BELOW_TOP
,
TitledBorder.ABOVE_BOTTOM
,
TitledBorder.BOTTOM
,
TitledBorder.BELOW_BOTTOM
,
or TitledBorder.DEFAULT_POSITION
.titleFont
- the font for the title text, or null
to use a default from the current look and feel.
TitledBorderUIResource
public TitledBorderUIResource(Border border,
String title,
int titleJustification,
int titlePosition,
Font titleFont,
Color titleColor)
Constructs a TitledBorder given its border, title text,
horizontal alignment, vertical position, font, and color.
border
- the border underneath the title, or
null
to use a default
from the current look and feel.title
- the title text, or null
to use no title text.titleJustification
- the horizontal alignment of the title
text in relation to the border. The value must be one of
TitledBorder.LEFT
,
TitledBorder.CENTER
,
TitledBorder.RIGHT
,
TitledBorder.LEADING
,
TitledBorder.TRAILING
, or
TitledBorder.DEFAULT_JUSTIFICATION
.titlePosition
- the vertical position of the title text
in relation to the border. The value must be one of
TitledBorder.ABOVE_TOP
,
TitledBorder.TOP
,
TitledBorder.BELOW_TOP
,
TitledBorder.ABOVE_BOTTOM
,
TitledBorder.BOTTOM
,
TitledBorder.BELOW_BOTTOM
,
or TitledBorder.DEFAULT_POSITION
.titleFont
- the font for the title text, or null
to use a default from the current look and feel.titleColor
- the color for the title text, or null
to use a default from the current look and feel.
BorderUIResource.java
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.