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


Java SWT.CHECK属性代码示例

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


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

示例1: createGroupDefinition

/**
 * This method initializes groupDefinition	
 *
 */
private void createGroupDefinition() {
	groupDefinition = new Group(this, SWT.NONE);
	groupDefinition.setText("Definition");
	checkBoxName = new Button(groupDefinition, SWT.CHECK);
	checkBoxName.setBounds(new org.eclipse.swt.graphics.Rectangle(8,18,50,16));
	checkBoxName.setText("name");
	checkBoxType = new Button(groupDefinition, SWT.CHECK);
	checkBoxType.setBounds(new org.eclipse.swt.graphics.Rectangle(8,41,51,16));
	checkBoxType.setText("type");
	checkBoxType
			.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
				public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
					if (!checkBoxType.getSelection()) {
						//com.twinsoft.convertigo.studio.Studio.theApp.warning(java.util.ResourceBundle.getBundle("com/twinsoft/convertigo/studio/res/editors/IncludedTagAttributesEditorPanel").getString("type_warning"));
					}
				}
			});
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:22,代码来源:IncludedTagAttributesEditorComposite.java

示例2: createGroupVisibility

private void createGroupVisibility() {
	GridData gridData = new org.eclipse.swt.layout.GridData();
	gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
	gridData.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
	groupVisibility = new Group(this, SWT.NONE);
	groupVisibility.setText("Mask value in");
	groupVisibility.setLayoutData(gridData);
	
	checkboxLog = new Button(groupVisibility, SWT.CHECK);
	checkboxLog.setBounds(new org.eclipse.swt.graphics.Rectangle(12,42,200,18));
	checkboxLog.setText("log files");
	
	checkboxStudio = new Button(groupVisibility, SWT.CHECK);
	checkboxStudio.setBounds(new org.eclipse.swt.graphics.Rectangle(12,72,200,16));
	checkboxStudio.setText("studio user interface");
	
	checkboxPlatform = new Button(groupVisibility, SWT.CHECK);
	checkboxPlatform.setBounds(new org.eclipse.swt.graphics.Rectangle(12,102,200,16));
	checkboxPlatform.setText("platform user interface");
	
	checkboxXml = new Button(groupVisibility, SWT.CHECK);
	checkboxXml.setBounds(new org.eclipse.swt.graphics.Rectangle(12,132,200,16));
	checkboxXml.setText("project's XML files");
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:24,代码来源:VisibilityEditorComposite.java

示例3: createGroupDecoration

/**
 * This method initializes groupDecoration	
 *
 */
private void createGroupDecoration() {
	groupDecoration = new Group(this, SWT.NONE);
	groupDecoration.setText("Decoration");
	checkBoxIntense = new Button(groupDecoration, SWT.CHECK);
	checkBoxIntense.setBounds(new org.eclipse.swt.graphics.Rectangle(8,20,46,16));
	checkBoxIntense.setText("bold");
	checkBoxReverse = new Button(groupDecoration, SWT.CHECK);
	checkBoxReverse.setBounds(new org.eclipse.swt.graphics.Rectangle(8,42,61,16));
	checkBoxReverse.setText("reverse");
	checkBoxUnderline = new Button(groupDecoration, SWT.CHECK);
	checkBoxUnderline.setBounds(new org.eclipse.swt.graphics.Rectangle(75,20,68,16));
	checkBoxUnderline.setText("underline");
	checkBoxBlink = new Button(groupDecoration, SWT.CHECK);
	checkBoxBlink.setBounds(new org.eclipse.swt.graphics.Rectangle(75,42,53,16));
	checkBoxBlink.setText("blink");
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:20,代码来源:IncludedTagAttributesEditorComposite.java

示例4: initialize

private void initialize() {
	WaitTimeTrigger trigger = (parent.getTrigger() instanceof WaitTimeTrigger) ? (WaitTimeTrigger) parent.getTrigger() : null;
       GridData gridData2 = new GridData();
       gridData2.horizontalAlignment = GridData.FILL;
       gridData2.grabExcessHorizontalSpace = true;
       gridData2.verticalAlignment = GridData.CENTER;
       GridLayout gridLayout = new GridLayout();
       gridLayout.numColumns = 2;
       this.setLayout(gridLayout);
       Label label = new Label(this, SWT.CHECK);
       label.setText("Check this to force detection of any DOM changes\nwhile waiting. (Can cause heavy CPU load)");
       check = new Button(this, SWT.CHECK);
       check.setSelection((trigger != null) ? trigger.isDoDirty() : false);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:14,代码来源:HttpTriggerWaitTimeEditorComposite.java

示例5: createOptionsGroupButtons

@Override
protected void createOptionsGroupButtons(Group optionsGroup) {
	Font font = optionsGroup.getFont();
	optionsGroup.setLayout(new GridLayout(2, true));

	Composite left = new Composite(optionsGroup, SWT.NONE);
	left.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, false));
	left.setLayout(new GridLayout(1, true));

	// compress... checkbox
	compressContentsCheckbox = new Button(left, SWT.CHECK | SWT.LEFT);
	compressContentsCheckbox.setText(DataTransferMessages.ZipExport_compressContents);
	compressContentsCheckbox.setFont(font);

}
 
开发者ID:eclipse,项目名称:n4js,代码行数:15,代码来源:ExportSelectionPage.java

示例6: createCheckbox

private Button createCheckbox(
		String label, String property, boolean defaultValue, Preferences prefs) {
	Button checkbox = new Button(yuiOptGroup, SWT.CHECK);
	checkbox.setText(label);
	checkbox.setSelection(prefs.getBoolean(preferenceKey(property), defaultValue));
	checkbox.requestLayout();
	return checkbox;
}
 
开发者ID:mnlipp,项目名称:EclipseMinifyBuilder,代码行数:8,代码来源:MinifyJsPropertyPage.java

示例7: createViewer

private void createViewer(Composite parent) {
	viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER | SWT.CHECK | SWT.READ_ONLY | SWT.PUSH);
	createColumns(parent, viewer);
	final Table table = viewer.getTable();
	table.setHeaderVisible(true);
	table.setLinesVisible(true);

	viewer.getTable().addListener(SWT.Selection, new Listener() {

		@Override
		public void handleEvent(org.eclipse.swt.widgets.Event event) {
			if (highlightNodes.getSelection())
				highlightNodesOnGraph(highlightNodes.getSelection());
		}
	});

	viewer.setContentProvider(new ArrayContentProvider());
	viewer.setInput(this.units);
	getSite().setSelectionProvider(viewer);

	GridData gridData = new GridData();
	gridData.verticalAlignment = GridData.FILL;
	gridData.horizontalSpan = 2;
	gridData.grabExcessHorizontalSpace = true;
	gridData.grabExcessVerticalSpace = true;
	gridData.horizontalAlignment = GridData.FILL;
	viewer.getControl().setLayoutData(gridData);

	Hashtable<String, Object> properties = new Hashtable<>();
	String[] topics = new String[] { DataModel.EA_TOPIC_DATA_SELECTION, DataModel.EA_TOPIC_DATA_UNIT_CHANGED, DataModel.EA_TOPIC_DATA_VIEW_REFRESH };
	properties.put(EventConstants.EVENT_TOPIC, topics);
	ServiceUtil.registerService(EventHandler.class, this, properties);

}
 
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:34,代码来源:ResultView.java

