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


Java List.setLayoutData方法代碼示例

本文整理匯總了Java中org.eclipse.swt.widgets.List.setLayoutData方法的典型用法代碼示例。如果您正苦於以下問題:Java List.setLayoutData方法的具體用法?Java List.setLayoutData怎麽用?Java List.setLayoutData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.widgets.List的用法示例。


在下文中一共展示了List.setLayoutData方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createCustomArea

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
/**
 * Creates and returns the contents of an area of the dialog which appears
 * below the message and above the button bar.
 * 
 * This implementation creates two labels and two textfields.
 * 
 * @param parent parent composite to contain the custom area
 * @return the custom area control, or <code>null</code>
 */
protected Control createCustomArea(Composite parent) {
    
    Composite composite = new Composite(parent, SWT.NULL);
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    composite.setLayout(new GridLayout());
    
    skVarList = new List(composite, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
    skVarList.setLayoutData(new GridData(GridData.FILL_BOTH));
    skVarList.setItems(items);
    skVarList.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent event) {
            selections = skVarList.getSelectionIndices();
        }});
    
    return composite;
}
 
開發者ID:eclipse,項目名稱:texlipse,代碼行數:26,代碼來源:StyleListFieldEditor.java

示例2: createDialogArea

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
@Override
protected Control createDialogArea(Composite parent) {
	Composite area = (Composite) super.createDialogArea(parent);
	Composite container = new Composite(area, SWT.NONE);
	container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	GridLayout layout = new GridLayout(2, false);
	container.setLayout(layout);
	Label lbtOcciServerUrl = new Label(container, SWT.NONE);
	lbtOcciServerUrl.setText(Messages.OcciActionDialog_Label);
	final List listOcciActions = new List (container, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL);
	listOcciActions.addSelectionListener(
			  new SelectionAdapter() {
				  @Override
				  public void widgetSelected(SelectionEvent e) {
					  selectedAction = listOcciActions.getSelection()[0];
				  }					  
			  }
			);
	listOcciActions.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	for(Action action : actions) {
		listOcciActions.add(action.getScheme() +  action.getTerm());
	}
	return area;
}
 
開發者ID:occiware,項目名稱:OCCI-Studio,代碼行數:25,代碼來源:OcciActionDialog.java

示例3: createBottomSelectedLocalesComposite

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
/**
 * Creates the bottom part of this wizard where selected locales 
 * are stored.
 * @param parent parent container
 */
private void createBottomSelectedLocalesComposite(Composite parent) {

    // Selected locales Group
    Group selectedGroup = new Group(parent, SWT.NULL);
    GridLayout layout = new GridLayout();
    layout = new GridLayout();
    layout.numColumns = 1;
    selectedGroup.setLayout(layout);
    GridData gd = new GridData(GridData.FILL_BOTH);
    selectedGroup.setLayoutData(gd);
    selectedGroup.setText(MessagesEditorPlugin.getString(
            "editor.wiz.selected")); //$NON-NLS-1$
    bundleLocalesList = 
            new List(selectedGroup, SWT.READ_ONLY | SWT.MULTI | SWT.BORDER);
    gd = new GridData(GridData.FILL_BOTH);
    bundleLocalesList.setLayoutData(gd);
    bundleLocalesList.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent event) {
            removeButton.setEnabled(
                    bundleLocalesList.getSelectionIndices().length != 0);
            setAddButtonState();
        }
    });
}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:30,代碼來源:ResourceBundleNewWizardPage.java

示例4: initialize

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
protected void initialize() {
	Label label0 = new Label (this, SWT.NONE);
	label0.setText ("Please choose type(s) which are returned by transaction response:");
	
	list = new List(this, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
	GridData data = new GridData ();
	data.horizontalAlignment = GridData.FILL;
	data.verticalAlignment = GridData.FILL;
	data.grabExcessHorizontalSpace = true;
	data.grabExcessVerticalSpace = true;
	data.heightHint = 200;
	list.setLayoutData (data);

	GridLayout gridLayout = new GridLayout();
	setLayout(gridLayout);
	setSize(new Point(408, 251));
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:18,代碼來源:TransactionXSDTypesDialogComposite.java

示例5: createCustomArea

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
/**
 * Creates and returns the contents of an area of the dialog which appears
 * below the message and above the button bar.
 * 
 * This implementation creates two labels and two textfields.
 * 
 * @param parent parent composite to contain the custom area
 * @return the custom area control, or <code>null</code>
 */
protected Control createCustomArea(Composite parent) {

    Composite composite = new Composite(parent, SWT.NULL);
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    composite.setLayout(new GridLayout());
    
    envVarList = new List(composite, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
    envVarList.setLayoutData(new GridData(GridData.FILL_BOTH));
    envVarList.setItems(items);
    envVarList.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent event) {
            selections = envVarList.getSelectionIndices();
        }});
    
    return composite;
}
 
開發者ID:eclipse,項目名稱:texlipse,代碼行數:26,代碼來源:KeyValueListFieldEditor.java

示例6: createTemplateControl

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
/**
   * Creates a list element containing available templates (system and user)
   * and a text area next to it for showing description about the selected template
   * 
   * @param composite the parent container
   */
  private void createTemplateControl(Composite composite) {
      // add list for templates
      templateList = new List(composite, SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
templateList.setItems(ProjectTemplateManager.loadTemplateNames());
      templateList.setLayoutData(new GridData(GridData.FILL_VERTICAL));
      templateList.setToolTipText(TexlipsePlugin.getResourceString("projectWizardTemplateTooltip"));
      templateList.addSelectionListener(new SelectionAdapter() {
          public void widgetSelected(SelectionEvent e) {
          	attributes.setTemplate(templateList.getSelection()[0]);
          	updateEntries();
          }});
      
      templateList.setSelection(0);
      // this has to be done, because setSelection() doesn't generate an event
      attributes.setTemplate(templateList.getItem(0));

      
      // add TextField for the selected template's description
      descriptionField = new Text(composite, SWT.MULTI | SWT.BORDER);
      descriptionField.setToolTipText(TexlipsePlugin.getResourceString("projectWizardTemplateDescriptionTooltip"));
      descriptionField.setLayoutData(new GridData(GridData.FILL_BOTH));
      descriptionField.setEditable(false);
  }
 
開發者ID:eclipse,項目名稱:texlipse,代碼行數:30,代碼來源:TexlipseProjectCreationWizardPage.java

示例7: createBottomSelectedLocalesComposite

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
/**
 * Creates the bottom part of this wizard where selected locales are stored.
 * 
 * @param parent
 *            parent container
 */
private void createBottomSelectedLocalesComposite(Composite parent) {

    // Selected locales Group
    Group selectedGroup = new Group(parent, SWT.NULL);
    GridLayout layout = new GridLayout();
    layout = new GridLayout();
    layout.numColumns = 1;
    selectedGroup.setLayout(layout);
    GridData gd = new GridData(GridData.FILL_BOTH);
    selectedGroup.setLayoutData(gd);
    selectedGroup.setText(Messages.editor_wiz_selected);
    bundleLocalesList = new List(selectedGroup, SWT.READ_ONLY | SWT.MULTI  | SWT.BORDER);
    gd = new GridData(GridData.FILL_BOTH);
    bundleLocalesList.setLayoutData(gd);
    bundleLocalesList.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent event) {
            removeButton.setEnabled(bundleLocalesList.getSelectionIndices().length != 0);
            setAddButtonState();
        }
    });
    // add a single Locale so that the bundleLocalesList isn't empty on
    // startup
    bundleLocalesList.add(DEFAULT_LOCALE);
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:31,代碼來源:ResourceBundleNewWizardPage.java

示例8: CategoriesComposite

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
/**
 * Create the composite.
 * 
 * @param parent
 * @param style
 */
public CategoriesComposite(Composite parent, int style) {
	super(parent, style);
	setLayout(new GridLayout(1, false));

	categoriesUpperComposite = new CategoriesUpperComposite(this, SWT.BORDER);
	categoriesUpperComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	classNamelist = new List(this, SWT.BORDER | SWT.V_SCROLL);
	classNamelist.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

	loadClassesFromRepo();
	addListnersToClassNameList(classNamelist);
	addSelectionListnerToClassNameList();
	categoriesUpperComposite.setClassNameList(classNamelist);
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:22,代碼來源:CategoriesComposite.java

示例9: initCustomFilterList

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
/**
 * 初始化自定義過濾器列表
 * @param comp
 *            父容器
 */
private void initCustomFilterList(Composite comp) {
	customFilterList = new List(comp, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
	GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
	gridData.widthHint = 110;
	gridData.heightHint = 250;
	customFilterList.setLayoutData(gridData);
	setListData(customFilterList, customFilters);
	customFilterList.addMouseListener(new MouseAdapter() {
		@Override
		public void mouseDoubleClick(MouseEvent e) {
			edit();
		}

	});
}
 
開發者ID:heartsome,項目名稱:translationstudio8,代碼行數:21,代碼來源:CustomFilterDialog.java

示例10: createDialogArea

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
/**
 * 
 * {@inheritDoc}
 * 
 * @see org.eclipse.jface.dialogs.TitleAreaDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
 */
@Override
protected Control createDialogArea(Composite parent) {
	setMessage("In order to execute your requested operation, you have to select a server.");
	setTitle("Please select a Server");
	final Composite area = (Composite) super.createDialogArea(parent);
	final Composite container = new Composite(area, SWT.NONE);
	container.setLayout(new GridLayout(1, false));
	container.setLayoutData(new GridData(GridData.FILL_BOTH));

	listViewer = new ListViewer(container, SWT.BORDER | SWT.V_SCROLL);
	final List list = listViewer.getList();
	list.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	listViewer.setContentProvider(ArrayContentProvider.getInstance());
	labelProvider = new ServerInfoLabelProvider();
	listViewer.setLabelProvider(labelProvider);
	listViewer.setInput(servers);
	if (servers.size() == 1) {
		listViewer.setSelection(new StructuredSelection(servers.get(0)));
	}
	return area;
}
 
開發者ID:edgarmueller,項目名稱:emfstore-rest,代碼行數:28,代碼來源:ServerInfoSelectionDialog.java

示例11: createDialogArea

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
/**
 * @see Dialog#createDialogArea(Composite)
 */
protected Control createDialogArea(Composite parent) {
	Composite result = new Composite(parent, SWT.NONE);
	result.setLayout(new GridLayout());
	result.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	macList = new List(result, SWT.BORDER | SWT.MULTI );
	macList.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	if (macroArray != null){
		for (int i=0; i< macroArray.size(); i++){
			macList.add(getLabel(macroArray.get(i)));
		}
		macList.pack(true);
		macList.computeSize(SWT.DEFAULT, SWT.DEFAULT);
		macList.setVisible(true);
	} 
	result.setVisible(true);
	macList.addDisposeListener(new DisposeListener() {
		public void widgetDisposed(DisposeEvent e) {
			macList = null;
		}
	});
	return result;
}
 
開發者ID:MulgaSoft,項目名稱:e4macs,代碼行數:26,代碼來源:KbdMacroListEditor.java

示例12: createDialogArea

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
@Override
protected Control createDialogArea(Composite parent) {
	Composite container = (Composite) super.createDialogArea(parent);
	
	Label label = new Label(container, SWT.NONE);
	label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
	label.setText(message);
	
	list = new List(container, SWT.BORDER);
	GridData gd_list = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
	list.setLayoutData(gd_list);
			
	for(IEditorInput ei : editorInputs){
		list.add(ei.getName());
	}
	
	return container;
}
 
開發者ID:CloudScale-Project,項目名稱:Environment,代碼行數:19,代碼來源:ResourceSelectionDialog.java

示例13: createDialogArea

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
/**
 * @see Dialog#createDialogArea(Composite)
 */
protected Control createDialogArea(Composite parent) {
	Composite result = new Composite(parent, SWT.NONE);
	result.setLayout(new GridLayout());
	result.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	catList = new List(result, SWT.BORDER | SWT.MULTI );
	catList.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	if (categoryArray != null){
		for (int i=0; i< categoryArray.size(); i++){
			catList.add(getLabel(categoryArray.get(i)));
		}
		catList.pack(true);
		catList.computeSize(SWT.DEFAULT, SWT.DEFAULT);
		catList.setVisible(true);
	} 
	result.setVisible(true);
	catList.addDisposeListener(new DisposeListener() {
		public void widgetDisposed(DisposeEvent e) {
			catList = null;
		}
	});
	return result;
}
 
開發者ID:MulgaSoft,項目名稱:e4macs,代碼行數:26,代碼來源:CommandCategoryEditor.java

示例14: buildEmbeddedImageList

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
private void buildEmbeddedImageList( )
{
	embeddedImageList = new List( inputArea, SWT.NONE
			| SWT.SINGLE
			| SWT.BORDER
			| SWT.V_SCROLL
			| SWT.H_SCROLL );
	embeddedImageList.setLayoutData( new GridData( GridData.FILL_BOTH ) );
	embeddedImageList.addSelectionListener( new SelectionAdapter( ) {

		public void widgetSelected( SelectionEvent event )
		{
			preview( );
			modifyDialogContent( );
			updateButtons( );
		}
	} );

	initList( );
}
 
開發者ID:eclipse,項目名稱:birt,代碼行數:21,代碼來源:ImageBuilder.java

示例15: initialize

import org.eclipse.swt.widgets.List; //導入方法依賴的package包/類
/**
 * This method initializes this
 * 
 */
private void initialize() {
	ScreenClassTrigger trigger = (parent.getTrigger() instanceof ScreenClassTrigger) ? (ScreenClassTrigger) parent
			.getTrigger() : null;

	scrClass_label = new Label(this, SWT.NONE);
	scrClass_label.setText("Screen classes");
	scrClass_list = new List(this, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);

	java.util.List<HtmlScreenClass> scList = getScreenClassList();

	java.util.List<String> items = new ArrayList<String>();

	for (ScreenClass sc : scList) {
		String scName = sc.getName();
		scrClass_list.add(scName);
		if (trigger != null) {
			if (trigger.getScreenClasses().contains(scName)) {
				items.add(scName);
			}
		}
	}

	scrClass_list.setSelection(items.toArray(new String[items.size()]));
	GridData gridData2 = new GridData();
	gridData2.horizontalAlignment = GridData.FILL;
	gridData2.verticalAlignment = GridData.FILL;
	gridData2.grabExcessHorizontalSpace = true;
	scrClass_list.setLayoutData(gridData2);
	scrClass_list.setSize(400, 250);
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:35,代碼來源:HttpTriggerScreenClassEditorComposite.java


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