本文整理匯總了Java中org.eclipse.swt.layout.RowLayout類的典型用法代碼示例。如果您正苦於以下問題:Java RowLayout類的具體用法?Java RowLayout怎麽用?Java RowLayout使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
RowLayout類屬於org.eclipse.swt.layout包,在下文中一共展示了RowLayout類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createDialogArea
import org.eclipse.swt.layout.RowLayout; //導入依賴的package包/類
protected Control createDialogArea(Composite parent) {
Composite area = (Composite) super.createDialogArea(parent);
Composite container = new Composite(area, SWT.NONE);
RowLayout layout = new RowLayout(SWT.HORIZONTAL);
container.setLayout(layout);
// container.setLayoutData(new GridData(GridData.FILL_BOTH));
// TitleArea中的Title
setTitle("屬性文件更新");
// TitleArea中的Message
setMessage("輸入正確的url地址,以更新文件。\n可提示的屬性數量會根據當前項目存在的jar包,對已有屬性增加或者刪除!");
Label label = new Label(container, SWT.NONE);
label.setText("項目URL: ");
combo = new Combo(container, SWT.DROP_DOWN);
String[] items = new String[getUrlMap().size()];
getUrlMap().values().toArray(items);
combo.setItems(items);
String url = getPreferedUrl(projectName);
combo.setText(url);
combo.setLayoutData(new RowData(400, 30));
return area;
}
示例2: createExtensionsGroup
import org.eclipse.swt.layout.RowLayout; //導入依賴的package包/類
private void createExtensionsGroup(Composite container, boolean editSupport) {
Group grpConfiguredComponents = new Group(container, SWT.NONE);
grpConfiguredComponents.setText("configured components");
grpConfiguredComponents.setLayout(WidgetUtils.createGridLayout(2));
extensionsViewer = createViewerControl(grpConfiguredComponents, editSupport);
viewerControl = extensionsViewer.getControl();
Composite buttonComp = new Composite(grpConfiguredComponents, SWT.NONE);
buttonComp.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false));
RowLayout buttonCompLayout = new RowLayout(SWT.VERTICAL);
buttonCompLayout.fill = true;
buttonCompLayout.center = true;
buttonCompLayout.pack = false;
buttonCompLayout.spacing = WidgetUtils.DEFAULT_VERTICAL_SPACING;
buttonComp.setLayout(buttonCompLayout);
createButtons(buttonComp, editSupport);
}
示例3: createControl
import org.eclipse.swt.layout.RowLayout; //導入依賴的package包/類
public void createControl ( final Composite parent )
{
this.wrapper = new Composite ( parent, SWT.NONE );
this.wrapper.setLayout ( GridLayoutFactory.slimStack () );
final Composite extensionSpace = new Composite ( this.wrapper, SWT.NONE );
extensionSpace.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, false ) );
extensionSpace.setLayout ( new RowLayout ( SWT.HORIZONTAL ) );
this.chartArea = new ChartArea ( this.wrapper, SWT.NONE );
this.chartArea.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, true ) );
this.viewer = new ChartViewer ( this.chartArea.getDisplay (), this.chartArea.getChartRenderer (), this.configuration, new CompositeExtensionSpace ( extensionSpace ), null );
parent.addDisposeListener ( new DisposeListener () {
@Override
public void widgetDisposed ( final DisposeEvent e )
{
handleDispose ();
}
} );
}
示例4: AssertionComposite
import org.eclipse.swt.layout.RowLayout; //導入依賴的package包/類
public AssertionComposite ( final OrCondition orCondition, final Composite parent, final String attribute, final Type type )
{
// final fields
super ( parent, SWT.NONE );
this.orCondition = orCondition;
// widgets
this.notCheck = createNotCheck ();
this.attributeText = createAttributeText ( attribute );
createFieldTypeLabel ( type );
this.assertionCombo = createAssertionCombo ();
this.valueText = createValueText ();
createRemoveButton ();
// layout
final RowLayout layout = new RowLayout ();
layout.center = true;
this.setLayout ( layout );
parent.notifyListeners ( SWT.Resize, new org.eclipse.swt.widgets.Event () );
}
示例5: LinkComposite
import org.eclipse.swt.layout.RowLayout; //導入依賴的package包/類
public LinkComposite ( final Composite parent, final int style, final String format )
{
super ( parent, style );
final RowLayout layout = new RowLayout ();
layout.wrap = false;
layout.center = true;
layout.spacing = 7;
layout.pack = true;
setLayout ( layout );
this.textLabel = new Link ( this, SWT.NONE );
this.textLabel.setText ( format );
this.textLabel.addSelectionListener ( new SelectionAdapter () {
@Override
public void widgetSelected ( final SelectionEvent event )
{
logger.info ( "LinkComponent selected: {}", event.text ); //$NON-NLS-1$
Program.launch ( event.text );
}
} );
}
示例6: DiskInfoTab
import org.eclipse.swt.layout.RowLayout; //導入依賴的package包/類
/**
* Create the DISK INFO tab.
*/
public DiskInfoTab(CTabFolder tabFolder, FormattedDisk[] disks) {
this.formattedDisks = disks;
CTabItem ctabitem = new CTabItem(tabFolder, SWT.NULL);
ctabitem.setText(textBundle.get("DiskInfoTab.Title")); //$NON-NLS-1$
tabFolder.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
getInfoTable().removeAll();
buildDiskInfoTable(getFormattedDisk(0)); // FIXME!
}
});
ScrolledComposite scrolledComposite = new ScrolledComposite(
tabFolder, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
scrolledComposite.setExpandHorizontal(true);
scrolledComposite.setExpandVertical(true);
ctabitem.setControl(scrolledComposite);
composite = new Composite(scrolledComposite, SWT.NONE);
createDiskInfoTable();
if (disks.length > 1) {
RowLayout layout = new RowLayout(SWT.VERTICAL);
layout.wrap = false;
composite.setLayout(layout);
for (int i=0; i<disks.length; i++) {
Label label = new Label(composite, SWT.NULL);
label.setText(disks[i].getDiskName());
buildDiskInfoTable(disks[i]);
}
} else {
composite.setLayout(new FillLayout());
buildDiskInfoTable(disks[0]);
}
composite.pack();
scrolledComposite.setContent(composite);
scrolledComposite.setMinSize(
composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
示例7: createParentControls
import org.eclipse.swt.layout.RowLayout; //導入依賴的package包/類
@Override
protected void createParentControls(Composite composite) {
Label label = new Label(composite, SWT.WRAP);
label.setText("Preference scope:");
Composite group = new Composite(composite, SWT.NONE);
group.setLayout(new RowLayout());
for (int i = 0; i < SCOPE_LABELS.length; i++) {
Button btn = new Button(group, SWT.RADIO);
btn.setText(SCOPE_LABELS[i]);
btn.setData(SCOPE_VALUES[i]);
if (SCOPE_VALUES[i].equals(scope) || (scope.isEmpty() && i == 0)) {
btn.setSelection(true);
}
scopeRadios[i] = btn;
}
super.createParentControls(composite);
}
示例8: createOptionsArea
import org.eclipse.swt.layout.RowLayout; //導入依賴的package包/類
private void createOptionsArea(Composite composite) {
Composite radioArea = new Composite(composite, SWT.NONE);
RowLayout radioAreaLayout = new RowLayout(SWT.VERTICAL);
radioAreaLayout.marginLeft = 0;
radioAreaLayout.marginRight = 0;
radioAreaLayout.marginTop = 0;
radioAreaLayout.marginBottom = 0;
radioArea.setLayout(radioAreaLayout);
useTitleButton = createRadioButton(radioArea, Policy.bind("CommitSetDialog_2"));
enterCommentButton = createRadioButton(radioArea, Policy.bind("CommitSetDialog_3"));
SelectionAdapter listener = new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
updateEnablements();
}
};
useTitleButton.addSelectionListener(listener);
enterCommentButton.addSelectionListener(listener);
}
示例9: createControl
import org.eclipse.swt.layout.RowLayout; //導入依賴的package包/類
@Override
public void createControl(Composite parent) {
Preconditions.checkNotNull(libraryGroups, "Library groups must be set"); //$NON-NLS-1$
Composite composite = new Group(parent, SWT.NONE);
IProjectFacetVersion facetVersion =
AppEngineStandardFacet.getProjectFacetVersion(project.getProject());
boolean java7AppEngineStandardProject = AppEngineStandardFacet.JRE7.equals(facetVersion);
// create the library selector libraryGroups
for (Entry<String, String> group : libraryGroups.entrySet()) {
LibrarySelectorGroup librariesSelector =
new LibrarySelectorGroup(composite, group.getKey(), group.getValue(),
java7AppEngineStandardProject);
librariesSelectors.add(librariesSelector);
}
setSelectedLibraries(initialSelection);
composite.setLayout(new RowLayout(SWT.HORIZONTAL));
setControl(composite);
}
示例10: createModuleTypeRadioGroup
import org.eclipse.swt.layout.RowLayout; //導入依賴的package包/類
private void createModuleTypeRadioGroup(Composite container) {
moduleTypeGroup = new Group(container, SWT.SHADOW_IN);
moduleTypeGroup.setText("Module type");
moduleTypeGroup.setLayout(new RowLayout(SWT.HORIZONTAL));
UefiApplicationRadioBtn = new Button(moduleTypeGroup, SWT.RADIO);
UefiApplicationRadioBtn.setText("UEFI Application");
UefiStdLibApplicationRadioBtn = new Button(moduleTypeGroup, SWT.RADIO);
UefiStdLibApplicationRadioBtn.setText("UEFI StdLib Application");
UefiDriverApplicationRadioBtn = new Button(moduleTypeGroup, SWT.RADIO);
UefiDriverApplicationRadioBtn.setText("UEFI Driver");
UefiLibraryRadioBtn = new Button(moduleTypeGroup, SWT.RADIO);
UefiLibraryRadioBtn.setText("UEFI Library");
UefiApplicationRadioBtn.setData(Edk2ModuleType.UEFI_APPLICATION);
UefiStdLibApplicationRadioBtn.setData(Edk2ModuleType.UEFI_STDLIB_APPLICATION);
UefiDriverApplicationRadioBtn.setData(Edk2ModuleType.UEFI_DRIVER);
UefiLibraryRadioBtn.setData(Edk2ModuleType.LIBRARY_CLASS_IMPLEMENTATION);
UefiApplicationRadioBtn.setSelection(true);
}
示例11: initGUI
import org.eclipse.swt.layout.RowLayout; //導入依賴的package包/類
private void initGUI() {
try {
RowLayout thisLayout = new RowLayout(org.eclipse.swt.SWT.HORIZONTAL);
thisLayout.pack = false;
thisLayout.justify = true;
thisLayout.fill = true;
this.setLayout(thisLayout);
jLabel1 = new CLabel(this, SWT.NONE);
jLabel1.setText("Flower:");
jLabel2 = new CLabel(this, SWT.NONE);
jLabel2.setText("(Family)");
flowerLabel = new CLabel(this, SWT.NONE);
flowerLabel.setText("$NAME$");
jLabel3 = new CLabel(this, SWT.NONE);
jLabel3.setText("Quantity:");
quantityTextField = new Text(this, SWT.NONE);
} catch (Exception e) {
e.printStackTrace();
}
}
示例12: RangeTool
import org.eclipse.swt.layout.RowLayout; //導入依賴的package包/類
/**
* Construct the {@code RangeTool} UI with the given set of options.
*
* @param parent containing window for range tool
* @param style basic presentation options
*/
public RangeTool(Composite parent, int style,
String label, RelationCount.RangeData setup) {
super(parent, style);
setLayout(new RowLayout());
Label rangeLabel = new Label(this, SWT.LEFT);
rangeLabel.setText(label);
rangeOp = createRangeOp(setup.option);
loLabel = new Label(this, SWT.LEFT);
loLimit = new Spinner(this, style);
hiLabel = new Label(this, SWT.LEFT);
hiLimit = new Spinner(this, style);
setLimits(setup);
}
示例13: GenericResourceLoadControl
import org.eclipse.swt.layout.RowLayout; //導入依賴的package包/類
public GenericResourceLoadControl(Composite parent, SaveLoadConfig<T> config) {
super(parent, SWT.NONE);
this.config = config;
setLayout(new RowLayout());
Button loadButton = new Button(this, SWT.PUSH);
loadButton.setText(config.getLoadLabel());
loadButton.setLayoutData(new RowData());
loadButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
handleLoad();
}
});
}
示例14: GenericResourceSaveControl
import org.eclipse.swt.layout.RowLayout; //導入依賴的package包/類
public GenericResourceSaveControl(Composite parent, SaveLoadConfig<T> config) {
super(parent, SWT.NONE);
this.config = config;
setLayout(new RowLayout());
Button saveButton = new Button(this, SWT.PUSH);
saveButton.setText(config.getSaveLabel());
saveButton.setLayoutData(new RowData());
saveButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
handleSave();
}
});
}
示例15: createContent
import org.eclipse.swt.layout.RowLayout; //導入依賴的package包/類
/**
* @see eclox.ui.editor.editors.IEditor#createContent(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
*/
public void createContent(Composite parent, FormToolkit formToolkit) {
// Initialize the parent control.
RowLayout layout = new RowLayout(SWT.VERTICAL);
layout.marginWidth = 0;
parent.setLayout(layout);
// Creates the buttons.
yesButton = formToolkit.createButton(parent, "Yes", SWT.RADIO);
noButton = formToolkit.createButton(parent, "No", SWT.RADIO);
defaultButton = formToolkit.createButton(parent, "Default", SWT.RADIO);
// Attaches a selection listener instance to each button.
yesButton.addSelectionListener(new MySelectionListener());
noButton.addSelectionListener(new MySelectionListener());
defaultButton.addSelectionListener(new MySelectionListener());
}