本文整理匯總了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);
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}