本文整理了Java中org.eclipse.swt.widgets.Spinner.getSelection()
方法的一些代码示例,展示了Spinner.getSelection()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Spinner.getSelection()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Spinner
类名称:Spinner
方法名:getSelection
[英]Returns the selection, which is the receiver's position.
[中]返回选择,这是接收器的位置。
代码示例来源:origin: pentaho/pentaho-kettle
private void ok() {
if ( !jobEntry.isDummy() ) {
jobEntry.setRepeat( wRepeat.getSelection() );
jobEntry.setSchedulerType( wType.getSelectionIndex() );
jobEntry.setIntervalSeconds( wIntervalSeconds.getSelection() );
jobEntry.setIntervalMinutes( wIntervalMinutes.getSelection() );
jobEntry.setHour( wHour.getSelection() );
jobEntry.setMinutes( wMinutes.getSelection() );
jobEntry.setWeekDay( wDayOfWeek.getSelectionIndex() );
jobEntry.setDayOfMonth( wDayOfMonth.getSelection() );
}
jobEntry.setName( wName.getText() );
dispose();
}
代码示例来源:origin: pentaho/pentaho-kettle
private void refreshTextNote() {
int swt = SWT.NORMAL;
if ( wFontBold.getSelection() ) {
swt = SWT.BOLD;
}
if ( wFontItalic.getSelection() ) {
swt = swt | SWT.ITALIC;
}
// dispose of old font only after setting it on wDesc
Font oldFont = font;
font = new Font( shell.getDisplay(), wFontName.getText(), wFontSize.getSelection(), swt );
wDesc.setFont( font );
if ( oldFont != null && !oldFont.isDisposed() ) {
oldFont.dispose();
}
for ( Control control : wDesc.getChildren() ) {
control.setBackground( bgColor );
}
wFontColor.setBackground( fontColor );
wBackGroundColor.setBackground( bgColor );
wBorderColor.setBackground( borderColor );
}
}
代码示例来源:origin: pentaho/pentaho-kettle
private void ok() {
notePadMeta = new NotePadMeta();
if ( wDesc.getText() != null ) {
notePadMeta.setNote( wDesc.getText() );
}
if ( wFontName.getText() != null ) {
notePadMeta.setFontName( wFontName.getText() );
}
notePadMeta.setFontSize( wFontSize.getSelection() );
notePadMeta.setFontBold( wFontBold.getSelection() );
notePadMeta.setFontItalic( wFontItalic.getSelection() );
// font color
notePadMeta.setFontColorRed( wFontColor.getBackground().getRed() );
notePadMeta.setFontColorGreen( wFontColor.getBackground().getGreen() );
notePadMeta.setFontColorBlue( wFontColor.getBackground().getBlue() );
// background color
notePadMeta.setBackGroundColorRed( wBackGroundColor.getBackground().getRed() );
notePadMeta.setBackGroundColorGreen( wBackGroundColor.getBackground().getGreen() );
notePadMeta.setBackGroundColorBlue( wBackGroundColor.getBackground().getBlue() );
// border color
notePadMeta.setBorderColorRed( wBorderColor.getBackground().getRed() );
notePadMeta.setBorderColorGreen( wBorderColor.getBackground().getGreen() );
notePadMeta.setBorderColorBlue( wBorderColor.getBackground().getBlue() );
notePadMeta.setDrawShadow( wDrawShadow.getSelection() );
dispose();
}
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void handleEvent(Event event) {
maxSize = ((Spinner) event.widget).getSelection();
refilter_dispatcher.dispatch();
}
});
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void handleEvent(Event event) {
minSize = ((Spinner) event.widget).getSelection();
refilter();
}
});
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void handleEvent(Event event) {
maxSize = ((Spinner) event.widget).getSelection();
refilter();
}
});
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
/**
* Sets the page increment of the "Example" widgets.
*/
void setWidgetPageIncrement () {
slider1.setPageIncrement (pageIncrementSpinner.getSelection ());
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
/**
* Sets the minimim of the "Example" widgets.
*/
@Override
void setWidgetMaximum () {
spinner1.setMaximum (maximumSpinner.getSelection ());
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
/**
* Sets the minimim of the "Example" widgets.
*/
@Override
void setWidgetMaximum () {
scale1.setMaximum (maximumSpinner.getSelection ());
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
/**
* Sets the increment of the "Example" widgets.
*/
void setWidgetIncrement () {
slider1.setIncrement (incrementSpinner.getSelection ());
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
private void applySpinners(boolean bar) {
if (fBlockNotification)
return;
Spinner[] spinners = bar ? fBarSpinners : fMessageSpinners;
int[] geo = new int[] {spinners[0].getSelection(), spinners[1].getSelection(), spinners[2].getSelection(), spinners[3].getSelection()};
if (bar)
getSplashInfo().setProgressGeometry(geo, false);
else
getSplashInfo().setMessageGeometry(geo, false);
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
@Override
public void widgetSelected(SelectionEvent e) {
fDialogSettings.put(PREVIEW_LINE_WIDTH_PREFERENCE_KEY, Integer.toString(lineWidthSpinner.getSelection()));
valuesModified();
}
});
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
/**
* Sets the maximum of the "Example" widgets.
*/
@Override
void setWidgetMaximum () {
progressBar1.setMaximum (maximumSpinner.getSelection ());
updateSpinners ();
}
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void handleEvent(Event event) {
GridData gridData = (GridData) cPaint.getLayoutData();
gridData.heightHint = spinnerHeight.getSelection();
cPaint.setLayoutData(gridData);
shell.layout();
}
});
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
protected void hookMaxOccur(SelectionListener adapter) {
fUnboundSelect.addSelectionListener(adapter);
fMaxOccurSpinner.addSelectionListener(adapter);
fMaxOccurSpinner.addModifyListener(e -> {
if (blockListeners())
return;
int maxValue = fMaxOccurSpinner.getSelection();
if (maxValue < getMinOccur())
fMaxOccurSpinner.setSelection(maxValue + 1);
});
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.server.ui
/**
* @see PreferencePage#performOk()
*/
public boolean performOk() {
AudioCore core = AudioCore.getInstance();
core.setSoundsEnabled(enableButton.getSelection());
core.setVolume(volume.getSelection());
core.setUserSoundMap(userSoundMap);
viewer.refresh();
return super.performOk();
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
protected void hookMinOccur(SelectionListener adapter) {
fMinOccurSpinner.addSelectionListener(adapter);
fMinOccurSpinner.addModifyListener(e -> {
if (blockListeners())
return;
int minOccur = fMinOccurSpinner.getSelection();
if (minOccur > getMaxOccur())
fMinOccurSpinner.setSelection(minOccur - 1);
});
}
代码示例来源:origin: org.eclipse/org.eclipse.ui.editors
public void widgetSelected(SelectionEvent e) {
int index= spinner.getSelection();
EnumValue value= domain.getValueByInteger(index);
IStatus status= domain.validate(value);
if (!status.matches(IStatus.ERROR))
fOverlayStore.setValue(preference.getKey(), value.getIntValue());
updateStatus(status);
}
});
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.editors
@Override
public void widgetSelected(SelectionEvent e) {
int index= spinner.getSelection();
EnumValue value= domain.getValueByInteger(index);
IStatus status= domain.validate(value);
if (!status.matches(IStatus.ERROR))
fOverlayStore.setValue(preference.getKey(), value.getIntValue());
updateStatus(status);
}
});
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
public void preserveValues( Spinner spinner ) {
preserveProperty( spinner, PROP_MINIMUM, spinner.getMinimum() );
preserveProperty( spinner, PROP_MAXIMUM, spinner.getMaximum() );
preserveProperty( spinner, PROP_SELECTION, spinner.getSelection() );
preserveProperty( spinner, PROP_DIGITS, spinner.getDigits() );
preserveProperty( spinner, PROP_INCREMENT, spinner.getIncrement() );
preserveProperty( spinner, PROP_PAGE_INCREMENT, spinner.getPageIncrement() );
preserveProperty( spinner, PROP_TEXT_LIMIT, getTextLimit( spinner ) );
preserveProperty( spinner, PROP_DECIMAL_SEPARATOR, getDecimalSeparator() );
}
内容来源于网络,如有侵权,请联系作者删除!