|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectComposite
net.sourceforge.rssowl.controller.ViewForm
public class ViewForm
Instances of this class implement a Composite that lays out three children horizontally and allows programmatic control of layout and border parameters. ViewForm is used in the workbench to implement a view's label/menu/toolbar local bar.
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.
| Field Summary | |
|---|---|
private int |
BORDER_BOTTOM
|
private int |
BORDER_LEFT
|
private int |
BORDER_RIGHT
|
private int |
BORDER_TOP
|
private Control |
content
|
private boolean |
draw3DBorder
|
private int |
drawLine1
|
private int |
drawLine2
|
private boolean |
isToolBarMode
|
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. |
private static int |
OFFSCREEN
|
private Rectangle |
oldArea
|
private boolean |
onlyBorderBottom
|
private boolean |
onlyBorderTop
|
private boolean |
onlyBorderTopBottom
|
private boolean |
separateTopCenter
|
private boolean |
showBorder
|
private Control |
topCenter
|
private Control |
topLeft
SWT widgets |
private Control |
topRight
|
| Constructor Summary | |
|---|---|
ViewForm(Composite parent,
int style)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance. |
|
| Method Summary | |
|---|---|
(package private) static int |
checkStyle(int style)
|
Point |
computeSize(int wHint,
int hHint,
boolean changed)
|
Rectangle |
computeTrim(int x,
int y,
int width,
int height)
|
Rectangle |
getClientArea()
|
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. |
void |
layout(boolean changed)
|
(package private) void |
onDispose()
|
(package private) void |
onPaint(GC gc)
|
(package private) void |
onResize()
|
void |
set3DBorderState(boolean show)
Show / Hide the 3D Border of the ViewForm |
void |
setBorderVisible(boolean show)
Specify whether the border should be displayed or not. |
void |
setContent(Control content,
boolean layout)
Sets the content. |
void |
setFont(Font f)
|
void |
setLayout(Layout layout)
Sets the layout which is associated with the receiver to be the argument which may be null. |
void |
setOnlyBorderBottom(boolean onlyBorderBottom)
Set that the ViewForm should only paint a single border on bottom. |
void |
setOnlyBorderTop(boolean onlyBorderTop)
Set that the ViewForm should only paint a single border on top. |
void |
setOnlyBorderTopBottom(boolean onlyBorderTopBottom)
Set that the ViewForm should only paint a single border on top and bottom. |
void |
setToolBarMode(boolean isToolBarMode)
|
void |
setTopCenter(Control topCenter,
boolean layout)
Set the control that appears in the top center of the pane. |
void |
setTopCenterSeparate(boolean show,
boolean layout)
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,
boolean layout)
Set the control that appears in the top left corner of the pane. |
void |
setTopRight(Control c,
boolean layout)
Set the control that appears in the top right corner of the pane. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int OFFSCREEN
public int marginHeight
public int marginWidth
private int BORDER_BOTTOM
private int BORDER_LEFT
private int BORDER_RIGHT
private int BORDER_TOP
private Control content
private boolean draw3DBorder
private int drawLine1
private int drawLine2
private boolean isToolBarMode
private Rectangle oldArea
private boolean onlyBorderBottom
private boolean onlyBorderTop
private boolean onlyBorderTopBottom
private boolean separateTopCenter
private boolean showBorder
private Control topCenter
private Control topLeft
private Control topRight
| Constructor Detail |
|---|
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 construct
java.lang.IllegalArgumentException - SWTException - SWT#BORDER,
SWT#FLAT,
#getStyle()| Method Detail |
|---|
static int checkStyle(int style)
public Point computeSize(int wHint,
int hHint,
boolean changed)
public Rectangle computeTrim(int x,
int y,
int width,
int height)
public Rectangle getClientArea()
public Control getContent()
public Control getTopCenter()
public Control getTopLeft()
public Control getTopRight()
public void layout(boolean changed)
public void set3DBorderState(boolean show)
show - If TRUE, show the 3D Borederpublic void setBorderVisible(boolean show)
show - true if the border should be displayed
SWTException -
public void setContent(Control content,
boolean layout)
content - the control to be displayed in the content area or nulllayout - If TRUE, layout the ViewForm
SWTException - public void setFont(Font f)
public void setLayout(Layout layout)
Note : ViewForm does not use a layout class to size and position its children.
layout - the receiver's new layout or null
SWTException - public void setOnlyBorderBottom(boolean onlyBorderBottom)
onlyBorderBottom - If TRUE only paint a single, bottom borderpublic void setOnlyBorderTop(boolean onlyBorderTop)
onlyBorderTop - If TRUE only paint a single, top borderpublic void setOnlyBorderTopBottom(boolean onlyBorderTopBottom)
onlyBorderTopBottom - If TRUE only paint a single, bottom borderpublic void setToolBarMode(boolean isToolBarMode)
isToolBarMode - If TRUE, switch ViewForm into ToolBar Mode. In ToolBar Mode the visual
presentation of the Center Control is different from the normal Mode.
public void setTopCenter(Control topCenter,
boolean layout)
topCenter - the control to be displayed in the top center or nulllayout - If TRUE, layout the ViewForm
SWTException -
public void setTopCenterSeparate(boolean show,
boolean layout)
show - true if the topCenter will always appear on a separate line by
itselflayout - If TRUE, layout the ViewForm
SWTException -
public void setTopLeft(Control c,
boolean layout)
c - the control to be displayed in the top left corner or nulllayout - If TRUE, layout the ViewForm
SWTException -
public void setTopRight(Control c,
boolean layout)
c - the control to be displayed in the top right corner or nulllayout - If TRUE, layout the ViewForm
SWTException - void onDispose()
void onPaint(GC gc)
void onResize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||