JIDE 3.5.15

com.jidesoft.swing
Interface Alignable

All Known Implementing Classes:
AutoFilterBox, AutoFilterTableHeaderRenderer, BasicDockableFrameTitlePane.NoFocusButton, Chevron, ColorChooserPanel.ColorButton, CommandBar, CommandBar.Expansion, CommandBarSeparator, CommandBarTitleBar, CommandMenuBar, CornerScroller, DockableBar, FieldBox, FloorTabbedPane.FloorButton, GadgetPaletteButton, Gripper, HeaderBox, JideButton, JideColorSplitButton, JideLabel, JideMenu, JideSplitButton, JideToggleButton, JideToggleSplitButton, NullJideButton, OutlookTabbedPane.OutlookButton, SimpleScrollPane.ScrollButton, StatusBarSeparator, VerticalContextSensitiveCellRenderer, VerticalTableCellRenderer, VerticalTableCellRenderer.UIResource, XertoDockableFrameUI.XertoDockableFrameTitlePane.XertoNoFocusButton

public interface Alignable

Alignable is an interface that can be implemented by any components to provide information such as how to set orientation and check whether a component supports vertical orientation or horizontal orientation.

Some components support both vertical orientation and horizontal orientation. For example, an icon-only JideButton. It can be put on either a vertical toolbar or normal horizontal toolbar. However most components don't support both. For example, a combo box. It's hard to imagine a combobox putting on a vertical toolbar.

By implementing this interface, a component can choose if it wants to support vertical orientation or horizontal orientation. However if a component which doesn't implement this interface is added to toolbar, by default, it will be treated as supportHorizontalOrientation() returning true and supportVerticalOrientation() returning false.


Field Summary
static String PROPERTY_ORIENTATION
          Property name to indicate the orientation is changed.
 
Method Summary
 int getOrientation()
          Gets the orientation.
 void setOrientation(int orientation)
          Changes the orientation.
 boolean supportHorizontalOrientation()
          Checks if the component support horizontal orientation.
 boolean supportVerticalOrientation()
          Checks if the component support vertical orientation.
 

Field Detail

PROPERTY_ORIENTATION

static final String PROPERTY_ORIENTATION
Property name to indicate the orientation is changed.

See Also:
Constant Field Values
Method Detail

supportVerticalOrientation

boolean supportVerticalOrientation()
Checks if the component support vertical orientation. doesn't consider the component orientation, it should return false.

Returns:
true if it supports vertical orientation

supportHorizontalOrientation

boolean supportHorizontalOrientation()
Checks if the component support horizontal orientation.

Returns:
true if it supports horizontal orientation

setOrientation

void setOrientation(int orientation)
Changes the orientation. If the component is a Swing component, the default implementation is this.
JideSwingUtilities.setOrientationOf(this, orientation);

Parameters:
orientation - the new orientation

getOrientation

int getOrientation()
Gets the orientation. If the component is a Swing component, the default implementation is this.
return JideSwingUtilities.getOrientationOf(this);

Returns:
orientation

JIDE 3.5.15