diff --git a/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.form b/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.form index da18ec695..b7a0b5ade 100644 --- a/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.form +++ b/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.form @@ -195,7 +195,7 @@ - + @@ -205,7 +205,7 @@ - + diff --git a/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.java b/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.java index 744f1d505..1f0391101 100644 --- a/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.java +++ b/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.java @@ -270,18 +270,18 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce radiusSlider.setSnapToTicks(true); radiusSlider.setToolTipText(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.radiusSlider.toolTipText")); // NOI18N radiusSlider.setValue(5); - radiusSlider.addPropertyChangeListener(new java.beans.PropertyChangeListener() { - public void propertyChange(java.beans.PropertyChangeEvent evt) { - radiusSliderPropertyChange(evt); + radiusSlider.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent evt) { + radiusSliderStateChanged(evt); } }); heightSlider.setMajorTickSpacing(20); heightSlider.setMaximum(200); heightSlider.setPaintTicks(true); - heightSlider.addPropertyChangeListener(new java.beans.PropertyChangeListener() { - public void propertyChange(java.beans.PropertyChangeEvent evt) { - heightSliderPropertyChange(evt); + heightSlider.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent evt) { + heightSliderStateChanged(evt); } }); @@ -587,16 +587,6 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce } }//GEN-LAST:event_lowerTerrainButtonActionPerformed - private void radiusSliderPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_radiusSliderPropertyChange - if (toolController != null) - toolController.setHeightToolRadius(radiusSlider.getValue()); - }//GEN-LAST:event_radiusSliderPropertyChange - - private void heightSliderPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_heightSliderPropertyChange - if (toolController != null) - toolController.setHeightToolHeight(heightSlider.getValue()); // should always be values upto and over 100, because it will be divided by 100 - }//GEN-LAST:event_heightSliderPropertyChange - private void genEntropiesButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_genEntropiesButtonActionPerformed if (editorController != null) { setHintText("Run entropy generation when you are finished modifying the terrain's height. It is a slow process but required for some LOD operations."); @@ -672,6 +662,16 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce } }//GEN-LAST:event_levelTerrainButtonActionPerformed + private void radiusSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_radiusSliderStateChanged + if (toolController != null) + toolController.setHeightToolRadius(radiusSlider.getValue()); + }//GEN-LAST:event_radiusSliderStateChanged + + private void heightSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_heightSliderStateChanged + if (toolController != null) + toolController.setHeightToolHeight(heightSlider.getValue()); // should always be values upto and over 100, because it will be divided by 100 + }//GEN-LAST:event_heightSliderStateChanged + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton addTextureButton; private javax.swing.JButton createTerrainButton;