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


Java Label.setEnabled方法代码示例

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


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

示例1: createMiddleLayer

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
private void createMiddleLayer() {
	Composite middleComposite = new Composite(this, SWT.NONE);
	middleComposite.setLayout(new GridLayout(1, false));
	middleComposite.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, true, 1, 1));
	
	addAllSelectedPackagesLabel = new Label(middleComposite, SWT.NONE);
	addAllSelectedPackagesLabel.setBounds(6, 70, 25, 25);
	addAllSelectedPackagesLabel.setImage(ImagePathConstant.SELECT_ALL_ICON.getImageFromRegistry());
	addAllSelectedPackagesLabel.setToolTipText("Add all packages");
	addListenerToSelectAllLable(addAllSelectedPackagesLabel);
	addAllSelectedPackagesLabel.setEnabled(false);
	
	Label dummyLabel = new Label(middleComposite, SWT.NONE);
	
	addSelectedPackagesLabel = new Label(middleComposite, SWT.NONE);
	addSelectedPackagesLabel.setBounds(6, 110, 25, 25);
	addSelectedPackagesLabel.setImage(ImagePathConstant.SELECT_ICON.getImageFromRegistry());
	addSelectedPackagesLabel.setToolTipText("Add selected packages");
	addListenerToSelectLable(addSelectedPackagesLabel);
	addSelectedPackagesLabel.setEnabled(false);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:22,代码来源:CategoriesDialogTargetComposite.java

示例2: createNewMode

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
private void createNewMode() {
	btnCreateNewRadioButton = new Button(this, SWT.RADIO);
	btnCreateNewRadioButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 12, 1));
	btnCreateNewRadioButton.setText(MessageUtil.getString("standalone_mode"));
	btnCreateNewRadioButton.setSelection(false);
	btnCreateNewRadioButton.addListener(SWT.Selection, new Listener() {
		public void handleEvent(Event e) {
			switch (e.type) {
			case SWT.Selection:
				updateUI();
				break;
			}
		}
	});
	btnCreateNewRadioButton.setData(GW4E_CONVERSION_WIDGET_ID, GW4E_NEWCLASS_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));

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

	newClassnameText = new Text(composite, SWT.BORDER);
	newClassnameText.setEnabled(false);
	newClassnameText.addModifyListener(new ModifyListener() {
		public void modifyText(ModifyEvent event) {
			listener.handleEvent(null);
		}
	});
	newClassnameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 8, 1));
	newClassnameText.setEnabled(false);
	newClassnameText.setData(GW4E_CONVERSION_WIDGET_ID, GW4E_NEWCLASS_TEXT);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:37,代码来源:GeneratorChoiceComposite.java

示例3: addButtonPanel

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
protected Composite addButtonPanel(Composite container) {
	Composite composite_1 = new Composite(container, SWT.NONE);
	composite_1.setLayout(new GridLayout(5, false));
	ColumnLayoutData cld_composite_1 = new ColumnLayoutData();
	cld_composite_1.horizontalAlignment = ColumnLayoutData.RIGHT;
	cld_composite_1.heightHint = 28;
	composite_1.setLayoutData(cld_composite_1);

	Label addButton = new Label(composite_1, SWT.NONE);
	addButton.setToolTipText(Messages.ADD_KEY_SHORTCUT_TOOLTIP);
	addButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
	addButton.setImage(ImagePathConstant.ADD_BUTTON.getImageFromRegistry());
	attachAddButtonListern(addButton);

	deleteButton = new Label(composite_1, SWT.NONE);
	deleteButton.setToolTipText(Messages.DELETE_KEY_SHORTCUT_TOOLTIP);
	deleteButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
	deleteButton.setImage(ImagePathConstant.DELETE_BUTTON.getImageFromRegistry());
	attachDeleteButtonListener(deleteButton);

	upButton = new Label(composite_1, SWT.NONE);
	upButton.setToolTipText(Messages.MOVE_UP_KEY_SHORTCUT_TOOLTIP);
	upButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
	upButton.setImage(ImagePathConstant.MOVEUP_BUTTON.getImageFromRegistry());
	attachUpButtonListener(upButton);

	downButton = new Label(composite_1, SWT.NONE);
	downButton.setToolTipText(Messages.MOVE_DOWN_KEY_SHORTCUT_TOOLTIP);
	downButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
	downButton.setImage(ImagePathConstant.MOVEDOWN_BUTTON.getImageFromRegistry());
	attachDownButtonListerner(downButton);
	deleteButton.setEnabled(false);
	upButton.setEnabled(false);
	downButton.setEnabled(false);
	return composite_1;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:37,代码来源:HiveOutputFieldDialog.java

示例4: createExtendMode

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
private void createExtendMode() {
	btnExtendRadioButton = new Button(this, SWT.RADIO);
	btnExtendRadioButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 12, 1));
	btnExtendRadioButton.setText(MessageUtil.getString("extending_class"));
	btnExtendRadioButton.setSelection(false);
	btnExtendRadioButton.addListener(SWT.Selection, new Listener() {
		public void handleEvent(Event e) {
			switch (e.type) {
			case SWT.Selection:
				updateUI();
				break;
			}
		}
	});
	btnExtendRadioButton.setData(GW4E_CONVERSION_WIDGET_ID, GW4E_EXTEND_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));

	lblExtendedLabel = new Label(composite, SWT.NONE);
	lblExtendedLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 4, 1));
	lblExtendedLabel.setText(MessageUtil.getString("class_extended"));
	lblExtendedLabel.setEnabled(false);

	comboExtendedClassnameViewer = new AncestorViewer(composite);
	comboExtendedClassnameViewer.initialize(GW4E_CONVERSION_COMBO_ANCESTOR_EXTEND_TEST, false);
	comboExtendedClassnameViewer.getCombo().setData(GW4E_CONVERSION_WIDGET_ID, GW4E_CONVERSION_COMBO_ANCESTOR_EXTEND_TEST);
	
	Combo combo = comboExtendedClassnameViewer.getCombo();
	combo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 8, 1));
	combo.setEnabled(false);

	lblExtendingLabel = new Label(composite, SWT.NONE);
	lblExtendingLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 4, 1));
	lblExtendingLabel.setText(MessageUtil.getString("classname"));
	lblExtendingLabel.setEnabled(false);

	extendingClassnameText = new Text(composite, SWT.BORDER);
	extendingClassnameText.setEnabled(false);
	extendingClassnameText.addModifyListener(new ModifyListener() {
		public void modifyText(ModifyEvent event) {
			listener.handleEvent(null);
		}
	});
	extendingClassnameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 8, 1));
	extendingClassnameText.setEnabled(false);
	extendingClassnameText.setData(GW4E_CONVERSION_WIDGET_ID, GW4E_EXTEND_CLASS_TEXT);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:50,代码来源:GeneratorChoiceComposite.java

