Example usage for javax.swing JSpinner getValue

List of usage examples for javax.swing JSpinner getValue

Introduction

In this page you can find the example usage for javax.swing JSpinner getValue.

Prototype

public Object getValue() 

Source Link

Document

Returns the current value of the model, typically this value is displayed by the editor.

Usage

From source file:com.alvermont.terraj.fracplanet.ui.ControlsDialog.java

private void riverSpinnerStateChanged(javax.swing.event.ChangeEvent evt)//GEN-FIRST:event_riverSpinnerStateChanged
{//GEN-HEADEREND:event_riverSpinnerStateChanged

    final JSpinner source = (JSpinner) evt.getSource();
    final TerrainParameters params = this.parent.getParameters().getTerrainParameters();

    params.setRivers((Integer) source.getValue());
}

From source file:com.alvermont.terraj.fracplanet.ui.ControlsDialog.java

private void cloudsSubdivisionSpinnerStateChanged(javax.swing.event.ChangeEvent evt)//GEN-FIRST:event_cloudsSubdivisionSpinnerStateChanged
{//GEN-HEADEREND:event_cloudsSubdivisionSpinnerStateChanged

    final JSpinner source = (JSpinner) evt.getSource();
    final CloudParameters params = this.parent.getParameters().getCloudParameters();

    params.setSubdivisions((Integer) source.getValue());
}

From source file:com.alvermont.terraj.fracplanet.ui.ControlsDialog.java

private void riverSeedSpinnerStateChanged(javax.swing.event.ChangeEvent evt)//GEN-FIRST:event_riverSeedSpinnerStateChanged
{//GEN-HEADEREND:event_riverSeedSpinnerStateChanged

    final JSpinner source = (JSpinner) evt.getSource();
    final TerrainParameters params = this.parent.getParameters().getTerrainParameters();

    params.setRiversSeed((Integer) source.getValue());
}

From source file:com.alvermont.terraj.fracplanet.ui.ControlsDialog.java

private void noiseTermSpinnerStateChanged(javax.swing.event.ChangeEvent evt)//GEN-FIRST:event_noiseTermSpinnerStateChanged
{//GEN-HEADEREND:event_noiseTermSpinnerStateChanged

    final JSpinner source = (JSpinner) evt.getSource();
    final TerrainParameters params = this.parent.getParameters().getTerrainParameters();

    params.setNoiseTerms((Integer) source.getValue());
}

From source file:com.alvermont.terraj.fracplanet.ui.ControlsDialog.java

private void terrainSeedSpinnerStateChanged(javax.swing.event.ChangeEvent evt)//GEN-FIRST:event_terrainSeedSpinnerStateChanged
{//GEN-HEADEREND:event_terrainSeedSpinnerStateChanged

    final JSpinner source = (JSpinner) evt.getSource();
    final TerrainParameters params = this.parent.getParameters().getTerrainParameters();

    params.setTerrainSeed((Integer) source.getValue());
}

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());
    }/*from w  w  w .  j av a  2 s.  c  o m*/
}

From source file:com.alvermont.terraj.fracplanet.ui.ControlsDialog.java

private void snowPoleSpinnerStateChanged(javax.swing.event.ChangeEvent evt)//GEN-FIRST:event_snowPoleSpinnerStateChanged
{//GEN-HEADEREND:event_snowPoleSpinnerStateChanged

    final JSpinner source = (JSpinner) evt.getSource();
    final TerrainParameters params = this.parent.getParameters().getTerrainParameters();

    params.setSnowlinePole(((float) ((Integer) source.getValue()).intValue()) / 100.0f);
}

From source file:com.alvermont.terraj.fracplanet.ui.ControlsDialog.java

private void powerLawSpinnerStateChanged(javax.swing.event.ChangeEvent evt)//GEN-FIRST:event_powerLawSpinnerStateChanged
{//GEN-HEADEREND:event_powerLawSpinnerStateChanged

    final JSpinner source = (JSpinner) evt.getSource();
    final TerrainParameters params = this.parent.getParameters().getTerrainParameters();

    params.setPowerLaw(((float) ((Integer) source.getValue()).intValue()) / 100.0f);

    if (log.isDebugEnabled()) {
        log.debug("Power law set to: " + params.getPowerLaw());
    }/*from   w w w .  j  a  va  2 s.c o  m*/
}

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());
    }//from www . j  a v  a 2 s.c  o m
}