|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ocl.examples.debug.ui.pages.SWTFactory
public class SWTFactory
Based on the SWTFactory from JDT.
Constructor Summary | |
---|---|
SWTFactory()
|
Method Summary | |
---|---|
static org.eclipse.swt.widgets.Button |
createCheckButton(org.eclipse.swt.widgets.Composite parent,
java.lang.String label,
org.eclipse.swt.graphics.Image image,
boolean checked,
int hspan)
Creates a check box button using the parents' font |
static org.eclipse.swt.widgets.Composite |
createComposite(org.eclipse.swt.widgets.Composite parent,
org.eclipse.swt.graphics.Font font,
int columns,
int hspan,
int fill,
int marginwidth,
int marginheight)
Creates a Composite widget |
static org.eclipse.swt.widgets.Group |
createGroup(org.eclipse.swt.widgets.Composite parent,
java.lang.String text,
int columns,
int hspan,
int fill)
Creates a Group widget |
static org.eclipse.swt.widgets.Label |
createLabel(org.eclipse.swt.widgets.Composite parent,
java.lang.String text,
int hspan)
Creates a new label widget |
static org.eclipse.swt.widgets.Button |
createRadioButton(org.eclipse.swt.widgets.Composite parent,
java.lang.String label,
int hspan)
Creates and returns a new radio button with the given label. |
static org.eclipse.swt.widgets.Text |
createText(org.eclipse.swt.widgets.Composite parent,
int style,
int hspan,
java.lang.String text)
Creates a new text widget |
static int |
getButtonWidthHint(org.eclipse.swt.widgets.Button button)
Returns a width hint for a button control. |
static void |
setButtonDimensionHint(org.eclipse.swt.widgets.Button button)
Sets width and height hint for the button control. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SWTFactory()
Method Detail |
---|
public static org.eclipse.swt.widgets.Text createText(org.eclipse.swt.widgets.Composite parent, int style, int hspan, java.lang.String text)
parent
- the parent composite to add this text widget tostyle
- the style bits for the text widgethspan
- the horizontal span to take up on the parent compositetext
- the initial text, not null
public static org.eclipse.swt.widgets.Composite createComposite(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.graphics.Font font, int columns, int hspan, int fill, int marginwidth, int marginheight)
parent
- the parent composite to add this composite tocolumns
- the number of columns within the compositehspan
- the horizontal span the composite should take up on the parentfill
- the style for how this composite should fill into its parent
Can be one of GridData.FILL_HORIZONAL
,
GridData.FILL_BOTH
or
GridData.FILL_VERTICAL
marginwidth
- the width of the margin to place around the composite (default
is 5, specified by GridLayout)marginheight
- the height of the margin to place around the composite
(default is 5, specified by GridLayout)
public static org.eclipse.swt.widgets.Button createCheckButton(org.eclipse.swt.widgets.Composite parent, java.lang.String label, org.eclipse.swt.graphics.Image image, boolean checked, int hspan)
parent
- the parent to add the button tolabel
- the label for the buttonimage
- the image for the buttonchecked
- the initial checked state of the buttonhspan
- the horizontal span to take up in the parent composite
public static org.eclipse.swt.widgets.Label createLabel(org.eclipse.swt.widgets.Composite parent, java.lang.String text, int hspan)
parent
- the parent composite to add this label widget totext
- the text for the labelhspan
- the horizontal span to take up in the parent composite
public static org.eclipse.swt.widgets.Button createRadioButton(org.eclipse.swt.widgets.Composite parent, java.lang.String label, int hspan)
parent
- parent controllabel
- button label or null
hspan
- the number of columns to span in the parent composite
public static org.eclipse.swt.widgets.Group createGroup(org.eclipse.swt.widgets.Composite parent, java.lang.String text, int columns, int hspan, int fill)
parent
- the parent composite to add this group totext
- the text for the heading of the groupcolumns
- the number of columns within the grouphspan
- the horizontal span the group should take up on the parentfill
- the style for how this composite should fill into its parent
Can be one of GridData.FILL_HORIZONAL
,
GridData.FILL_BOTH
or
GridData.FILL_VERTICAL
public static void setButtonDimensionHint(org.eclipse.swt.widgets.Button button)
GridData
.
the
- button for which to set the dimension hintpublic static int getButtonWidthHint(org.eclipse.swt.widgets.Button button)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |