當前位置: 首頁>>代碼示例>>Java>>正文


Java RowLayout類代碼示例

本文整理匯總了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;
}
 
開發者ID:bsteker,項目名稱:bdf2,代碼行數:26,代碼來源:UpdateDialog.java

示例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);
}
 
開發者ID:sopeco,項目名稱:DynamicSpotter,代碼行數:20,代碼來源:ExtensionsGroupViewer.java

示例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 ();
        }
    } );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:22,代碼來源:ChartViewerPane.java

示例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 () );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:22,代碼來源:FilterAdvancedComposite.java

示例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 );
        }
    } );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:25,代碼來源:LinkComposite.java

示例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));
}
 
開發者ID:AppleCommander,項目名稱:AppleCommander,代碼行數:43,代碼來源:DiskInfoTab.java

示例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);
}
 
開發者ID:32kda,項目名稱:com.onpositive.prefeditor,代碼行數:18,代碼來源:NewPlatformPreferenceDialog.java

示例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);
      
  }
 
開發者ID:subclipse,項目名稱:subclipse,代碼行數:21,代碼來源:CommitSetDialog.java

示例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);
}
 
開發者ID:GoogleCloudPlatform,項目名稱:google-cloud-eclipse,代碼行數:21,代碼來源:CloudLibrariesPage.java

示例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);
}
 
開發者ID:ffmmjj,項目名稱:uefi_edk2_wizards_plugin,代碼行數:21,代碼來源:NewEdk2ModuleProjectPage.java

示例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();
	}
}
 
開發者ID:kelvemcom,項目名稱:codetools2,代碼行數:27,代碼來源:FlowerPanel.java

示例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);
}
 
開發者ID:google,項目名稱:depan,代碼行數:23,代碼來源:RelationCountFilterEditorControl.java

示例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();
    }
  });
}
 
開發者ID:google,項目名稱:depan,代碼行數:18,代碼來源:GenericResourceLoadControl.java

示例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();
    }
  });

}
 
開發者ID:google,項目名稱:depan,代碼行數:19,代碼來源:GenericResourceSaveControl.java

示例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());
}
 
開發者ID:anb0s,項目名稱:eclox,代碼行數:21,代碼來源:BooleanEditor.java


注:本文中的org.eclipse.swt.layout.RowLayout類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。