public class ViewForm extends Composite
Note that although this class is a subclass of Composite
,
it does not make sense to set a layout on it.
IMPORTANT: This class is not intended to be subclassed.
Modifier and Type | Field and Description |
---|---|
(package private) static int |
BORDER1_COLOR |
(package private) int |
borderBottom |
static RGB |
borderInsideRGB
Deprecated.
|
(package private) int |
borderLeft |
static RGB |
borderMiddleRGB
Deprecated.
|
static RGB |
borderOutsideRGB
Deprecated.
|
(package private) int |
borderRight |
(package private) int |
borderTop |
(package private) Control |
content |
(package private) int |
highlight |
int |
horizontalSpacing
horizontalSpacing specifies the number of pixels between the right
edge of one cell and the left edge of its neighbouring cell to
the right.
|
(package private) Listener |
listener |
int |
marginHeight
marginHeight specifies the number of pixels of vertical margin
that will be placed along the top and bottom edges of the form.
|
int |
marginWidth
marginWidth specifies the number of pixels of horizontal margin
that will be placed along the left and right edges of the form.
|
(package private) static int |
OFFSCREEN |
(package private) Point |
oldSize |
(package private) static int |
SELECTION_BACKGROUND |
(package private) Color |
selectionBackground |
(package private) boolean |
separateTopCenter |
(package private) int |
separator |
(package private) boolean |
showBorder |
(package private) Control |
topCenter |
(package private) Control |
topLeft |
(package private) Control |
topRight |
int |
verticalSpacing
verticalSpacing specifies the number of pixels between the bottom
edge of one cell and the top edge of its neighbouring cell underneath.
|
Constructor and Description |
---|
ViewForm(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 |
---|---|
(package private) static int |
checkStyle(int style) |
Rectangle |
computeTrim(int x,
int y,
int width,
int height)
Given a desired client area for the receiver
(as described by the arguments), returns the bounding
rectangle which would be required to produce that client
area.
|
Rectangle |
getClientArea()
Returns a rectangle which describes the area of the
receiver which is capable of displaying data (that is,
not covered by the "trimmings").
|
Control |
getContent()
Returns the content area.
|
Control |
getTopCenter()
Returns Control that appears in the top center of the pane.
|
Control |
getTopLeft()
Returns the Control that appears in the top left corner of the pane.
|
Control |
getTopRight()
Returns the control in the top right corner of the pane.
|
(package private) void |
onDispose(Event event) |
(package private) void |
onPaint(GC gc) |
(package private) void |
onResize() |
void |
setBorderVisible(boolean show)
Specify whether the border should be displayed or not.
|
void |
setContent(Control content)
Sets the content.
|
void |
setLayout(Layout layout)
Sets the layout which is associated with the receiver to be
the argument which may be null.
|
(package private) void |
setSelectionBackground(Color color) |
void |
setTopCenter(Control topCenter)
Set the control that appears in the top center of the pane.
|
void |
setTopCenterSeparate(boolean show)
If true, the topCenter will always appear on a separate line by itself, otherwise the
topCenter will appear in the top row if there is room and will be moved to the second row if
required.
|
void |
setTopLeft(Control c)
Set the control that appears in the top left corner of the pane.
|
void |
setTopRight(Control c)
Set the control that appears in the top right corner of the pane.
|
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayoutDeferred, setTabList
getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
public int marginWidth
public int marginHeight
public int horizontalSpacing
public int verticalSpacing
public static RGB borderInsideRGB
public static RGB borderMiddleRGB
public static RGB borderOutsideRGB
Control topLeft
Control topCenter
Control topRight
Control content
boolean separateTopCenter
boolean showBorder
int separator
int borderTop
int borderBottom
int borderLeft
int borderRight
int highlight
Point oldSize
Color selectionBackground
Listener listener
static final int OFFSCREEN
static final int BORDER1_COLOR
static final int SELECTION_BACKGROUND
public ViewForm(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.BORDER
,
SWT.FLAT
,
Widget.getStyle()
static int checkStyle(int style)
public Rectangle computeTrim(int x, int y, int width, int height)
Scrollable
In other words, it returns a rectangle such that, if the receiver's bounds were set to that rectangle, the area of the receiver which is capable of displaying data (that is, not covered by the "trimmings") would be the rectangle described by the arguments (relative to the receiver's parent).
computeTrim
in class Scrollable
x
- the desired x coordinate of the client areay
- the desired y coordinate of the client areawidth
- the desired width of the client areaheight
- the desired height of the client areaScrollable.getClientArea()
public Rectangle getClientArea()
Scrollable
getClientArea
in class Scrollable
Scrollable.computeTrim(int, int, int, int)
public Control getContent()
public Control getTopCenter()
public Control getTopLeft()
public Control getTopRight()
void onDispose(Event event)
void onPaint(GC gc)
void onResize()
public void setContent(Control content)
content
- the control to be displayed in the content area or nullSWTException
- 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
- void setSelectionBackground(Color color)
public void setTopCenter(Control topCenter)
topCenter
- the control to be displayed in the top center or nullSWTException
- public void setTopLeft(Control c)
c
- the control to be displayed in the top left corner or nullSWTException
- public void setTopRight(Control c)
c
- the control to be displayed in the top right corner or nullSWTException
- public void setBorderVisible(boolean show)
show
- true if the border should be displayedSWTException
- public void setTopCenterSeparate(boolean show)
show
- true if the topCenter will always appear on a separate line by itselfSWTException
-