示例8: create

public static BuildPoliciesCheckboxTableViewer create (IResource file, Composite parent, int style, GridData gd, Listener listener) {
	Table table = new Table(parent, SWT.CHECK | style);
	table.setData(GW4E_CONVERSION_WIDGET_ID, GW4E_CONVERSION_TABLE_GENERATORS);
	
	BuildPoliciesCheckboxTableViewer bctv =  new BuildPoliciesCheckboxTableViewer(file,table);
	bctv.init(listener,gd);
	return bctv;
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:8,代码来源:BuildPoliciesCheckboxTableViewer.java

示例9: CheckProfileEntry

public CheckProfileEntry ( final DataBindingContext dbc, final Composite parent, final ProfileManager profileManager, final Profile profile, final ChartContext chartContext )
{
    super ( dbc, profileManager, profile, chartContext );

    this.widget = new Button ( parent, SWT.CHECK );
    addBinding ( dbc.bindValue ( SWTObservables.observeText ( this.widget ), EMFObservables.observeValue ( profile, ChartPackage.Literals.PROFILE__LABEL ) ) );

    this.widget.addSelectionListener ( new SelectionAdapter () {
        @Override
        public void widgetSelected ( final SelectionEvent e )
        {
            fireSelection ( CheckProfileEntry.this.widget.getSelection () );
        };
    } );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:15,代码来源:CheckProfileEntry.java

示例10: createIsStaticCheckbox

protected Composite createIsStaticCheckbox(Composite parent) {
	isStatic = new Button(parent, SWT.CHECK);
	isStatic.setText(getDescription(HrmViewsRepository.General.Properties.isStatic,
			HrmMessages.GeneralPropertiesEditionPart_IsStaticLabel));
	isStatic.addSelectionListener(new SelectionAdapter() {

		/**
		 * {@inheritDoc}
		 *
		 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
		 * 
		 */
		public void widgetSelected(SelectionEvent e) {
			if (propertiesEditionComponent != null)
				propertiesEditionComponent
						.firePropertiesChanged(new PropertiesEditionEvent(GeneralPropertiesEditionPartImpl.this,
								HrmViewsRepository.General.Properties.isStatic, PropertiesEditionEvent.COMMIT,
								PropertiesEditionEvent.SET, null, new Boolean(isStatic.getSelection())));
		}

	});
	GridData isStaticData = new GridData(GridData.FILL_HORIZONTAL);
	isStaticData.horizontalSpan = 2;
	isStatic.setLayoutData(isStaticData);
	EditingUtils.setID(isStatic, HrmViewsRepository.General.Properties.isStatic);
	EditingUtils.setEEFtype(isStatic, "eef::Checkbox"); //$NON-NLS-1$
	SWTUtils.createHelpButton(parent, propertiesEditionComponent
			.getHelpContent(HrmViewsRepository.General.Properties.isStatic, HrmViewsRepository.SWT_KIND), null); // $NON-NLS-1$
	// Start of user code for createIsStaticCheckbox

	// End of user code
	return parent;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:33,代码来源:GeneralPropertiesEditionPartImpl.java

示例11: createContents

@Override
protected Control createContents(Composite parent) {
    Composite panel = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout(2, false);
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    panel.setLayout(layout);

    btnForceUnixNewlines = new Button(panel, SWT.CHECK);
    btnForceUnixNewlines.setText(Messages.ProjectProperties_force_unix_newlines);
    btnForceUnixNewlines.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, false, false, 2, 1));
    btnForceUnixNewlines.setSelection(prefs.getBoolean(PROJ_PREF.FORCE_UNIX_NEWLINES, true));

    Label label = new Label(panel, SWT.NONE);
    label.setText(Messages.projectProperties_timezone_for_all_db_connections);

    cmbTimezone = new Combo(panel, SWT.BORDER | SWT.DROP_DOWN);
    cmbTimezone.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    cmbTimezone.setItems(UIConsts.TIME_ZONES.toArray(new String[UIConsts.TIME_ZONES.size()]));
    String tz = prefs.get(PROJ_PREF.TIMEZONE, ApgdiffConsts.UTC);
    cmbTimezone.setText(tz);
    cmbTimezone.addModifyListener(new ModifyListener() {

        @Override
        public void modifyText(ModifyEvent e) {
            checkSwitchWarnLbl();
        }
    });

    lblWarn = new CLabel(panel, SWT.NONE);
    lblWarn.setImage(Activator.getEclipseImage(ISharedImages.IMG_OBJS_WARN_TSK));
    lblWarn.setText(Messages.ProjectProperties_change_projprefs_warn);
    GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, false, false, 2, 1);
    gd.exclude = true;
    lblWarn.setLayoutData(gd);
    lblWarn.setVisible(false);

    return panel;
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:39,代码来源:ProjectProperties.java

示例12: createIsPeriodicCheckbox

protected Composite createIsPeriodicCheckbox(Composite parent) {
	isPeriodic = new Button(parent, SWT.CHECK);
	isPeriodic.setText(getDescription(SrmViewsRepository.Timing.Properties.isPeriodic,
			SrmMessages.TimingPropertiesEditionPart_IsPeriodicLabel));
	isPeriodic.addSelectionListener(new SelectionAdapter() {

		/**
		 * {@inheritDoc}
		 *
		 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
		 * 
		 */
		public void widgetSelected(SelectionEvent e) {
			if (propertiesEditionComponent != null)
				propertiesEditionComponent
						.firePropertiesChanged(new PropertiesEditionEvent(TimingPropertiesEditionPartImpl.this,
								SrmViewsRepository.Timing.Properties.isPeriodic, PropertiesEditionEvent.COMMIT,
								PropertiesEditionEvent.SET, null, new Boolean(isPeriodic.getSelection())));
		}

	});
	GridData isPeriodicData = new GridData(GridData.FILL_HORIZONTAL);
	isPeriodicData.horizontalSpan = 2;
	isPeriodic.setLayoutData(isPeriodicData);
	EditingUtils.setID(isPeriodic, SrmViewsRepository.Timing.Properties.isPeriodic);
	EditingUtils.setEEFtype(isPeriodic, "eef::Checkbox"); //$NON-NLS-1$
	SWTUtils.createHelpButton(parent, propertiesEditionComponent
			.getHelpContent(SrmViewsRepository.Timing.Properties.isPeriodic, SrmViewsRepository.SWT_KIND), null); // $NON-NLS-1$
	// Start of user code for createIsPeriodicCheckbox

	// End of user code
	return parent;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:33,代码来源:TimingPropertiesEditionPartImpl.java

示例13: addRaw

public Composite addRaw(){
	Composite composite = new Composite(container, SWT.NONE);
	GridLayout gl_composite = new GridLayout(textGridRow.getNumberOfColumn() + 1, false);
	gl_composite.horizontalSpacing = 7;
	gl_composite.marginWidth = 1;
	gl_composite.marginHeight = 0;
	gl_composite.verticalSpacing = 1;
	composite.setLayout(gl_composite);
		
	Button rowSelection = new Button(composite, SWT.CHECK);
	rowSelection.setEnabled(enabled);
	
	Map<Integer, TextGridColumnLayout> columns = textGridRow.getTextGridColumns();
	for(int columnNumber:columns.keySet()){
		Text text = new Text(composite, SWT.BORDER);
		if(!columns.get(columnNumber).grabHorizantalAccessSpace()){
			GridData gd_text = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
			gd_text.widthHint = columns.get(columnNumber).getColumnWidth();
			text.setLayoutData(gd_text);
			
			text.setEditable(columns.get(columnNumber).isEditable());
			text.setEnabled(columns.get(columnNumber).isEnabled());
		}else{
			text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
			text.setBounds(0, 0, 76, 21);
			text.setFocus();
			
			text.setEditable(columns.get(columnNumber).isEditable());
			text.setEnabled(columns.get(columnNumber).isEnabled());
		}
		
		if(rowData!=null)
			text.setText(rowData.get(columnNumber));
	}
	
	return composite;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:37,代码来源:TextGridRowBuilder.java

示例14: createBuildPoliciesGeneratorSection

private void createBuildPoliciesGeneratorSection(Composite parent) {
	composite = new Composite(parent_1, SWT.NONE);
	composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
	GridLayout gl_composite = new GridLayout(1, false);
	gl_composite.marginWidth = 0;
	composite.setLayout(gl_composite);

	Button fRefreshButton = new Button(composite, SWT.PUSH);
	fRefreshButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	fRefreshButton.setEnabled(true);
	fRefreshButton.setText(MessageUtil.getString("refresh"));
	fRefreshButton.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent evt) {
			refreshStartElement();
		}
	});

	lblNewLabel_1 = new Label(parent_1, SWT.NONE);
	lblNewLabel_1.setText(MessageUtil.getString("additionalGraphModels"));
	gd = new GridData();
	gd.horizontalIndent = 25;
	lblNewLabel_1.setLayoutData(gd);

	mpg = new ModelPathGenerator(parent_1, SWT.NONE, new Listener() {
		@Override
		public void handleEvent(Event event) {
			updateConfigState();
		}
	});
	mpg.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	GridLayout gridLayout = (GridLayout) mpg.getLayout();
	gridLayout.marginWidth = 0;

	composite_1 = new Composite(parent_1, SWT.NONE);
	composite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
	composite_1.setLayout(new GridLayout(1, false));

	hintButton = new Button(composite_1, SWT.CHECK);
	hintButton.setText(MessageUtil.getString("hint"));

	filterGraphmlButton = new Button(composite_1, SWT.CHECK);
	filterGraphmlButton.setText(MessageUtil.getString("filter_graphml_file"));
	Label fDummyGeneratorLabel = new Label(parent, SWT.NONE);
	GridData gd_1 = new GridData();
	gd_1.horizontalSpan = 1;
	fDummyGeneratorLabel.setLayoutData(gd_1);

	mpg.setButtons(hintButton, filterGraphmlButton);

	composite_3 = new Composite(parent_1, SWT.NONE);
	GridLayout gl_composite_3 = new GridLayout(1, false);
	gl_composite_3.marginWidth = 0;
	composite_3.setLayout(gl_composite_3);
	composite_3.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:56,代码来源:GW4ELaunchConfigurationTab.java

示例15: SWTOtherEditor

/**
 * Creates a new instance.
 * 
 * @param parent  the parent.
 * @param style  the style.
 * @param chart  the chart.
 */
public SWTOtherEditor(Composite parent, int style, JFreeChart chart)
{
    super(parent, style);
    FillLayout layout = new FillLayout();
    layout.marginHeight = layout.marginWidth = 4;
    setLayout(layout);

    Group general = new Group(this, SWT.NONE);
    general.setLayout(new GridLayout(3, false));
    general.setText(localizationResources.getString("General"));
    
    // row 1: antialiasing
    antialias = new Button(general, SWT.CHECK);
    antialias.setText(localizationResources.getString("Draw_anti-aliased"));
    antialias.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false,
            3, 1));
    antialias.setSelection(chart.getAntiAlias());
    
    //row 2: background paint for the chart
    new Label(general, SWT.NONE).setText(localizationResources.getString(
            "Background_paint"));
    backgroundPaintCanvas = new SWTPaintCanvas(general, SWT.NONE, 
            SWTUtils.toSwtColor(getDisplay(), chart.getBackgroundPaint()));
    GridData bgGridData = new GridData(SWT.FILL, SWT.CENTER, true, false);
    bgGridData.heightHint = 20;
    backgroundPaintCanvas.setLayoutData(bgGridData);
    Button selectBgPaint = new Button(general, SWT.PUSH);
    selectBgPaint.setText(localizationResources.getString("Select..."));
    selectBgPaint.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false,
            false));
    selectBgPaint.addSelectionListener(
            new SelectionAdapter() {
                public void widgetSelected(SelectionEvent event) {
                    ColorDialog dlg = new ColorDialog(getShell());
                    dlg.setText(localizationResources.getString(
                            "Background_paint"));
                    dlg.setRGB(backgroundPaintCanvas.getColor().getRGB());
                    RGB rgb = dlg.open();
                    if (rgb != null) {
                        backgroundPaintCanvas.setColor(
                                new Color(getDisplay(), rgb));
                    }
                }
            }
    );
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:53,代码来源:SWTOtherEditor.java


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