Package com.jidesoft.swing
Interface AlignmentSupport
-
- All Known Implementing Classes:
CornerScroller,HeaderBox,JideButton,JideLabel,JideToggleButton,NullJideButton,SimpleScrollPane.ScrollButton
public interface AlignmentSupportA general interface for alignment support. All JIDE components will implement this method if it has the following methods. In standard Swing package, AbstractButton, JLabel, JTextField etc should implement this too.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetHorizontalAlignment()Returns the horizontal alignment of the content.intgetVerticalAlignment()Returns the vertical alignment of the content.voidsetHorizontalAlignment(int alignment)Sets the horizontal alignment of the content.voidsetVerticalAlignment(int alignment)Sets the vertical alignment of the content.
-
-
-
Method Detail
-
getHorizontalAlignment
int getHorizontalAlignment()
Returns the horizontal alignment of the content.AbstractButton's default isSwingConstants.CENTER, but subclasses such asJCheckBoxmay use a different default.- Returns:
- the
horizontalAlignmentproperty, one of the following values:SwingConstants.RIGHTSwingConstants.LEFTSwingConstants.CENTERSwingConstants.LEADINGSwingConstants.TRAILING
-
setHorizontalAlignment
void setHorizontalAlignment(int alignment)
Sets the horizontal alignment of the content.AbstractButton's default isSwingConstants.CENTER, but subclasses such asJCheckBoxmay use a different default.- Parameters:
alignment- the alignment value, one of the following values:SwingConstants.RIGHTSwingConstants.LEFTSwingConstants.CENTERSwingConstants.LEADINGSwingConstants.TRAILING
- Throws:
java.lang.IllegalArgumentException- if the alignment is not one of the valid values
-
getVerticalAlignment
int getVerticalAlignment()
Returns the vertical alignment of the content.- Returns:
- the
verticalAlignmentproperty, one of the following values:SwingConstants.CENTER(the default)SwingConstants.TOPSwingConstants.BOTTOM
-
setVerticalAlignment
void setVerticalAlignment(int alignment)
Sets the vertical alignment of the content.- Parameters:
alignment- one of the following values:SwingConstants.CENTER(the default)SwingConstants.TOPSwingConstants.BOTTOM
- Throws:
java.lang.IllegalArgumentException- if the alignment is not one of the legal values listed above
-
-