本文整理匯總了Java中org.eclipse.swt.widgets.Combo.setEnabled方法的典型用法代碼示例。如果您正苦於以下問題:Java Combo.setEnabled方法的具體用法?Java Combo.setEnabled怎麽用?Java Combo.setEnabled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.swt.widgets.Combo
的用法示例。
在下文中一共展示了Combo.setEnabled方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: disabledWidgetsifWholeExpressionIsParameterForAggregateCumulate
import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
/**
* @param isParam
* @param isWholeOperationParameter
*/
private void disabledWidgetsifWholeExpressionIsParameterForAggregateCumulate(Button isParam,
boolean isWholeOperationParameter) {
if (isWholeOperationParameter) {
Text textAccumulator = (Text) isParam.getData(Messages.TEXT_ACCUMULATOR);
Button isParamAccumulator = (Button) isParam.getData(Messages.ISPARAM_ACCUMULATOR);
Combo comboDataTypes = (Combo) isParam.getData(Messages.COMBODATATYPES);
Button button =(Button) isParam.getData(Constants.EXPRESSION_EDITOR_BUTTON1);
button.setEnabled(false);
textAccumulator.setEnabled(false);
isParamAccumulator.setEnabled(false);
comboDataTypes.setEnabled(false);
super.disabledWidgetsifWholeExpressionIsParameter(isParamAccumulator, isWholeOperationParameter);
}
}
示例2: createAppendMode
import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
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);
}
示例3: disabledWidgetsifWholeExpressionIsParameterForAggregateCumulate
import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
/**
* @param isParam
* @param isWholeOperationParameter
*/
private void disabledWidgetsifWholeExpressionIsParameterForAggregateCumulate(Button isParam,
boolean isWholeOperationParameter) {
if (isWholeOperationParameter) {
Text textAccumulator = (Text) isParam.getData(Messages.TEXT_ACCUMULATOR);
Button isParamAccumulator = (Button) isParam.getData(Messages.ISPARAM_ACCUMULATOR);
Combo comboDataTypes = (Combo) isParam.getData(Messages.COMBODATATYPES);
textAccumulator.setEnabled(false);
isParamAccumulator.setEnabled(false);
comboDataTypes.setEnabled(false);
super.disabledWidgetsifWholeExpressionIsParameter(isParamAccumulator, isWholeOperationParameter);
}
}
示例4: createExtendMode
import org.eclipse.swt.widgets.Combo; //導入方法依賴的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: setEnabled
import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
public void setEnabled(boolean enable) {
Combo comboAncestor = getCombo();
comboAncestor.setEnabled(enable);
}
示例6: S3GetPutFile
import org.eclipse.swt.widgets.Combo; //導入方法依賴的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;
}
示例7: createDialogArea
import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
@Override
protected Control createDialogArea(Composite parent) {
Composite container = (Composite) super.createDialogArea(parent);
container.getShell().addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
lineHighlight.dispose();
}
});
Composite verticalGroup = new Composite(container, SWT.NONE);
verticalGroup.setLayout(new GridLayout());
compositeType = new Composite(verticalGroup, SWT.NONE);
compositeType.setLayout(new RowLayout(SWT.HORIZONTAL));
bSuspendOnType = new Button(compositeType, SWT.CHECK);
bSuspendOnType.setText("Suspend on type");
bSuspendOnType.addSelectionListener(this);
cmbTypes = new Combo(compositeType, SWT.READ_ONLY);
cmbTypes.addSelectionListener(this);
cmbTypes.setEnabled(false);
compositeUnit = new Composite(verticalGroup, SWT.NONE);
compositeUnit.setLayout(new RowLayout(SWT.HORIZONTAL));
bSuspendOnUnit = new Button(compositeUnit, SWT.CHECK);
bSuspendOnUnit.setText("Suspend on unit");
bSuspendOnUnit.setSelection(true);
bSuspendOnUnit.addSelectionListener(this);
cmbClass = new Combo(compositeUnit, SWT.READ_ONLY);
cmbClass.addSelectionListener(this);
cmbMethod = new Combo(compositeUnit, SWT.READ_ONLY);
cmbMethod.addSelectionListener(this);
Label spacer = new Label(verticalGroup, SWT.NONE);
spacer.setText("");
Label label = new Label(verticalGroup, SWT.NONE);
label.setText("Selected the unit to suspend on by clicking on a line below:");
Composite textContainer = new Composite(verticalGroup, SWT.NONE);
textContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1,1));
textContainer.setLayout(new GridLayout());
unitSelectionArea = new StyledText(textContainer, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
unitSelectionArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1,1));
unitSelectionArea.setLayoutData(new GridData(750, 400));
unitSelectionArea.setEditable(false);
unitSelectionArea.addCaretListener(this);
unitSelectionArea.addSelectionListener(this);
fillCombos();
cmbClass.select(0);
cmbMethod.select(0);
cmbTypes.select(0);
return container;
}