本文整理了Java中org.eclipse.swt.widgets.Button.getEnabled()
方法的一些代码示例,展示了Button.getEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.getEnabled()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Button
类名称:Button
方法名:getEnabled
暂无
代码示例来源:origin: pentaho/pentaho-kettle
buttonPreloadElementCache.setEnabled( buttonEnableElementCache.getSelection() );
if ( buttonClearDimension.getEnabled() ) {
buttonClearConsolidations.setEnabled( !buttonClearDimension.getSelection() );
代码示例来源:origin: pentaho/pentaho-kettle
/**
* Ok clicked.
*/
public void ok() {
this.stepname = this.wStepname.getText(); // return value
this.meta.getUseControlFile().setValue( this.wUseControlFile.getSelection() );
this.meta.getVariableSubstitution().setValue( this.wVariableSubstitution.getSelection() );
this.meta.getControlFile().setValue( this.wControlFile.getText() );
this.meta.getFastloadPath().setValue( this.wFastLoadPath.getText() );
this.meta.getDataFile().setValue( this.wDataFile.getText() );
this.meta.getLogFile().setValue( this.wLogFile.getText() );
this.meta.getErrorLimit().setValue( Const.toInt( this.wErrLimit.getText(), TeraFastMeta.DEFAULT_ERROR_LIMIT ) );
this.meta.getSessions().setValue( Const.toInt( this.wSessions.getText(), TeraFastMeta.DEFAULT_SESSIONS ) );
this.meta.getTargetTable().setValue( this.wTable.getText() );
this.meta.getConnectionName().setValue( this.wConnection.getText() );
this.meta.getTruncateTable().setValue(
this.wbTruncateTable.getSelection() && this.wbTruncateTable.getEnabled() );
this.meta.setDbMeta( this.transMeta.findDatabase( this.wConnection.getText() ) );
this.meta.getTableFieldList().getValue().clear();
this.meta.getStreamFieldList().getValue().clear();
int nrfields = this.wReturn.nrNonEmpty();
for ( int i = 0; i < nrfields; i++ ) {
TableItem item = this.wReturn.getNonEmpty( i );
this.meta.getTableFieldList().getValue().add( item.getText( 1 ) );
this.meta.getStreamFieldList().getValue().add( item.getText( 2 ) );
}
dispose();
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
@Override
public void keyPressed(KeyEvent e) {
if (e.keyCode == SWT.DEL && fRemoveButton.getEnabled()) {
handleRemove();
}
}
});
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
@Override
public void keyPressed(KeyEvent e) {
if (e.keyCode == SWT.DEL && fRemoveButton.getEnabled()) {
handleRemove();
}
}
});
代码示例来源:origin: org.eclipse.scout.sdk.s2e/org.eclipse.scout.sdk.s2e.nls
@Override
public boolean getEnabled() {
return m_smartButton.getEnabled();
}
代码示例来源:origin: net.sf.okapi.lib/okapi-lib-verification-ui
private void updateButtons () {
btSave.setEnabled(( rawDoc != null ) && ( TUCount > 0 ));
if ( segmentMode ) {
btPrevious.setEnabled(( current > 0 ) && (( curSeg > 0 ) || ( TUCount > 0 )));
btNext.setEnabled(( TUCount > 0 ) && (( curSeg < srcSegs.count()-1 ) || ( current < (TUCount-1) )));
}
else {
btPrevious.setEnabled(( current > 0 ) && ( TUCount > 0 ));
btNext.setEnabled(( TUCount > 0 ) && ( current < (TUCount-1) ));
}
btFirst.setEnabled(btPrevious.getEnabled());
btLast.setEnabled(btNext.getEnabled());
}
代码示例来源:origin: net.sf.okapi.steps/okapi-step-tokenization-ui
public void interop(Widget speaker) {
btnModify.setEnabled(table.getItemCount() > 0 && table.getSelectionIndex() != -1);
btnRemove.setEnabled(btnModify.getEnabled());
}
代码示例来源:origin: net.sf.okapi.steps/okapi-step-tokenization-ui
public void interop(Widget speaker) {
if (SWTUtil.checkControl(modify))
modify.setEnabled(table.getItemCount() > 0 && table.getSelectionIndex() != -1);
if (SWTUtil.checkControl(remove))
remove.setEnabled(modify.getEnabled());
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
private static void saveBooleanSetting(String key, Button button) {
if (button != null && !button.isDisposed() && button.getEnabled())
JavaPlugin.getDefault().getDialogSettings().put(key, button.getSelection());
}
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
public void refreshControls() {
templateNameControl.setItems(templateNames.toArray(new String[0]));
if (templateNames.size() > 0) {
templateNameControl.select(selectedTemplateNumber);
templateTextControl.setText(templates.get(selectedTemplateNumber));
} else {
templateTextControl.setText(""); //$NON-NLS-1$
}
revalidate();
if (getButton(APPLY_BUTTON) != null)
getButton(APPLY_BUTTON).setEnabled(somethingChanged && getButton(IDialogConstants.OK_ID).getEnabled());
if (getButton(REMOVE_BUTTON) != null)
getButton(REMOVE_BUTTON).setEnabled(templateNames.size() > 0);
if (getButton(EDIT_BUTTON) != null)
getButton(EDIT_BUTTON).setEnabled(templateNames.size() > 0);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
private static void saveBooleanSetting(String key, Button button) {
if (button != null && !button.isDisposed() && button.getEnabled())
JavaPlugin.getDefault().getDialogSettings().put(key, button.getSelection());
}
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
private static void saveBooleanSetting(String key, Button button) {
if (button != null && !button.isDisposed() && button.getEnabled())
JavaPlugin.getDefault().getDialogSettings().put(key, button.getSelection());
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
public void refreshControls() {
templateNameControl.setItems(templateNames.toArray(new String[0]));
if (templateNames.size() > 0) {
templateNameControl.select(selectedTemplateNumber);
templateTextControl.setText(templates.get(selectedTemplateNumber));
} else {
templateTextControl.setText(""); //$NON-NLS-1$
}
revalidate();
if (getButton(APPLY_BUTTON) != null)
getButton(APPLY_BUTTON).setEnabled(somethingChanged && getButton(IDialogConstants.OK_ID).getEnabled());
if (getButton(REMOVE_BUTTON) != null)
getButton(REMOVE_BUTTON).setEnabled(templateNames.size() > 0);
if (getButton(EDIT_BUTTON) != null)
getButton(EDIT_BUTTON).setEnabled(templateNames.size() > 0);
}
代码示例来源:origin: BiglySoftware/BiglyBT
private void computeSaveEnable()
{
boolean enabled = anonymous || !("".equals(currentName));
if ( enabled ){
TreeItem[] groupItems = treeGroups.getItems();
outer:
for(int i = 0 ; i < groupItems.length ; i++) {
TreeItem group = groupItems[i];
TreeItem[] trackerItems = group.getItems();
for(int j = 0 ; j < trackerItems.length ; j++) {
if ( ! validURL(trackerItems[j].getText())){
enabled = false;
break outer;
}
}
}
}
if ( enabled != btnSave.getEnabled()){
btnSave.setEnabled( enabled );
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
@Override
public void widgetDefaultSelected(SelectionEvent e) {
if (editEvent.getEnabled()) {
Point pt = editEvent.getLocation();
pt = e.display.map(editEvent, null, pt);
int index = table.getSelectionIndex();
if (getExampleWidgets().length > 0 && index != -1 && index < EVENT_INFO.length) {
createEditEventDialog(dialog, pt.x, pt.y, index);
}
}
}
});
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
public void updateStore() {
if (fTitleButton.getSelection())
fStore.setTitle(fTitleText.getText());
else
fStore.setTitle(""); //$NON-NLS-1$
Object[] buttons= fButtonsList.toArray();
for (int i= 0; i < buttons.length; i++) {
FlaggedButton button= (FlaggedButton) buttons[i];
if (button.getButton().getEnabled())
fStore.setBoolean(button.getFlag(), !(button.getButton().getSelection() ^ button.show()));
else
fStore.setBoolean(button.getFlag(), false == button.show());
}
if (fStyleSheetText.getEnabled())
fStore.setStyleSheet(fStyleSheetText.getText());
else
fStore.setStyleSheet(""); //$NON-NLS-1$
fStore.setHRefs(getHRefs());
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
public void updateStore() {
if (fTitleButton.getSelection())
fStore.setTitle(fTitleText.getText());
else
fStore.setTitle(""); //$NON-NLS-1$
//don't store the buttons if they are not enabled
//this will change when there is a single page aimed at the standard doclet
if (true) {
Object[] buttons= fButtonsList.toArray();
for (int i= 0; i < buttons.length; i++) {
FlaggedButton button= (FlaggedButton) buttons[i];
if (button.getButton().getEnabled())
fStore.setBoolean(button.getFlag(), !(button.getButton().getSelection() ^ button.show()));
else
fStore.setBoolean(button.getFlag(), false == button.show());
}
}
if (fStyleSheetText.getEnabled())
fStore.setStyleSheet(fStyleSheetText.getText());
else
fStore.setStyleSheet(""); //$NON-NLS-1$
fStore.setHRefs(getHRefs());
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
private void updateUIStatus() {
getRefactoringWizard().setForcePreviewReview(false);
JavaMoveProcessor processor= getJavaMoveProcessor();
if (fReferenceCheckbox != null){
processor.setUpdateReferences(fReferenceCheckbox.getSelection());
}
if (fQualifiedNameCheckbox != null){
boolean enabled= processor.canEnableQualifiedNameUpdating();
fQualifiedNameCheckbox.setEnabled(enabled);
if (enabled) {
fQualifiedNameComponent.setEnabled(processor.getUpdateQualifiedNames());
if (processor.getUpdateQualifiedNames())
getRefactoringWizard().setForcePreviewReview(true);
} else {
fQualifiedNameComponent.setEnabled(false);
}
processor.setUpdateQualifiedNames(fQualifiedNameCheckbox.getEnabled() && fQualifiedNameCheckbox.getSelection());
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
public void updateStore() {
if (fTitleButton.getSelection())
fStore.setTitle(fTitleText.getText());
else
fStore.setTitle(""); //$NON-NLS-1$
//don't store the buttons if they are not enabled
//this will change when there is a single page aimed at the standard doclet
if (true) {
Object[] buttons= fButtonsList.toArray();
for (int i= 0; i < buttons.length; i++) {
FlaggedButton button= (FlaggedButton) buttons[i];
if (button.getButton().getEnabled())
fStore.setBoolean(button.getFlag(), !(button.getButton().getSelection() ^ button.show()));
else
fStore.setBoolean(button.getFlag(), false == button.show());
}
}
if (fStyleSheetText.getEnabled())
fStore.setStyleSheet(fStyleSheetText.getText());
else
fStore.setStyleSheet(""); //$NON-NLS-1$
fStore.setHRefs(getHRefs());
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
private void updateUIStatus() {
getRefactoringWizard().setForcePreviewReview(false);
JavaMoveProcessor processor= getJavaMoveProcessor();
if (fReferenceCheckbox != null){
processor.setUpdateReferences(fReferenceCheckbox.getSelection());
}
if (fQualifiedNameCheckbox != null){
boolean enabled= processor.canEnableQualifiedNameUpdating();
fQualifiedNameCheckbox.setEnabled(enabled);
if (enabled) {
fQualifiedNameComponent.setEnabled(processor.getUpdateQualifiedNames());
if (processor.getUpdateQualifiedNames())
getRefactoringWizard().setForcePreviewReview(true);
} else {
fQualifiedNameComponent.setEnabled(false);
}
processor.setUpdateQualifiedNames(fQualifiedNameCheckbox.getEnabled() && fQualifiedNameCheckbox.getSelection());
}
}
内容来源于网络,如有侵权,请联系作者删除!