本文整理汇总了Java中org.eclipse.ui.forms.widgets.TableWrapData.TOP属性的典型用法代码示例。如果您正苦于以下问题:Java TableWrapData.TOP属性的具体用法?Java TableWrapData.TOP怎么用?Java TableWrapData.TOP使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.ui.forms.widgets.TableWrapData
的用法示例。
在下文中一共展示了TableWrapData.TOP属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createClient
/**
* @see nexcore.tool.uml.ui.core.editor.section.AbstractSection#createClient(org.eclipse.ui.forms.widgets.Section,
* org.eclipse.ui.forms.widgets.FormToolkit)
*/
@Override
protected void createClient(Section section, FormToolkit toolkit) {
section.setText(UMLMessage.LABEL_DOCUMENT_INFORMATION);
section.setDescription(UMLMessage.MESSAGE_DOCUMENT_OVERVIEW);
TableWrapData td = new TableWrapData(TableWrapData.FILL, TableWrapData.TOP);
td.grabHorizontal = true;
Composite client = toolkit.createComposite(section);
client.setLayout(new GridLayout(1, false));
createTextControl(toolkit, client);
initializeSection();
section.setClient(client);
}
示例2: createClient
/**
* @see nexcore.tool.uml.ui.core.editor.section.AbstractSection#createClient(org.eclipse.ui.forms.widgets.Section,
* org.eclipse.ui.forms.widgets.FormToolkit)
*/
@Override
protected void createClient(Section section, FormToolkit toolkit) {
section.setText(UMLMessage.LABEL_MODEL_LIBRARY);
section.setDescription(UMLMessage.MESSAGE_MODEL_LIBRARY_OVERVIEW);
TableWrapData td = new TableWrapData(TableWrapData.FILL, TableWrapData.TOP);
td.grabHorizontal = true;
Composite client = toolkit.createComposite(section);
FillLayout layout = new FillLayout(SWT.VERTICAL);
layout.marginWidth = toolkit.getBorderStyle() != SWT.NULL ? 0 : 2;
client.setLayout(layout);
Composite composite = toolkit.createComposite(client);
GridLayout compositeLayout = new GridLayout();
compositeLayout.numColumns = 2;
composite.setLayout(compositeLayout);
initializeSection();
createLibraryControl(toolkit, composite);
section.setClient(client);
}
示例3: initialize
@Override
public void initialize(IManagedForm mform) {
super.initialize(mform);
FormToolkit toolkit = mform.getToolkit();
ScrolledForm sform = mform.getForm();
titleComposite = toolkit.createComposite(sform.getBody());
titleComposite.setLayout(new GridLayout(getNumTitleComponents(), false));
titleComposite.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
populateTitleComposite(toolkit, sform, titleComposite);
Composite separator = toolkit.createCompositeSeparator(sform.getBody());
TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP);
data.maxHeight = 2;
separator.setLayoutData(data);
}
示例4: getFillTableWrapData
/**
* Ein TableWrapDAta-Objekt erzeugen, das den horizontalen und/oder vertikalen Freiraum
* ausfüllt.
*
* @param horizontal
* true, wenn horizontal gefüllt werden soll
* @param vertical
* true, wenn vertikal gefüllt werden soll.
* @return ein neu erzeugtes, direkt verwendbares GridData-Objekt
*/
public static TableWrapData getFillTableWrapData(final int hSpan, final boolean hFill,
final int vSpan, final boolean vFill){
TableWrapData layoutData = new TableWrapData(TableWrapData.LEFT, TableWrapData.TOP);
if (hFill) {
layoutData.grabHorizontal = true;
layoutData.align = TableWrapData.FILL;
}
if (vFill) {
layoutData.grabVertical = true;
layoutData.valign = TableWrapData.FILL;
}
layoutData.colspan = (hSpan < 1 ? 1 : hSpan);
layoutData.rowspan = (vSpan < 1 ? 1 : vSpan);
return layoutData;
}
示例5: createClient
/**
* @see nexcore.tool.uml.ui.core.editor.section.AbstractSection#createClient(org.eclipse.ui.forms.widgets.Section,
* org.eclipse.ui.forms.widgets.FormToolkit)
*/
@Override
protected void createClient(Section section, FormToolkit toolkit) {
section.setText(UMLMessage.LABEL_GENERAL_INFORMATION);
section.setDescription(UMLMessage.MESSAGE_OVERVIEW);
TableWrapData td = new TableWrapData(TableWrapData.FILL, TableWrapData.TOP);
td.grabHorizontal = true;
Composite client = toolkit.createComposite(section);
FillLayout layout = new FillLayout(SWT.VERTICAL);
layout.marginWidth = toolkit.getBorderStyle() != SWT.NULL ? 0 : 2;
client.setLayout(layout);
Composite composite = toolkit.createComposite(client);
GridLayout compositeLayout = new GridLayout();
compositeLayout.numColumns = 3;
composite.setLayout(compositeLayout);
createModelNameControl(toolkit, composite);
createModelLocationControl(toolkit, composite);
createModelSizeControl(toolkit, composite);
createModelLastModifiedDateControl(toolkit, composite);
initializeSection();
section.setClient(client);
}
示例6: createHeaders
public static Composite createHeaders(AutomationBlock automationBlock, IDetailsPage page, FormToolkit toolkit,
Composite parent, String sectionText, String sectionDescription) {
TableWrapLayout twlayout = new TableWrapLayout();
twlayout.topMargin = 5;
twlayout.leftMargin = 5;
twlayout.rightMargin = 2;
twlayout.bottomMargin = 2;
parent.setLayout(twlayout);
Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
TableWrapData td = new TableWrapData(TableWrapData.FILL, TableWrapData.TOP);
td.grabHorizontal = true;
section.setLayoutData(td);
section.marginWidth = 10;
section.setText(sectionText);
section.setDescription(sectionDescription);
automationBlock.addPageSection(page, section);
Composite client = toolkit.createComposite(section);
GridLayout layout = new GridLayout();
layout.numColumns = 2;
layout.marginWidth = 5;
layout.marginHeight = 10;
client.setLayout(layout);
client.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
toolkit.paintBordersFor(client);
section.setClient(client);
return client;
}
示例7: createContents
@Override
public void createContents(Composite parent) {
TableWrapLayout layout = new TableWrapLayout();
layout.topMargin = 5;
layout.leftMargin = 5;
layout.rightMargin = 2;
layout.bottomMargin = 2;
parent.setLayout(layout);
FormToolkit tk = mform.getToolkit();
Section s1 = tk.createSection(parent, Section.NO_TITLE);
// s1.marginWidth = 10;
TableWrapData td = new TableWrapData(TableWrapData.FILL, TableWrapData.TOP);
td.grabHorizontal = true;
s1.setLayoutData(td);
Composite client = tk.createComposite(s1);
GridLayout gl = new GridLayout();
client.setLayout(gl);
colorLabel = tk.createLabel(client, " yy ", SWT.BORDER);
colorLabel.setBackground(selectedColor);
Composite rgbScales = tk.createComposite(client);
GridData gd = new GridData();
rgbScales.setLayoutData(gd);
gl = new GridLayout(3, false);
rgbScales.setLayout(gl);
tk.createLabel(rgbScales, "Red");
redScale = new Scale(rgbScales, SWT.NONE);
redScale.setMinimum(0);
redScale.setMaximum(255);
redScale.setIncrement(1);
redScale.addListener(SWT.Selection, evt -> {
redText.setText("" + redScale.getSelection());
updateSelectedColor();
});
redText = tk.createText(rgbScales, " ", SWT.RIGHT);
redText.setEnabled(false);
gd = new GridData();
gd.widthHint = 50;
redText.setLayoutData(gd);
tk.createLabel(rgbScales, "Green");
greenScale = new Scale(rgbScales, SWT.NONE);
greenScale.setMinimum(0);
greenScale.setMaximum(255);
greenScale.setIncrement(1);
greenScale.addListener(SWT.Selection, evt -> {
greenText.setText("" + greenScale.getSelection());
updateSelectedColor();
});
greenText = tk.createText(rgbScales, " ", SWT.RIGHT);
greenText.setEnabled(false);
gd = new GridData();
gd.widthHint = 50;
greenText.setLayoutData(gd);
tk.createLabel(rgbScales, "Blue");
blueScale = new Scale(rgbScales, SWT.NONE);
blueScale.setMinimum(0);
blueScale.setMaximum(255);
blueScale.setIncrement(1);
blueScale.addListener(SWT.Selection, evt -> {
blueText.setText("" + blueScale.getSelection());
updateSelectedColor();
});
blueText = tk.createText(rgbScales, " ", SWT.RIGHT);
blueText.setEnabled(false);
gd = new GridData();
gd.widthHint = 50;
blueText.setLayoutData(gd);
tk.paintBordersFor(s1);
s1.setClient(client);
}
示例8: addCompositeSeparator
private void addCompositeSeparator(Composite parent) {
Composite separator = toolkit.createCompositeSeparator(parent);
TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP);
data.maxHeight = 2;
separator.setLayoutData(data);
}
示例9: createContents
@Override
public void createContents(Composite parent) {
TableWrapLayout layout = new TableWrapLayout();
layout.topMargin = 5;
layout.leftMargin = 5;
layout.rightMargin = 2;
layout.bottomMargin = 2;
parent.setLayout(layout);
FormToolkit toolkit = mform.getToolkit();
section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
section.marginWidth = 10;
section.setText("Details"); //$NON-NLS-1$
section.setDescription("Description"); //$NON-NLS-1$
TableWrapData td = new TableWrapData(TableWrapData.FILL, TableWrapData.TOP);
td.grabHorizontal = true;
section.setLayoutData(td);
Composite client = toolkit.createComposite(section);
GridLayout glayout = new GridLayout();
glayout.marginWidth = glayout.marginHeight = 0;
glayout.numColumns = 2;
client.setLayout(glayout);
createSpacer(toolkit, client, 2);
List<Field> fields = new ArrayList<Field>();
getAllFields(fields, inputClass);
Comparator<Field> comparator = new Comparator<Field>() {
public int compare(Field c1, Field c2) {
return c1.getName().compareTo(c2.getName());
}
};
Collections.sort(fields, comparator);
for (final Field field : fields) {
if (isSupported(field)) {
addField(toolkit, client, field);
}
}
createSpacer(toolkit, client, 2);
toolkit.paintBordersFor(section);
section.setClient(client);
}