public class SashForm extends Composite
Modifier and Type | Field and Description |
---|---|
int |
SASH_WIDTH |
Constructor and Description |
---|
SashForm(Composite parent,
int style)
Constructs a new instance of this class given its parent
and a style value describing its behavior and appearance.
|
Modifier and Type | Method and Description |
---|---|
Control |
getMaximizedControl()
Answer the control that currently is maximized in the SashForm.
|
int |
getOrientation()
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 |
getSashWidth()
Returns the width of the sashes when the controls in the SashForm are
laid out.
|
int |
getStyle()
Returns the receiver's style information.
|
int[] |
getWeights()
Answer the relative weight of each child in the SashForm.
|
void |
setBackground(Color color)
Sets the receiver's background color to the color specified
by the argument, or to the default system color for the control
if the argument is null.
|
void |
setForeground(Color color)
Sets the receiver's foreground color to the color specified
by the argument, or to the default system color for the control
if the argument is null.
|
void |
setLayout(Layout layout)
Sets the layout which is associated with the receiver to be
the argument which may be null.
|
void |
setMaximizedControl(Control control)
Specify the control that should take up the entire client area of the SashForm.
|
void |
setOrientation(int orientation)
If orientation is SWT.HORIZONTAL, lay the controls in the SashForm
out side by side.
|
void |
setSashWidth(int width)
Specify the width of the sashes when the controls in the SashForm are
laid out.
|
void |
setWeights(int[] weights)
Specify the relative weight of each child in the SashForm.
|
changed, computeSize, getAdapter, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addTouchListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getTouchEnabled, getVisible, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeTouchListener, removeTraverseListener, requestLayout, setBackgroundImage, setBounds, setBounds, setCursor, setData, setEnabled, setFont, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, update
addDisposeListener, addListener, checkSubclass, checkWidget, dispose, getData, getData, getDisplay, getListeners, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, toString
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 constructjava.lang.IllegalArgumentException
- SWTException
- SWT.HORIZONTAL
,
SWT.VERTICAL
,
getStyle()
public int getOrientation()
To retrieve the bidi orientation of the SashForm use
and test if the SWT.RIGHT_TO_LEFT or SWT.LEFT_TO_RIGHT bits are set.
getStyle()
getOrientation
in class Control
public int getSashWidth()
SWTException
- public int getStyle()
Widget
Note that the value which is returned by this method may
not match the value which was provided to the constructor
when the receiver was created. This can occur when the underlying
operating system does not support a particular combination of
requested styles. For example, if the platform widget used to
implement a particular SWT widget always has scroll bars, the
result of calling this method would always have the
SWT.H_SCROLL
and SWT.V_SCROLL
bits set.
public Control getMaximizedControl()
public int[] getWeights()
SWTException
- public void setOrientation(int orientation)
Since 3.1, this method can also be called with SWT.RIGHT_TO_LEFT or SWT.LEFT_TO_RIGHT to change the bidi orientation of the SashForm.
setOrientation
in class Control
orientation
- SWT.HORIZONTAL or SWT.VERTICAL, SWT.RIGHT_TO_LEFT or SWT.LEFT_TO_RIGHTSWTException
- Control.setOrientation(int)
public void setBackground(Color color)
Control
setBackground
in class Control
color
- the new color (or null)public void setForeground(Color color)
Control
setForeground
in class Control
color
- the new color (or null)public void setLayout(Layout layout)
Note: No Layout can be set on this Control because it already manages the size and position of its children.
setLayout
in class Composite
layout
- the receiver's new layout or nullSWTException
- public void setMaximizedControl(Control control)
control
- the control to be maximized or nullSWTException
- public void setSashWidth(int width)
width
- the width of the sashesSWTException
- public void setWeights(int[] weights)
weights
- the relative weight of each childSWTException
-
Copyright (c) EclipseSource and others 2002, 2017.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0