public interface AlignmentSupport
Modifier and Type | Method and Description |
---|---|
int |
getHorizontalAlignment()
Returns the horizontal alignment of the content.
|
int |
getVerticalAlignment()
Returns the vertical alignment of the content.
|
void |
setHorizontalAlignment(int alignment)
Sets the horizontal alignment of the content.
|
void |
setVerticalAlignment(int alignment)
Sets the vertical alignment of the content.
|
int getHorizontalAlignment()
AbstractButton
's default is SwingConstants.CENTER
,
but subclasses such as JCheckBox
may use a different default.horizontalAlignment
property,
one of the following values:
SwingConstants.RIGHT
SwingConstants.LEFT
SwingConstants.CENTER
SwingConstants.LEADING
SwingConstants.TRAILING
void setHorizontalAlignment(int alignment)
AbstractButton
's default is SwingConstants.CENTER
,
but subclasses such as JCheckBox
may use a different default.alignment
- the alignment value, one of the following values:
SwingConstants.RIGHT
SwingConstants.LEFT
SwingConstants.CENTER
SwingConstants.LEADING
SwingConstants.TRAILING
IllegalArgumentException
- if the alignment is not one of the
valid valuesint getVerticalAlignment()
verticalAlignment
property, one of the
following values:
SwingConstants.CENTER
(the default)
SwingConstants.TOP
SwingConstants.BOTTOM
void setVerticalAlignment(int alignment)
alignment
- one of the following values:
SwingConstants.CENTER
(the default)
SwingConstants.TOP
SwingConstants.BOTTOM
IllegalArgumentException
- if the alignment is not one of the legal
values listed above