|
Oculus Layout System API Documentation November 25, 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.oculustech.layout.OculusLayoutConstraints
This class implements the OculusLayoutInfo interface. It is intended to be associated with a component when the component is being added to an OculusGrid, OculusBox, or other container using OculusLayout. Instances of this class contain stretching preferences, and size constraints to be associated with a component.
Fields inherited from interface com.oculustech.layout.OculusLayoutInfo |
ALIGNED_COMPONENT_SPACING, ALIGNMENT_SPACE_STRETCHING, CAN_BE_STRETCHED, LOW_PRIORITY_ALIGNMENT_SPACE_STRETCHING, MAX_STRETCHING_PREFERENCE, NO_STRETCH, START_NON_POINT_ALIGNMENT_STRETCHING_HERE, START_NORMAL_STRETCHING, START_STRETCHING_HERE, STRETCH_ONLY_TO_ALIGN, WANT_STRETCHED |
Constructor Summary | |
OculusLayoutConstraints()
Constructor with default settings. |
|
OculusLayoutConstraints(int xStretchingPreference,
int yStretchingPreference)
Constructor with given stretching preferences and default sizing settings. |
|
OculusLayoutConstraints(int xStretchingPreference,
int yStretchingPreference,
java.awt.Component heightGuide,
java.awt.Component widthGuide)
Constructor with the given stretching and sizing preferences. |
Method Summary | |
static OculusLayoutInfo |
getDefaultConstraints(java.awt.Component c)
Returns the default OculusLayoutConstraints for c. |
java.awt.Component |
getSameHeightAs()
Returns the component to which this constraint's associated component's height is to be matched. |
java.awt.Component |
getSameWidthAs()
Returns the component to which this constraint's associated component's width is to be matched. |
int |
getXPreference()
Gets the horizontal stretching preference. |
int |
getYPreference()
Gets the vertical stretching preference. |
void |
setSameHeightAs(java.awt.Component c)
Sets the vertical size equal to that of the given component. |
void |
setSameWidthAs(java.awt.Component c)
Sets the horizontal size equal to that of the given component. |
void |
setXPreference(int preference)
Sets the horizontal stretching preference according to one of the fields. |
void |
setYPreference(int preference)
Sets the vertical stretching preference according to one of the fields. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OculusLayoutConstraints()
public OculusLayoutConstraints(int xStretchingPreference, int yStretchingPreference)
xStretchingPreference
- One of the stretching preferences defined in OculusLayoutInfoyStretchingPreference
- One of the stretching preferences defined in OculusLayoutInfopublic OculusLayoutConstraints(int xStretchingPreference, int yStretchingPreference, java.awt.Component heightGuide, java.awt.Component widthGuide)
xStretchingPreference
- One of the stretching preferences defined in OculusLayoutInfoyStretchingPreference
- One of the stretching preferences defined in OculusLayoutInfoheightGuide
- The component whose vertical size will be matched.widthGuide
- The component whose horizontal size will be matched.Method Detail |
public void setXPreference(int preference)
preference
- One of the stretching preferences defined in OculusLayoutInfopublic int getXPreference()
getXPreference
in interface OculusLayoutInfo
com.oculustech.layout.OculusLayoutInfo
public void setYPreference(int preference)
preference
- One of the stretching preferences defined in OculusLayoutInfopublic int getYPreference()
getYPreference
in interface OculusLayoutInfo
com.oculustech.layout.OculusLayoutInfo
public void setSameHeightAs(java.awt.Component c)
c
- The component whose height is to be matchedpublic java.awt.Component getSameHeightAs()
getSameHeightAs
in interface OculusLayoutInfo
com.oculustech.layout.OculusLayoutInfo
public void setSameWidthAs(java.awt.Component c)
c
- The component whose width is to be matchedpublic java.awt.Component getSameWidthAs()
getSameWidthAs
in interface OculusLayoutInfo
com.oculustech.layout.OculusLayoutInfo
public static OculusLayoutInfo getDefaultConstraints(java.awt.Component c)
Default constraints for common Swing components:
(component = horizontal-stretching, vertical-stretching)
JLabel = NO_STRETCH, NO_STRETCH
JRadioButton = NO_STRETCH, NO_STRETCH
JCheckBox = NO_STRETCH, NO_STRETCH
JComboBox = STRETCH_ONLY_TO_ALIGN, NO_STRETCH
JButton = STRETCH_ONLY_TO_ALIGN, NO_STRETCH
JTextField = CAN_BE_STRETCHED, NO_STRETCH
JTextArea = CAN_BE_STRETCHED, CAN_BE_STRETCHED
JEditorPane = CAN_BE_STRETCHED, CAN_BE_STRETCHED
JTabbedPane = CAN_BE_STRETCHED, CAN_BE_STRETCHED
JScrollPane = CAN_BE_STRETCHED, WANT_STRETCHED
JList = CAN_BE_STRETCHED, WANT_STRETCHED
JTable = WANT_STRETCHED, WANT_STRETCHED
JTree = WANT_STRETCHED, WANT_STRETCHED
JSplitPane = WANT_STRETCHED, WANT_STRETCHED
c
- The component whose default OculusLayoutConstraints are returned.
|
Oculus Layout System API Documentation November 25, 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |