org.eclipse.swt.widgets.Button.setSelection()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(11.4k)|赞(0)|评价(0)|浏览(257)

本文整理了Java中org.eclipse.swt.widgets.Button.setSelection()方法的一些代码示例,展示了Button.setSelection()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setSelection()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Button
类名称:Button
方法名:setSelection

Button.setSelection介绍

[英]Sets the selection state of the receiver, if it is of type CHECK, RADIO, or TOGGLE.

When the receiver is of type CHECK or RADIO, it is selected when it is checked. When it is of type TOGGLE, it is selected when it is pushed in.
[中]设置接收器的选择状态(如果其类型为CHECKRADIOTOGGLE
当接收器类型为CHECKRADIO时,选中时将选中该接收器。如果它是TOGGLE类型,则在推入时将选中它。

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

private void getData() {
 wStep.setSelection( searchingSteps );
 wDB.setSelection( searchingDatabases );
 wNote.setSelection( searchingNotes );
 wFilter.setText( Const.NVL( filterString, "" ) );
 wFilter.setFocus();
}

代码示例来源:origin: pentaho/pentaho-kettle

public void setActiveIgnoreLookup() {
 if ( wSkipLookup.getSelection() ) {
  wErrorIgnored.setSelection( false );
  wIgnoreFlagField.setText( "" );
 }
 wErrorIgnored.setEnabled( !wSkipLookup.getSelection() );
 wlErrorIgnored.setEnabled( !wSkipLookup.getSelection() );
 wlIgnoreFlagField.setEnabled( !wSkipLookup.getSelection() && wErrorIgnored.getSelection() );
 wIgnoreFlagField.setEnabled( !wSkipLookup.getSelection() && wErrorIgnored.getSelection() );
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Copy information from the meta-data input to the dialog fields.
 */
public void getData() {
 if ( input.getFilename() != null ) {
  wFilename.setText( input.getFilename() );
 }
 wDoNotOpenNewFileInit.setSelection( input.isDoNotOpenNewFileInit() );
 wAddToResult.setSelection( input.isAddToResultFiles() );
 wStepname.selectAll();
 wStepname.setFocus();
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Copy information from the meta-data input to the dialog fields.
 */
public void getData() {
 if ( input.getFilename() != null ) {
  wFilename.setText( input.getFilename() );
 }
 wLimit.setText( "" + input.getRowLimit() );
 wAddResult.setSelection( input.isAddResultFile() );
 wStepname.selectAll();
 wStepname.setFocus();
}

代码示例来源:origin: pentaho/pentaho-kettle

wStepname.setText( stepname );
wAccessKey.setText( Const.NVL( inputMeta.getAwsAccessKey(), "" ) );
wSecretKey.setText( Const.NVL( inputMeta.getAwsSecretKey(), "" ) );
 wIncludeFilename.setSelection( inputMeta.isIncludingFilename() );
} else {
 wFilename.setText( Const.NVL( inputMeta.getFilename(), "" ) );
wEnclosure.setText( Const.NVL( inputMeta.getEnclosure(), "" ) );
wMaxLineSize.setText( Const.NVL( inputMeta.getMaxLineSize(), "" ) );
wLazyConversion.setSelection( inputMeta.isLazyConversionActive() );
wHeaderPresent.setSelection( inputMeta.isHeaderPresent() );
wRunningInParallel.setSelection( inputMeta.isRunningInParallel() );
wRowNumField.setText( Const.NVL( inputMeta.getRowNumField(), "" ) );
wFields.optWidth( true );
wStepname.selectAll();

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Copy information from the meta-data input to the dialog fields.
 */
public void getData() {
 if ( jobEntry.getName() != null ) {
  wName.setText( jobEntry.getName() );
 }
 if ( jobEntry.arguments != null ) {
  for ( int i = 0; i < jobEntry.arguments.length; i++ ) {
   TableItem ti = wFields.table.getItem( i );
   if ( jobEntry.arguments[i] != null ) {
    ti.setText( 1, jobEntry.arguments[i] );
   }
   if ( jobEntry.filemasks[i] != null ) {
    ti.setText( 2, jobEntry.filemasks[i] );
   }
  }
  wFields.setRowNums();
  wFields.optWidth( true );
 }
 wPrevious.setSelection( jobEntry.argFromPrevious );
 wIncludeSubfolders.setSelection( jobEntry.includeSubfolders );
 wDeleteAllBefore.setSelection( jobEntry.deleteallbefore );
 wName.selectAll();
 wName.setFocus();
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Copy information from the meta-data input to the dialog fields.
 */
public void getData() {
 if ( input.getRowThreshold() != null ) {
  wRowThreshold.setText( input.getRowThreshold() );
 }
 if ( input.getMessage() != null ) {
  wMessage.setText( input.getMessage() );
 }
 wAlwaysLogRows.setSelection( input.isAlwaysLogRows() );
 wAbortButton.setSelection( input.isAbort() );
 wAbortWithErrorButton.setSelection( input.isAbortWithError() );
 wSafeStopButton.setSelection( input.isSafeStop() );
 wStepname.selectAll();
 wStepname.setFocus();
}

代码示例来源:origin: caoxinyu/RedisClient

public void setTTL(int ttl){
  if(ttl == -1){
    btnExpire.setSelection(false);
    this.ttl.setEnabled(false);
  }
  else{
    btnExpire.setSelection(true);
    labelTTL.setEnabled(true);
    this.ttl.setEnabled(true);
    this.ttl.setText(String.valueOf(ttl));
    btnApplyButton.setEnabled(false);
  }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void getData() {
 wName.setText( Const.NVL( partitionSchema.getName(), "" ) );
 refreshPartitions();
 wDynamic.setSelection( partitionSchema.isDynamicallyDefined() );
 wNumber.setText( Const.NVL( partitionSchema.getNumberOfPartitionsPerSlave(), "" ) );
 wName.setFocus();
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Copy information from the meta-data input to the dialog fields.
 */
public void getData() {
 if ( jobEntry.getName() != null ) {
  wName.setText( jobEntry.getName() );
 }
 if ( jobEntry.getFilename() != null ) {
  wFilename.setText( jobEntry.getFilename() );
 }
 wAbortExists.setSelection( jobEntry.isFailIfFileExists() );
 wAddFilenameToResult.setSelection( jobEntry.isAddFilenameToResult() );
 wName.selectAll();
 wName.setFocus();
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Copy information from the meta-data input to the dialog fields.
 */
public void getData() {
 if ( input.getRowcountField() != null ) {
  wRowcountField.setText( input.getRowcountField() );
 }
 if ( input.isOutputRowcount() ) {
  wRowcountField.setEnabled( true );
 }
 wOutputRowcount.setSelection( input.isOutputRowcount() );
 wStepname.selectAll();
 wStepname.setFocus();
}

代码示例来源:origin: caoxinyu/RedisClient

public void setTTL(int ttl){
  if(ttl == -1){
    btnExpire.setSelection(false);
    this.ttl.setEnabled(false);
  }
  else{
    btnExpire.setSelection(true);
    labelTTL.setEnabled(true);
    this.ttl.setEnabled(true);
    this.ttl.setText(String.valueOf(ttl));
    setTTLApply(false);
  }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void getData() {
 wName.setText( Const.NVL( clusterSchema.getName(), "" ) );
 wPort.setText( Const.NVL( clusterSchema.getBasePort(), "" ) );
 wBufferSize.setText( Const.NVL( clusterSchema.getSocketsBufferSize(), "" ) );
 wFlushInterval.setText( Const.NVL( clusterSchema.getSocketsFlushInterval(), "" ) );
 wCompressed.setSelection( clusterSchema.isSocketsCompressed() );
 wDynamic.setSelection( clusterSchema.isDynamic() );
 refreshSlaveServers();
 wName.setFocus();
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Copy information from the meta-data input to the dialog fields.
 */
public void getData( AutoDocMeta inputMeta ) {
 wFilenameField.setText( Const.NVL( inputMeta.getFilenameField(), "" ) );
 wFileTypeField.setText( Const.NVL( inputMeta.getFileTypeField(), "" ) );
 wTargetFilename.setText( Const.NVL( inputMeta.getTargetFilename(), "" ) );
 wOutputType.setText( inputMeta.getOutputType().name() );
 wInclName.setSelection( inputMeta.isIncludingName() );
 wInclDesc.setSelection( inputMeta.isIncludingDescription() );
 wInclExtDesc.setSelection( inputMeta.isIncludingExtendedDescription() );
 wInclCreated.setSelection( inputMeta.isIncludingCreated() );
 wInclModified.setSelection( inputMeta.isIncludingModified() );
 wInclImage.setSelection( inputMeta.isIncludingImage() );
 wInclLogging.setSelection( inputMeta.isIncludingLoggingConfiguration() );
 wInclLastExecResult.setSelection( inputMeta.isIncludingLastExecutionResult() );
 wStepname.setText( stepname );
 wStepname.selectAll();
 wStepname.setFocus();
}

代码示例来源:origin: pentaho/pentaho-kettle

public void getData() {
 wSplitfield.setText( Const.NVL( input.getSplitField(), "" ) );
 wDelimiter.setText( Const.NVL( input.getDelimiter(), "" ) );
 wValName.setText( Const.NVL( input.getNewFieldname(), "" ) );
 wInclRownum.setSelection( input.includeRowNumber() );
 wDelimiterIsRegex.setSelection( input.isDelimiterRegex() );
 if ( input.getRowNumberField() != null ) {
  wInclRownumField.setText( input.getRowNumberField() );
 }
 wResetRownum.setSelection( input.resetRowNumber() );
 wStepname.selectAll();
 wStepname.setFocus();
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Copy information from the meta-data input to the dialog fields.
 */
public void getData() {
 wName.setText( Const.NVL( input.getName(), "" ) );
 wId.setText( Const.NVL( input.getDescription(), "" ) );
 wBaseDir.setText( Const.NVL( input.getBaseDirectory(), "" ) );
 wReadOnly.setSelection( input.isReadOnly() );
 wHidesHiddenFiles.setSelection( input.isHidingHiddenFiles() );
}

代码示例来源:origin: pentaho/pentaho-kettle

public void getData() {
 wName.setText( Const.NVL( slaveServer.getName(), "" ) );
 wHostname.setText( Const.NVL( slaveServer.getHostname(), "" ) );
 wPort.setText( Const.NVL( slaveServer.getPort(), "" ) );
 wWebAppName.setText( Const.NVL( slaveServer.getWebAppName(), "" ) );
 wUsername.setText( Const.NVL( slaveServer.getUsername(), "" ) );
 wPassword.setText( Const.NVL( slaveServer.getPassword(), "" ) );
 wProxyHost.setText( Const.NVL( slaveServer.getProxyHostname(), "" ) );
 wProxyPort.setText( Const.NVL( slaveServer.getProxyPort(), "" ) );
 wNonProxyHosts.setText( Const.NVL( slaveServer.getNonProxyHosts(), "" ) );
 wMaster.setSelection( slaveServer.isMaster() );
 wSSL.setSelection( slaveServer.isSslMode() );
 wName.setFocus();
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Copy information from the meta-data input to the dialog fields.
 */
public void getData() {
 wPassAllRows.setSelection( input.isPassAllRows() );
 if ( input.getPrefix() != null ) {
  wPrefix.setText( input.getPrefix() );
 }
 if ( input.getDirectory() != null ) {
  wSpoolDir.setText( input.getDirectory() );
 }
 wCacheSize.setText( "" + input.getCacheSize() );
 wCompress.setSelection( input.getCompress() );
 wStepname.selectAll();
 wStepname.setFocus();
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Copy information from the meta-data input to the dialog fields.
 */
public void getData() {
 if ( log.isDebug() ) {
  logDebug( BaseMessages.getString( PKG, "ProcessFilesDialog.Log.GettingKeyInfo" ) );
 }
 if ( input.getDynamicSourceFileNameField() != null ) {
  wSourceFileNameField.setText( input.getDynamicSourceFileNameField() );
 }
 if ( input.getDynamicTargetFileNameField() != null ) {
  wTargetFileNameField.setText( input.getDynamicTargetFileNameField() );
 }
 wOperation.setText( ProcessFilesMeta.getOperationTypeDesc( input.getOperationType() ) );
 wAddResult.setSelection( input.isaddTargetFileNametoResult() );
 wOverwriteTarget.setSelection( input.isOverwriteTargetFile() );
 wCreateParentFolder.setSelection( input.isCreateParentFolder() );
 wSimulate.setSelection( input.isSimulate() );
 wStepname.selectAll();
 wStepname.setFocus();
}

代码示例来源:origin: pentaho/pentaho-kettle

private void updateFields( MappingIODefinition definition, boolean input, Button wMainPath, Label wlInputStep,
              Text wInputStep, Button wbInputStep, Label wlOutputStep, Text wOutputStep,
              Button wbOutputStep, Label wlDescription, Text wDescription, TableView wFieldMappings,
              Button wRenameOutput ) {
 if ( tabChanges != null ) {
  tabChanges.applyChanges();
 }
 wMainPath.setSelection( definition.isMainDataPath() );
 wInputStep.setText( Const.NVL( definition.getInputStepname(), "" ) );
 wOutputStep.setText( Const.NVL( definition.getOutputStepname(), "" ) );
 wDescription.setText( Const.NVL( definition.getDescription(), "" ) );
 setTabFlags( wMainPath, wlInputStep, wInputStep, wbInputStep, wlOutputStep, wOutputStep, wbOutputStep,
  wlDescription, wDescription );
 wFieldMappings.removeAll();
 for ( MappingValueRename valueRename : definition.getValueRenames() ) {
  TableItem tableItem = new TableItem( wFieldMappings.table, SWT.NONE );
  tableItem.setText( 1, Const.NVL( valueRename.getSourceValueName(), "" ) );
  tableItem.setText( 2, Const.NVL( valueRename.getTargetValueName(), "" ) );
 }
 wFieldMappings.removeEmptyRows();
 wFieldMappings.setRowNums();
 wFieldMappings.optWidth( true );
 if ( input ) {
  wRenameOutput.setSelection( definition.isRenamingOnOutput() );
 }
 tabChanges =
  new MappingDefinitionTab( definition, wInputStep, wOutputStep, wMainPath, wDescription, wFieldMappings );
}

相关文章

Button类方法