JIDE 3.5.15

com.jidesoft.swing
Interface AlignmentSupport

All Known Implementing Classes:
AbstractComboBox, AbstractComboBox.DefaultRendererComponent, AbstractComboBox.DefaultTextFieldEditorComponent, AbstractComboBox.EditorComponent, AbstractComboBox.SpinnerEditorComponent, AbstractFileComboBox, AutoFilterBox, AutoFilterTableHeaderRenderer, BasicDockableFrameTitlePane.NoFocusButton, CalculatorComboBox, CheckBoxListChooserPanel, CheckBoxListComboBox, ColorChooserPanel.ColorButton, ColorComboBox, ColorComboBox.ColorEditorComponent, ColorComboBox.ColorRendererComponent, CornerScroller, DateComboBox, DateComboBox.DateEditorComponent, DateComboBox.DateRendererComponent, DateSpinnerComboBox, DateSpinnerComboBox.DateSpinnerEditorComponent, FieldBox, FileChooserComboBox, FileNameChooserComboBox, FloorTabbedPane.FloorButton, FolderChooserComboBox, FolderNameChooserComboBox, FontComboBox, GadgetPaletteButton, HeaderBox, InsetsComboBox, JideButton, JideLabel, JideToggleButton, LegacyColorCellRenderer, LegacyEnumCellRenderer, ListChooserPanel, ListComboBox, ListComboBox.ListEditorComponent, ListComboBox.ListRendererComponent, MonthComboBox, MultilineStringCellRenderer, MultilineStringComboBox, MultiSelectListChooserPanel, MultiSelectListComboBox, NullJideButton, NumberSpinnerComboBox, NumberSpinnerComboBox.NumberSpinnerEditorComponent, OutlookTabbedPane.OutlookButton, SimpleScrollPane.ScrollButton, StringArrayComboBox, TableComboBox, TreeComboBox, VerticalContextSensitiveCellRenderer, VerticalTableCellRenderer, VerticalTableCellRenderer.UIResource, XertoDockableFrameUI.XertoDockableFrameTitlePane.XertoNoFocusButton

public interface AlignmentSupport

A 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
 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.
 

Method Detail

getHorizontalAlignment

int getHorizontalAlignment()
Returns the horizontal alignment of the content. AbstractButton's default is SwingConstants.CENTER, but subclasses such as JCheckBox may use a different default.

Returns:
the horizontalAlignment property, one of the following values:
  • SwingConstants.RIGHT
  • SwingConstants.LEFT
  • SwingConstants.CENTER
  • SwingConstants.LEADING
  • SwingConstants.TRAILING

setHorizontalAlignment

void setHorizontalAlignment(int alignment)
Sets the horizontal alignment of the content. AbstractButton's default is SwingConstants.CENTER, but subclasses such as JCheckBox may use a different default.

Parameters:
alignment - the alignment value, one of the following values:
  • SwingConstants.RIGHT
  • SwingConstants.LEFT
  • SwingConstants.CENTER
  • SwingConstants.LEADING
  • SwingConstants.TRAILING
Throws:
IllegalArgumentException - if the alignment is not one of the valid values

getVerticalAlignment

int getVerticalAlignment()
Returns the vertical alignment of the content.

Returns:
the verticalAlignment property, one of the following values:
  • SwingConstants.CENTER (the default)
  • SwingConstants.TOP
  • SwingConstants.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.TOP
  • SwingConstants.BOTTOM
Throws:
IllegalArgumentException - if the alignment is not one of the legal values listed above

JIDE 3.5.15