示例5: S3GetPutFile

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
private Control S3GetPutFile(Composite control){
	Composite composite = new Composite(control, SWT.BORDER);
	composite.setLayout(new GridLayout(3, false));
	composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
	
	FTPWidgetUtility ftpWidgetUtility = new FTPWidgetUtility();
	Label localLbl = (Label) ftpWidgetUtility.createLabel(composite, Messages.LOCAL_PATH);
	setPropertyHelpText(localLbl, "Used to provide local path");
	text1 = (Text) ftpWidgetUtility.createText(composite, "", SWT.BORDER);
	Button localPathBrwsBtn = new Button(composite, SWT.NONE);
	localPathBrwsBtn.setText("...");
	selectionListener(localPathBrwsBtn, text1);
	
	Label bucket = (Label) ftpWidgetUtility.createLabel(composite, Messages.S3_BUCKET);
	setPropertyHelpText(bucket, "Used to provide Bucket Value");
	text2 = (Text) ftpWidgetUtility.createText(composite, "", SWT.BORDER);
	new Button(composite, SWT.NONE).setVisible(false);
	
	Label filepathLbl = (Label) ftpWidgetUtility.createLabel(composite, Messages.S3_FILE_PATH);
	setPropertyHelpText(filepathLbl, "Used to provide File Path");
	text3 = (Text) ftpWidgetUtility.createText(composite, "", SWT.BORDER);
	new Button(composite, SWT.NONE).setVisible(false);
	
	Label regionLbl = (Label) ftpWidgetUtility.createLabel(composite, Messages.AWS_REGION);
	setPropertyHelpText(regionLbl, "Used to provide AWS Region");
	text4 = (Text) ftpWidgetUtility.createText(composite, "", SWT.BORDER);
	new Button(composite, SWT.NONE).setVisible(false);
	
	overWriteLabel = (Label) ftpWidgetUtility.createLabel(composite, Messages.WRITE_MODE);
	setPropertyHelpText(overWriteLabel, "Used to select OverWrite value");
	overwriteCombo = (Combo) ftpWidgetUtility.CreateCombo(composite, new String[]{Messages.OVERWRITE_IF_EXISTS, Messages.FAIL_IF_EXISTS});
	overWriteLabel.setEnabled(true);
	overwriteCombo.setEnabled(true);
	
	text1ControlDecoration = WidgetUtility.addDecorator(text1, Messages.EMPTYFIELDMESSAGE);
	text2ControlDecoration = WidgetUtility.addDecorator(text2, Messages.EMPTYFIELDMESSAGE);
	text4ControlDecoration = WidgetUtility.addDecorator(text4, Messages.EMPTYFIELDMESSAGE);
	
	FTPWidgetUtility widgetUtility = new FTPWidgetUtility();
	widgetUtility.validateEmptyWidgetText(text1, propertyDialogButtonBar, cursor, text1ControlDecoration);
	widgetUtility.validateEmptyWidgetText(text2, propertyDialogButtonBar, cursor, text2ControlDecoration);
	widgetUtility.validateEmptyWidgetText(text4, propertyDialogButtonBar, cursor, text4ControlDecoration);
	
	if(authenticationModeCombo.getSelectionIndex() != 1 || StringUtils
			.equalsIgnoreCase(authenticationModeCombo.getText(), Constants.PUT_FILE_S3)){
		text3ControlDecoration = WidgetUtility.addDecorator(text3, Messages.EMPTYFIELDMESSAGE);
		widgetUtility.validateEmptyWidgetText(text3, propertyDialogButtonBar, cursor, text3ControlDecoration);
	}
	
	text3.addModifyListener(new ModifyListener() {
		@Override
		public void modifyText(ModifyEvent event) {
			if(authenticationModeCombo.getSelectionIndex() == 1){
				text3ControlDecoration.hide();
				text3.setBackground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 255, 255, 255));
			}
		}
	});
	
	
	return composite;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:63,代码来源:FTPOperationConfigDialog.java


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