本文整理汇总了Java中com.google.gwt.event.dom.client.ChangeEvent.getSource方法的典型用法代码示例。如果您正苦于以下问题:Java ChangeEvent.getSource方法的具体用法?Java ChangeEvent.getSource怎么用?Java ChangeEvent.getSource使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.event.dom.client.ChangeEvent
的用法示例。
在下文中一共展示了ChangeEvent.getSource方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onChange
import com.google.gwt.event.dom.client.ChangeEvent; //导入方法依赖的package包/类
@Override
public void onChange(ChangeEvent event) {
Object source = event.getSource();
if ((source != null) && (source instanceof AnalysisWidget)) {
AnalysisWidget analysis = (AnalysisWidget) source;
applyButton.addStyleDependentName("APPLY-NEEDED");
// String v = xAnalysisWidget.getAnalysisAxis();
if (analysis.isActive()) {
tOperationsMenu.setCorrelationButtonEnabled(false);
String v = analysis.getAnalysisAxis();
setAnalysisAxes(v);
for (Iterator panelIt = xPanels.iterator(); panelIt.hasNext();) {
OutputPanel p = (OutputPanel) panelIt.next();
p.setAnalysis(analysis.getAnalysisSerializable());
}
} else {
turnOffAnalysis();
}
}
}
示例2: onChange
import com.google.gwt.event.dom.client.ChangeEvent; //导入方法依赖的package包/类
@Override
public void onChange(ChangeEvent changeEvent) {
TextBox source = (TextBox)changeEvent.getSource();
double value = Double.parseDouble(source.getValue());
if (source == _hueShiftTBox) {
_csVPanel.getViewer().scene().skyAtmosphere.hueShift = (float)value;
_hueShiftSlider.setValue((int)(value * 100));
}
else if (source == _saturationShiftTBox) {
_csVPanel.getViewer().scene().skyAtmosphere.saturationShift = (float)value;
_saturationShiftSlider.setValue((int)(value * 100));
}
else if (source == _brightnessShiftTBox) {
_csVPanel.getViewer().scene().skyAtmosphere.brightnessShift = (float)value;
_brightnessShiftSlider.setValue((int)(value * 100));
}
}
示例3: onChange
import com.google.gwt.event.dom.client.ChangeEvent; //导入方法依赖的package包/类
@Override
public void onChange(ChangeEvent event) {
TextBox source = (TextBox) event.getSource();
float value = Float.parseFloat(source.getValue());
if (source == alphaTBox) {
alphaSlider.setValue((int) (value * 100));
alpha = value;
csVPanel.getViewer().trackedEntity.model.color = new ConstantProperty<>(getColor(colorStr, alpha));
} else if (source == mixTBox) {
mixSlider.setValue((int) (value * 100));
colorBlendAmount = value;
csVPanel.getViewer().trackedEntity.model.colorBlendAmount = new ConstantProperty<>(colorBlendAmount);
} else if (source == silhouetteAlphaTBox) {
silhouetteAlphaSlider.setValue((int) (value * 100));
silhouetteAlpha = value;
csVPanel.getViewer().trackedEntity.model.silhouetteColor = new ConstantProperty<>(getColor(silhouetteColorStr, silhouetteAlpha));
} else if (source == silhouetteSizeTBox) {
silhouetteSizeSlider.setValue((int) (value * 100));
silhouetteSize = value;
csVPanel.getViewer().trackedEntity.model.silhouetteSize = new ConstantProperty<>(silhouetteSize);
}
}
示例4: onChange
import com.google.gwt.event.dom.client.ChangeEvent; //导入方法依赖的package包/类
@Override
public void onChange(ChangeEvent changeEvent) {
TextBox source = (TextBox) changeEvent.getSource();
float value = Float.parseFloat(source.getText());
if (source.equals(brightnessTBox)) {
brightnessSlider.setValue((int)(value * 100));
}
else if (source.equals(contrastTBox)) {
contrastSlider.setValue((int)(value * 100));
}
else if (source.equals(hueTBox)) {
hueSlider.setValue((int)(value * 100));
}
else if (source.equals(saturationTBox)) {
saturationSlider.setValue((int)(value * 100));
}
else if (source.equals(gammaTBox)) {
gammaSlider.setValue((int)(value * 100));
}
}
示例5: onChange
import com.google.gwt.event.dom.client.ChangeEvent; //导入方法依赖的package包/类
@Override
public void onChange(ChangeEvent event) {
TextBox w = (TextBox) event.getSource();
Widget wp = w.getParent();
Widget gp = wp.getParent();
if (gp instanceof VariableConstraintWidget) {
VariableConstraintWidget vcw = (VariableConstraintWidget) gp;
vcw.setApply(true);
}
setConstraints();
}
示例6: onChange
import com.google.gwt.event.dom.client.ChangeEvent; //导入方法依赖的package包/类
@Override
public void onChange(ChangeEvent event) {
TextBox w = (TextBox) event.getSource();
Widget wp = w.getParent();
Widget gp = wp.getParent();
if (gp instanceof VariableConstraintWidget) {
VariableConstraintWidget vcw = (VariableConstraintWidget) gp;
vcw.setApply(true);
}
setConstraints();
}
示例7: onChange
import com.google.gwt.event.dom.client.ChangeEvent; //导入方法依赖的package包/类
@Override
public void onChange(ChangeEvent changeEvent) {
TextBox source = (TextBox) changeEvent.getSource();
int value = Integer.parseInt(source.getText());
if (source.equals(pixelRangeTBox)) {
pixelRangeSlider.setValue(value);
}
else if (source.equals(minimumClusterSizeTBox)) {
minimumClusterSizeSlider.setValue(value);
}
}
示例8: onChange
import com.google.gwt.event.dom.client.ChangeEvent; //导入方法依赖的package包/类
@Override
public void onChange(ChangeEvent changeEvent) {
ListBox source = (ListBox) changeEvent.getSource();
int value = Integer.parseInt(source.getSelectedValue());
if (source.equals(commonMaterialLBox)) {
toggleRectangleVisibility();
if (value == 1) {
applyColorMaterial(rectangle);
} else if (value == 2) {
applyImageMaterial(rectangle);
}
} else if (source.equals(proceduralTexturesLBox)) {
toggleRectangleVisibility();
if (value == 1) {
applyCheckerboardMaterial(rectangle);
} else if (value == 2) {
applyDotMaterial(rectangle);
} else if (value == 3) {
applyGridMaterial(rectangle);
} else if (value == 4) {
applyStripeMaterial(rectangle);
}
} else if (source.equals(baseMaterialsLBox)) {
toggleRectangleVisibility();
if (value == 1) {
applyAlphaMapMaterial(rectangle);
} else if (value == 2) {
applyBumpMapMaterial(rectangle);
} else if (value == 3) {
applyDiffuseMaterial(rectangle);
} else if (value == 4) {
applyEmissionMapMaterial(rectangle);
} else if (value == 5) {
applyNormalMapMaterial(rectangle);
} else if (value == 6) {
applySpecularMapMaterial(rectangle);
}
} else if (source.equals(miscMaterialsLBox)) {
toggleWorldRectangleVisibility();
if (value == 1) {
applyRimLightingMaterial(worldRectangle);
} else if (value == 2) {
applyWaterMaterial(worldRectangle);
}
} else if (source.equals(exampleCompositeMaterialsLBox)) {
toggleWorldRectangleVisibility();
if (value == 1) {
applyCompositeMaterial(worldRectangle);
}
} else if (source.equals(polylineMaterialsLBox)) {
togglePolylineVisibility();
if (value == 1) {
applyPolylineArrowMaterial(polyline);
} else if (value == 2) {
applyPolylineGlowMaterial(polyline);
} else if (value == 3) {
applyPolylineOutlineMaterial(polyline);
}
}
}
示例9: onChange
import com.google.gwt.event.dom.client.ChangeEvent; //导入方法依赖的package包/类
@Override
public void onChange(ChangeEvent changeEvent) {
TextBox source = (TextBox)changeEvent.getSource();
int value = Integer.parseInt(source.getValue());
if (source == rateTBox) {
rateSlider.setValue(value);
particleSystem.rate = value;
} else if (source == sizeTBox) {
particleSystem.minimumWidth = value;
particleSystem.maximumWidth = value;
particleSystem.minimumHeight = value;
particleSystem.maximumHeight = value;
sizeSlider.setValue(value);
} else if (source == minLifeTBox) {
particleSystem.minimumLife = value;
minLifeSlider.setValue(value);
} else if (source == maxLifeTBox) {
particleSystem.maximumLife = value;
maxLifeSlider.setValue(value);
} else if (source == minSpeedTBox) {
particleSystem.minimumSpeed = value;
minSpeedSlider.setValue(value);
} else if (source == maxSpeedTBox) {
particleSystem.maximumSpeed = value;
maxSpeedSlider.setValue(value);
} else if (source == startScaleTBox) {
particleSystem.startScale = value;
startScaleSlider.setValue(value);
} else if (source == endScaleTBox) {
particleSystem.endScale = value;
endScaleSlider.setValue(value);
} else if (source == gravityTBox) {
viewModel.gravity = value;
gravitySlider.setValue(value);
} else if (source == translationXTBox) {
viewModel.transX = value;
} else if (source == translationYTBox) {
viewModel.transY = value;
} else if (source == translationZTBox) {
viewModel.transZ = value;
} else if (source == rotationHTBox) {
viewModel.heading = value;
} else if (source == rotationPTBox) {
viewModel.pitch = value;
} else if (source == rotationRTBox) {
viewModel.roll = value;
}
}
示例10: onChange
import com.google.gwt.event.dom.client.ChangeEvent; //导入方法依赖的package包/类
@Override
public void onChange(ChangeEvent event) {
Object source = event != null ? event.getSource() : null;
domainDropBox.setEnabled(false);
contextDropBox.setEnabled(false);
sourceDropBox.setEnabled(false);
ControlledVocabularyDomain domain = domains.get(domainDropBox.getSelectedIndex());
ControlledVocabularyContext context = contextDropBox.getSelectedIndex() > 0 ?
contexts.get(contextDropBox.getSelectedIndex()-1) : null;
Datasource datasource = sourceDropBox.getSelectedIndex() > 0 ?
sources.get(sourceDropBox.getSelectedIndex()-1) : null;
busyIndicator.busy();
if(source == null || domainDropBox.equals(source)) {
service.loadControlledVocabularyTerms(domain, this);
contexts.clear();
sources.clear();
contextDropBox.clear();
sourceDropBox.clear();
contextDropBox.addItem("all");
sourceDropBox.addItem("all");
for(ControlledVocabulary vocab : vocabs) {
if(vocab.getDomain().equals(domain)) {
if(!contexts.contains(vocab.getContext())) {
contexts.add(vocab.getContext());
contextDropBox.addItem(vocab.getContext().getName());
}
if(!sources.contains(vocab.getDatasource())) {
sources.add(vocab.getDatasource());
sourceDropBox.addItem(vocab.getDatasource().getAcronym());
}
}
}
} else if(contextDropBox.equals(source)) {
if(context != null) {
service.loadControlledVocabularyTerms(domain, context, this);
} else {
service.loadControlledVocabularyTerms(domain, this);
}
} else if(sourceDropBox.equals(source)) {
if(datasource != null) {
if(context != null) {
service.loadControlledVocabularyTerms(domain, context, datasource, this);
} else {
service.loadControlledVocabularyTerms(domain, datasource, this);
}
} else if(context != null) {
service.loadControlledVocabularyTerms(domain, context, this);
} else {
service.loadControlledVocabularyTerms(domain, this);
}
}
if(selection != null) {
selection.clear();
}
dataProvider.getList().clear();
}