List of usage examples for javax.swing.event ChangeEvent getSource
public Object getSource()
From source file:com.alvermont.terraj.fracplanet.ui.ControlsDialog.java
private void snowGlacierSpinnerStateChanged(javax.swing.event.ChangeEvent evt)//GEN-FIRST:event_snowGlacierSpinnerStateChanged {//GEN-HEADEREND:event_snowGlacierSpinnerStateChanged final JSpinner source = (JSpinner) evt.getSource(); final TerrainParameters params = this.parent.getParameters().getTerrainParameters(); params.setSnowlineGlacierEffect(((float) ((Integer) source.getValue()).intValue()) / 100.0f); }
From source file:com.alvermont.terraj.fracplanet.ui.ControlsDialog.java
private void cloudsHeightSpinnerStateChanged(javax.swing.event.ChangeEvent evt)//GEN-FIRST:event_cloudsHeightSpinnerStateChanged {//GEN-HEADEREND:event_cloudsHeightSpinnerStateChanged final JSpinner source = (JSpinner) evt.getSource(); final CloudParameters params = this.parent.getParameters().getCloudParameters(); params.setHeight((Integer) source.getValue()); }
From source file:com.alvermont.terraj.fracplanet.ui.ControlsDialog.java
private void snowPowerLawSpinnerStateChanged(javax.swing.event.ChangeEvent evt)//GEN-FIRST:event_snowPowerLawSpinnerStateChanged {//GEN-HEADEREND:event_snowPowerLawSpinnerStateChanged final JSpinner source = (JSpinner) evt.getSource(); final TerrainParameters params = this.parent.getParameters().getTerrainParameters(); params.setSnowlinePowerLaw(((float) ((Integer) source.getValue()).intValue()) / 100.0f); }
From source file:com.alvermont.terraj.fracplanet.ui.ControlsDialog.java
private void riverLakeSeaSpinnerStateChanged(javax.swing.event.ChangeEvent evt)//GEN-FIRST:event_riverLakeSeaSpinnerStateChanged {//GEN-HEADEREND:event_riverLakeSeaSpinnerStateChanged final JSpinner source = (JSpinner) evt.getSource(); final TerrainParameters params = this.parent.getParameters().getTerrainParameters(); params.setLakeBecomesSea(((float) ((Integer) source.getValue()).intValue()) / 100.0f); }
From source file:com.alvermont.terraj.fracplanet.ui.ControlsDialog.java
private void baseHeightSpinnerStateChanged(javax.swing.event.ChangeEvent evt)//GEN-FIRST:event_baseHeightSpinnerStateChanged {//GEN-HEADEREND:event_baseHeightSpinnerStateChanged final JSpinner source = (JSpinner) evt.getSource(); final TerrainParameters params = this.parent.getParameters().getTerrainParameters(); params.setBaseHeight(((float) ((Integer) source.getValue()).intValue()) / 100.0f); if (log.isDebugEnabled()) { log.debug("Base height set to: " + params.getBaseHeight()); }/*w ww. ja v a 2s .c o m*/ }
From source file:com.alvermont.terraj.fracplanet.ui.ControlsDialog.java
private void vertPeturbSpinnerStateChanged(javax.swing.event.ChangeEvent evt)//GEN-FIRST:event_vertPeturbSpinnerStateChanged {//GEN-HEADEREND:event_vertPeturbSpinnerStateChanged final JSpinner source = (JSpinner) evt.getSource(); final TerrainParameters params = this.parent.getParameters().getTerrainParameters(); final float value = (float) (((Integer) source.getValue()).intValue()) / 100.0f; params.getVariation().setZ(value);/* ww w.j a v a 2s . co m*/ if (log.isDebugEnabled()) { log.debug("Vertical peturbation set to: " + params.getVariation().getZ()); } }
From source file:com.alvermont.terraj.fracplanet.ui.ControlsDialog.java
private void unperturbedSpinnerStateChanged(javax.swing.event.ChangeEvent evt)//GEN-FIRST:event_unperturbedSpinnerStateChanged {//GEN-HEADEREND:event_unperturbedSpinnerStateChanged final JSpinner source = (JSpinner) evt.getSource(); final TerrainParameters params = this.parent.getParameters().getTerrainParameters(); params.setSubdivisionsUnperturbed((Integer) source.getValue()); if (log.isDebugEnabled()) { log.debug("Subdivisions set to: " + params.getSubdivisions()); }/* w w w . j av a 2 s .co m*/ }
From source file:com.alvermont.terraj.fracplanet.ui.ControlsDialog.java
private void subdivisionSpinnerStateChanged(javax.swing.event.ChangeEvent evt)//GEN-FIRST:event_subdivisionSpinnerStateChanged {//GEN-HEADEREND:event_subdivisionSpinnerStateChanged final JSpinner source = (JSpinner) evt.getSource(); final TerrainParameters params = this.parent.getParameters().getTerrainParameters(); params.setSubdivisions((Integer) source.getValue()); if (log.isDebugEnabled()) { log.debug("Subdivisions set to: " + params.getSubdivisions()); }//ww w.ja v a 2s . c om }
From source file:com.alvermont.terraj.fracplanet.ui.ControlsDialog.java
private void horizPeturbSpinnerStateChanged(javax.swing.event.ChangeEvent evt)//GEN-FIRST:event_horizPeturbSpinnerStateChanged {//GEN-HEADEREND:event_horizPeturbSpinnerStateChanged final JSpinner source = (JSpinner) evt.getSource(); final TerrainParameters params = this.parent.getParameters().getTerrainParameters(); final float value = (float) (((Integer) source.getValue()).intValue()) / 100.0f; params.getVariation().setX(value);// ww w.java 2 s .c o m if (log.isDebugEnabled()) { log.debug("Horizontal peturbation set to: " + params.getVariation().getX()); } }
From source file:com.alvermont.terraj.fracplanet.ui.ControlsDialog.java
private void framesPerSecondSpinnerStateChanged(javax.swing.event.ChangeEvent evt)//GEN-FIRST:event_framesPerSecondSpinnerStateChanged {//GEN-HEADEREND:event_framesPerSecondSpinnerStateChanged final JSpinner source = (JSpinner) evt.getSource(); this.parent.getParameters().getRenderParameters().setFpsTarget((Integer) framesPerSecondSpinner.getValue()); }