当前位置: 首页>>代码示例>>Java>>正文


Java ChangeEvent.getSource方法代码示例

本文整理汇总了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();
        }
    }
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:21,代码来源:UI.java

示例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));
    }
}
 
开发者ID:iSergio,项目名称:gwt-cs,代码行数:18,代码来源:AtmosphereColor.java

示例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);
    }
}
 
开发者ID:iSergio,项目名称:gwt-cs,代码行数:23,代码来源:Models3DColoring.java

示例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));
    }
}
 
开发者ID:iSergio,项目名称:gwt-cs,代码行数:21,代码来源:ImageryAdjustment.java

示例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();
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:12,代码来源:Correlation.java

示例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();
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:12,代码来源:SimplePropPropViewer.java

示例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);
    }
}
 
开发者ID:iSergio,项目名称:gwt-cs,代码行数:12,代码来源:Clustering.java

示例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);
        }
    }
}
 
开发者ID:iSergio,项目名称:gwt-cs,代码行数:61,代码来源:Materials.java

示例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;
    }
}
 
开发者ID:iSergio,项目名称:gwt-cs,代码行数:49,代码来源:ParticleSystem.java

示例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();
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:67,代码来源:CrossRefPopup.java


注:本文中的com.google.gwt.event.dom.client.ChangeEvent.getSource方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。