|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.swt.widgets.Widget | +--org.eclipse.swt.widgets.Control | +--org.eclipse.swt.widgets.Scrollable | +--org.eclipse.swt.widgets.Composite | +--org.eclipse.swt.custom.SashForm
Safe: The SashForm lays out its children in a Row or Column arrangement (as specified by the orientation) and places a Sash between the children. One child may be maximized to occupy the entire size of the SashForm. The relative sizes of the children may be specfied using weights.
Field Summary | |
private Control[] |
controls
|
private static int |
DRAG_MINIMUM
|
private static String |
LAYOUT_RATIO
|
private Control |
maxControl
|
private int |
orientation
|
int |
SASH_WIDTH
Enabled: |
private Sash[] |
sashes
|
private Listener |
sashListener
|
Fields inherited from class org.eclipse.swt.widgets.Composite |
|
Fields inherited from class org.eclipse.swt.widgets.Scrollable |
|
Fields inherited from class org.eclipse.swt.widgets.Control |
handle |
Fields inherited from class org.eclipse.swt.widgets.Widget |
|
Constructor Summary | |
SashForm(Composite parent,
int style)
Enabled: Constructs a new instance of this class given its parent and a style value describing its behavior and appearance. |
Method Summary | |
private static int |
checkStyle(int style)
|
Point |
computeSize(int wHint,
int hHint,
boolean changed)
Enabled: |
private Control[] |
getControls(boolean onlyVisible)
|
Control |
getMaximizedControl()
Enabled: Answer the control that currently is maximized in the SashForm. |
int |
getOrientation()
Enabled: Returns SWT.HORIZONTAL if the controls in the SashForm are laid out side by side or SWT.VERTICAL if the controls in the SashForm are laid out top to bottom. |
int[] |
getWeights()
Enabled: Answer the relative weight of each child in the SashForm. |
void |
layout(boolean changed)
Enabled: |
private void |
onDragSash(Event event)
|
void |
setLayout(Layout layout)
Enabled: |
void |
setMaximizedControl(Control control)
Enabled: Specify the control that should take up the entire client area of the SashForm. |
void |
setOrientation(int orientation)
Enabled: If orientation is SWT.HORIZONTAL, lay the controls in the SashForm out side by side. |
void |
setWeights(int[] weights)
Enabled: Specify the relative weight of each child in the SashForm. |
Methods inherited from class org.eclipse.swt.widgets.Composite |
checkSubclass, getChildren, getLayout, getTabList, layout, moveAbove, moveBelow, setFocus, setTabList |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getStyle, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public int SASH_WIDTH
private static final int DRAG_MINIMUM
private int orientation
private Sash[] sashes
private Control[] controls
private Control maxControl
private Listener sashListener
private static final String LAYOUT_RATIO
Constructor Detail |
public SashForm(Composite parent, int style)
The style value is either one of the style constants defined in
class SWT
which is applicable to instances of this
class, or must be built by bitwise OR'ing together
(that is, using the int
"|" operator) two or more
of those SWT
style constants. The class description
lists the style constants that are applicable to the class.
Style bits are also inherited from superclasses.
parent
- a widget which will be the parent of the new instance (cannot be null)style
- the style of widget to constructSWT.HORIZONTAL
,
SWT.VERTICAL
,
Widget.getStyle()
Method Detail |
private static int checkStyle(int style)
public Point computeSize(int wHint, int hHint, boolean changed)
computeSize
in class Composite
wHint
- the width hint (can be SWT.DEFAULT
)hHint
- the height hint (can be SWT.DEFAULT
)changed
- true
if the control's contents have changed, and false
otherwise
Layout
,
Control.getBorderWidth()
,
Control.getBounds()
,
Control.getSize()
,
Control.pack()
,
"computeTrim, getClientArea for controls that implement them"public int getOrientation()
public Control getMaximizedControl()
public int[] getWeights()
private Control[] getControls(boolean onlyVisible)
public void layout(boolean changed)
layout
in class Composite
changed
- true
if the layout must flush its caches, and false
otherwiseprivate void onDragSash(Event event)
public void setOrientation(int orientation)
orientation
- SWT.HORIZONTAL or SWT.VERTICALpublic void setLayout(Layout layout)
setLayout
in class Composite
layout
- the receiver's new layout or nullpublic void setMaximizedControl(Control control)
control
- the control to be maximized or nullpublic void setWeights(int[] weights)
weights
- the relative weight of each child
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |