当前位置: 首页>>代码示例>>Java>>正文


Java SWT.RADIO属性代码示例

本文整理汇总了Java中org.eclipse.swt.SWT.RADIO属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.RADIO属性的具体用法?Java SWT.RADIO怎么用?Java SWT.RADIO使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.eclipse.swt.SWT的用法示例。


在下文中一共展示了SWT.RADIO属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createParentControls

@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,代码行数:17,代码来源:NewPlatformPreferenceDialog.java

示例2: createToolbarButton

private void createToolbarButton ()
{
    if ( this.button == null )
    {
        final int index = this.toolBarNavigator.calculateToolbarIndex ( this.descriptor );

        if ( index < 0 )
        {
            return;
        }

        this.button = new ToolItem ( this.toolbar, SWT.RADIO, index );
        this.button.setText ( this.descriptor.getName () );
        this.button.addSelectionListener ( new SelectionAdapter () {
            @Override
            public void widgetSelected ( final org.eclipse.swt.events.SelectionEvent e )
            {
                showView ( ToolBarNavigatorItem.this.descriptor.getId () );
            };
        } );
        // set current state
        this.button.setImage ( this.currentButtonImage );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:24,代码来源:ToolBarNavigatorItem.java

示例3: addRadioButton

protected void addRadioButton(Composite container) {
	Composite composite_1 = new Composite(container, SWT.NONE);
	composite_1.setLayout(new GridLayout(1, false));
	composite_1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	
	xmlRadioButton = new Button(composite_1, SWT.RADIO);
	xmlRadioButton.setText("XML File");
	xmlRadioButton.setEnabled(true);
	xmlRadioButton.setSelection(true);
	
	xsdRadioButton = new Button(composite_1, SWT.RADIO);
	xsdRadioButton.setText("XSD File");
	
	addSelectionListenerOnXMLRadioBtn();
	addSelectionListenerOnXSDRadioBtn();
	
	
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:18,代码来源:SourceSelectionPage.java

示例4: createGroup

/**
 * This method initializes group	
 *
 */
private void createGroup() {
	GridData gridData3 = new org.eclipse.swt.layout.GridData();
	gridData3.grabExcessHorizontalSpace = false;
	gridData3.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
	gridData3.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
	group = new Group(this, SWT.NONE);
	group.setLayoutData(gridData3);
	radioButton1 = new Button(group, SWT.RADIO);
	radioButton1.setBounds(new org.eclipse.swt.graphics.Rectangle(143,18,109,16));
	radioButton1.setText("Sister screen class");
	radioButton2 = new Button(group, SWT.RADIO);
	radioButton2.setBounds(new org.eclipse.swt.graphics.Rectangle(12,18,126,16));
	radioButton2.setText("Inherited screen class");
	radioButton2.setSelection(true);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:19,代码来源:LearnScreenClassWizardComposite2.java

示例5: attachRadioButtonToComposite

private void attachRadioButtonToComposite(Composite radioButtonsComposite) 
{
     expressionRadioButton=new Button(radioButtonsComposite, SWT.RADIO);
     if(OSValidator.isMac())
     {
	expressionRadioButton.setText(Messages.MAC_EXPRESSION_EDITIOR_LABEL);
  }
     else 
     {
    expressionRadioButton.setText(Messages.WINDOWS_EXPRESSION_EDITIOR_LABEL);
  }
     
     operationRadioButton = new Button(radioButtonsComposite, SWT.RADIO);
  operationRadioButton.setText(Messages.OPERATION_CALSS_LABEL);
  
  addSelectionListenerToExpressionRadioButton(expressionRadioButton);
  addSelectionListenerToOperationRadioButton(operationRadioButton);
  if(transformMapping.isExpression())
  {	  
  expressionRadioButton.setSelection(true);
  }
  else
  {	  
  operationRadioButton.setSelection(true);	  
  }
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:26,代码来源:OutputRecordCountWidget.java

示例6: createSaveJobPromtGroup

/**
 * @param selection
 */
private void createSaveJobPromtGroup(String selection) {
	HydroGroup hydroGroup = new HydroGroup(this, SWT.NONE);
	hydroGroup.setHydroGroupText(Messages.SAVE_JOBS_BEFORE_LAUNCHING_MESSAGE);
	hydroGroup.setLayout(new GridLayout(1, false));
	hydroGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
	hydroGroup.getHydroGroupClientArea().setLayout(new GridLayout(2, false));
	hydroGroup.getHydroGroupClientArea().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

	btnRadioButtonAlways = new Button(hydroGroup.getHydroGroupClientArea(), SWT.RADIO);
	btnRadioButtonAlways.setText(StringUtils.capitalize((MessageDialogWithToggle.ALWAYS)));

	btnRadioButtonPrompt = new Button(hydroGroup.getHydroGroupClientArea(), SWT.RADIO);
	btnRadioButtonPrompt.setText(StringUtils.capitalize(MessageDialogWithToggle.PROMPT));

	if (StringUtils.equals(selection, MessageDialogWithToggle.ALWAYS)) {
		btnRadioButtonAlways.setSelection(true);
	} else {
		btnRadioButtonPrompt.setSelection(true);
	}
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:23,代码来源:JobRunPreferenceComposite.java

示例7: attachWidget

@Override
public void attachWidget(Composite container) {
	defaultELTButton = new Button(container, SWT.RADIO);
	GridData gd_defaultELTButton = new GridData(SWT.FILL, SWT.FILL, grabExcessSpace, false, 1, 1);
	if (OSValidator.isMac()) {
		gd_defaultELTButton.horizontalIndent=6;
	}
	defaultELTButton.setLayoutData(gd_defaultELTButton);
	defaultELTButton.setText(buttonText);
	
	widget = defaultELTButton;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:12,代码来源:ELTRadioButton.java

示例8: createRadioButton

/**
 * Create a radio button for the disk image format list.
 */
protected void createRadioButton(Composite composite, String label, 
	final int format, String helpText) {
		
	Button button = new Button(composite, SWT.RADIO);
	button.setText(label);
	button.setSelection(wizard.getFormat() == format);
	button.setToolTipText(helpText);
	button.addSelectionListener(new SelectionAdapter() {
		public void widgetSelected(SelectionEvent e) {
			getWizard().setFormat(format);
		}
	});
}
 
开发者ID:marvinmalkowskijr,项目名称:applecommander,代码行数:16,代码来源:DiskImageFormatPane.java

示例9: createCompositeReverse

/**
 * This method initializes compositeReverse	
 *
 */
private void createCompositeReverse() {
	compositeReverse = new Composite(groupDecoration, SWT.NONE);
	compositeReverse.setBounds(new org.eclipse.swt.graphics.Rectangle(5,36,231,21));
	radioButtonReverseOn = new Button(compositeReverse, SWT.RADIO);
	radioButtonReverseOn.setBounds(new org.eclipse.swt.graphics.Rectangle(8,4,59,16));
	radioButtonReverseOn.setText("reverse");
	radioButtonReverseOff = new Button(compositeReverse, SWT.RADIO);
	radioButtonReverseOff.setBounds(new org.eclipse.swt.graphics.Rectangle(85,4,56,16));
	radioButtonReverseOff.setText("normal");
	radioButtonReverseDontCare = new Button(compositeReverse, SWT.RADIO);
	radioButtonReverseDontCare.setBounds(new org.eclipse.swt.graphics.Rectangle(157,4,68,16));
	radioButtonReverseDontCare.setText("don't care");
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:17,代码来源:JavelinAttributeEditorComposite.java

示例10: createCompositeBlink

/**
 * This method initializes compositeBlink	
 *
 */
private void createCompositeBlink() {
	compositeBlink = new Composite(groupDecoration, SWT.NONE);
	compositeBlink.setBounds(new org.eclipse.swt.graphics.Rectangle(5,82,231,21));
	radioButtonBlinkOn = new Button(compositeBlink, SWT.RADIO);
	radioButtonBlinkOn.setBounds(new org.eclipse.swt.graphics.Rectangle(8,4,43,16));
	radioButtonBlinkOn.setText("blink");
	radioButtonBlinkOff = new Button(compositeBlink, SWT.RADIO);
	radioButtonBlinkOff.setBounds(new org.eclipse.swt.graphics.Rectangle(86,4,57,16));
	radioButtonBlinkOff.setText("normal");
	radioButtonBlinkDontCare = new Button(compositeBlink, SWT.RADIO);
	radioButtonBlinkDontCare.setBounds(new org.eclipse.swt.graphics.Rectangle(157,4,68,16));
	radioButtonBlinkDontCare.setText("don't care");
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:17,代码来源:JavelinAttributeEditorComposite.java

示例11: createRadioButton

/**
 * Create a radio button for the disk image size list.
 */
protected void createRadioButton(Composite composite, String label, 
	final int size, String helpText) {
		
	Button button = new Button(composite, SWT.RADIO);
	button.setText(label);
	button.setToolTipText(helpText);
	button.setSelection(wizard.getSize() == size);
	button.addSelectionListener(new SelectionAdapter() {
		public void widgetSelected(SelectionEvent e) {
			getWizard().setSize(size);
		}
	});
}
 
开发者ID:AppleCommander,项目名称:AppleCommander,代码行数:16,代码来源:DiskImageSizePane.java

示例12: createRadioButton

/**
 * Create a radio button for the disk image size list.
 */
protected void createRadioButton(Composite composite, String label, 
	final int order, String helpText) {
		
	Button button = new Button(composite, SWT.RADIO);
	button.setText(label);
	button.setToolTipText(helpText);
	button.setSelection(wizard.getOrder() == order);
	button.setEnabled(!wizard.isHardDisk());
	button.addSelectionListener(new SelectionAdapter() {
		public void widgetSelected(SelectionEvent e) {
			getWizard().setOrder(order);
		}
	});
}
 
开发者ID:AppleCommander,项目名称:AppleCommander,代码行数:17,代码来源:DiskImageOrderPane.java

示例13: createAppendMode

private void createAppendMode() {
	btnAppendRadioButton = new Button(this, SWT.RADIO);
	btnAppendRadioButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 12, 1));
	btnAppendRadioButton.setText(MessageUtil.getString("append_mode"));
	btnAppendRadioButton.setSelection(true);
	btnAppendRadioButton.addListener(SWT.Selection, new Listener() {
		public void handleEvent(Event e) {
			switch (e.type) {
			case SWT.Selection:
				updateUI();
				break;
			}
		}
	});
	btnAppendRadioButton.setData(GW4E_CONVERSION_WIDGET_ID, GW4E_APPEND_CHECKBOX);

	Composite composite = new Composite(this, SWT.NONE);
	composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 12, 1));
	composite.setLayout(new GridLayout(12, false));

	lblAppendClassNameLabel = new Label(composite, SWT.NONE);
	lblAppendClassNameLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 4, 1));
	lblAppendClassNameLabel.setText("Class name");

	comboAppendClassnameViewer = new AncestorViewer(composite);
	comboAppendClassnameViewer.initialize(GW4E_CONVERSION_COMBO_ANCESTOR_EXTEND_TEST, false);
	comboAppendClassnameViewer.getCombo().setData(GW4E_CONVERSION_WIDGET_ID, GW4E_CONVERSION_COMBO_ANCESTOR_APPEND_TEST);
	Combo combo = comboAppendClassnameViewer.getCombo();
	combo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 8, 1));
	combo.setEnabled(true);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:31,代码来源:GeneratorChoiceComposite.java

示例14: createRadioButton

private Button createRadioButton(Composite parent, int span, String[] choice) {
	Button button = new Button(parent, SWT.RADIO);
	button.setData(choice[0]);
	button.setText(choice[1]);
	GridData gd = fill(button, span);
	gd.horizontalIndent = 10;
	return button;
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:8,代码来源:RadioChoiceOption.java

示例15: ExpresssionOperationImportExportComposite

public ExpresssionOperationImportExportComposite(Composite parent, int style,ImportExportType type, ExternalWidgetData externalWidgetData) {
	super(parent, style);
	this.externalWidgetData = externalWidgetData;
	setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	setLayout(new GridLayout(1, false));
	Composite exprOperImportExportComposite = new Composite(this, SWT.NONE);
	exprOperImportExportComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	exprOperImportExportComposite.setLayout(new GridLayout(2, false));
	
	labelExperssionType = new Label(exprOperImportExportComposite, SWT.NONE);
	labelExperssionType.setText( type.getValue() +" Type");
	
	radioButtonCompsite = new Composite(exprOperImportExportComposite, SWT.NONE);
	radioButtonCompsite.setLayout(new GridLayout(2, false));
	radioButtonCompsite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	
	btnRadioInternal = new Button(radioButtonCompsite, SWT.RADIO);
	btnRadioInternal.setText("Internal "+type.getValue());
	
	btnRadioExternal = new Button(radioButtonCompsite, SWT.RADIO);
	btnRadioExternal.setText("External "+type.getValue());
	
	lblExternal = new Label(exprOperImportExportComposite, SWT.NONE);
	lblExternal.setText("External Path");
	
	Composite browseButtonComposite = new Composite(exprOperImportExportComposite, SWT.NONE);
	browseButtonComposite.setLayout(new GridLayout(2, false));
	browseButtonComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	
	txtExternalPath = new Text(browseButtonComposite, SWT.BORDER);
	txtExternalPath.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	decorator = WidgetUtility.addDecorator(txtExternalPath, "Field should not be blank.");
	decorator.hide();
	decorator.setMarginWidth(3);
	btnBrowse = new Button(browseButtonComposite, SWT.NONE);
    GridData gd_btnNewButton = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
	gd_btnNewButton.heightHint = 25;
	
	if(OSValidator.isMac()){
		gd_btnNewButton.widthHint = 43;
		gd_btnNewButton.horizontalIndent=-5;
		
	}else{
		gd_btnNewButton.widthHint = 30;
	}
	btnBrowse.setLayoutData(gd_btnNewButton);
	btnBrowse.setText("...");
	new Label(exprOperImportExportComposite, SWT.NONE);
	
	Composite importExportButtonComposite = new Composite(exprOperImportExportComposite, SWT.NONE);
	importExportButtonComposite.setLayout(new GridLayout(2, false));
	importExportButtonComposite.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
	
	btnImport = new Button(importExportButtonComposite, SWT.NONE);
	btnImport.setText("Import "+type.getValue());
	btnExport = new Button(importExportButtonComposite, SWT.NONE);
	btnExport.setText("Export "+type.getValue());
	btnExport.setEnabled(false);
	btnImport.setEnabled(false);
	addListners();
	updateWidgetValueWithPreviousChoices();
	addSelectinListnerToExportImport();
	
	addModifyListnerToExternalPathTextBox(externalWidgetData);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:65,代码来源:ExpresssionOperationImportExportComposite.java


注:本文中的org.eclipse.swt.SWT.RADIO属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。