removed the leftovers of the terrain editor border tool

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9682 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
bre..ns 12 years ago
parent 0fe8394916
commit 2cf1455867
  1. 5
      sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/Bundle.properties
  2. 1
      sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorController.java
  3. 87
      sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.form
  4. 80
      sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.java

@ -125,15 +125,10 @@ TerrainEditorTopComponent.levelAbsoluteHeightField.text=0
TerrainEditorTopComponent.slopeTerrainButton.toolTipText=Slope terrain TerrainEditorTopComponent.slopeTerrainButton.toolTipText=Slope terrain
TerrainEditorTopComponent.slopeTerrainButton.text= TerrainEditorTopComponent.slopeTerrainButton.text=
TerrainEditorTopComponent.slopeLockCheckbox.text=Contain TerrainEditorTopComponent.slopeLockCheckbox.text=Contain
TerrainEditorTopComponent.jLabel7.text=
TerrainEditorTopComponent.borderDistanceField.text=0
TerrainEditorTopComponent.borderHeightField.text=0
TerrainEditorTopComponent.PrecisionCheckbox.text=Snap TerrainEditorTopComponent.PrecisionCheckbox.text=Snap
TerrainEditorTopComponent.PrecisionCheckbox.tooltip=Snap directly to the defined height, instead of smoothly adjusting TerrainEditorTopComponent.PrecisionCheckbox.tooltip=Snap directly to the defined height, instead of smoothly adjusting
TerrainEditorTopComponent.AbsoluteCheckbox.text=Absolute TerrainEditorTopComponent.AbsoluteCheckbox.text=Absolute
TerrainEditorTopComponent.AbsoluteCheckbox.tooltip=Define the height to adjust to, instead of using the marker TerrainEditorTopComponent.AbsoluteCheckbox.tooltip=Define the height to adjust to, instead of using the marker
TerrainEditorTopComponent.slopeLockCheckbox.tooltip=Contains the slope between the two slope nodes TerrainEditorTopComponent.slopeLockCheckbox.tooltip=Contains the slope between the two slope nodes
TerrainEditorTopComponent.borderDistanceLabel.text=Distance
TerrainEditorTopComponent.borderHeightLAbel.text=Height
TerrainEditorTopComponent.borderDistanceLabel.tooltip=Distance means how far from the terrain's edge the border will be raised (thickness of the border). TerrainEditorTopComponent.borderDistanceLabel.tooltip=Distance means how far from the terrain's edge the border will be raised (thickness of the border).
TerrainEditorTopComponent.borderHeightLAbel.tooltip=Height means how high the border will go (also accept negative values). TerrainEditorTopComponent.borderHeightLAbel.tooltip=Height means how high the border will go (also accept negative values).

@ -53,7 +53,6 @@ import com.jme3.terrain.Terrain;
import com.jme3.texture.Texture; import com.jme3.texture.Texture;
import com.jme3.texture.Texture.WrapMode; import com.jme3.texture.Texture.WrapMode;
import com.jme3.util.SkyFactory; import com.jme3.util.SkyFactory;
import com.sun.imageio.plugins.common.ImageUtil;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeEvent;
import java.io.File; import java.io.File;

@ -212,93 +212,6 @@
</Component> </Component>
</SubComponents> </SubComponents>
</Container> </Container>
<Container class="javax.swing.JPanel" name="borderBrushPanel">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="cc" green="cc" red="cc" type="rgb"/>
</Property>
<Property name="opaque" type="boolean" value="false"/>
</Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout">
<Property name="columns" type="int" value="2"/>
<Property name="rows" type="int" value="3"/>
</Layout>
<SubComponents>
<Component class="javax.swing.JCheckBox" name="borderPrecisionCheckbox">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="com/jme3/gde/terraineditor/Bundle.properties" key="TerrainEditorTopComponent.PrecisionCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="com/jme3/gde/terraineditor/Bundle.properties" key="TerrainEditorTopComponent.PrecisionCheckbox.tooltip" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="borderPrecisionCheckboxActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel7">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="com/jme3/gde/terraineditor/Bundle.properties" key="TerrainEditorTopComponent.jLabel7.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="borderDistanceLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="com/jme3/gde/terraineditor/Bundle.properties" key="TerrainEditorTopComponent.borderDistanceLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="com/jme3/gde/terraineditor/Bundle.properties" key="TerrainEditorTopComponent.borderDistanceLabel.tooltip" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JFormattedTextField" name="borderDistanceField">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="com/jme3/gde/terraineditor/Bundle.properties" key="TerrainEditorTopComponent.borderDistanceField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="com/jme3/gde/terraineditor/Bundle.properties" key="TerrainEditorTopComponent.borderDistanceLabel.tooltip" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="keyTyped" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="borderDistanceFieldKeyTyped"/>
</Events>
<AuxValues>
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JFormattedTextField(NumberFormat.getInstance())"/>
</AuxValues>
</Component>
<Component class="javax.swing.JLabel" name="borderHeightLAbel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="com/jme3/gde/terraineditor/Bundle.properties" key="TerrainEditorTopComponent.borderHeightLAbel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="com/jme3/gde/terraineditor/Bundle.properties" key="TerrainEditorTopComponent.borderHeightLAbel.tooltip" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JFormattedTextField" name="borderHeightField">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="com/jme3/gde/terraineditor/Bundle.properties" key="TerrainEditorTopComponent.borderHeightField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="com/jme3/gde/terraineditor/Bundle.properties" key="TerrainEditorTopComponent.borderHeightLAbel.tooltip" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="keyTyped" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="borderHeightFieldKeyTyped"/>
</Events>
<AuxValues>
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JFormattedTextField(NumberFormat.getInstance())"/>
</AuxValues>
</Component>
</SubComponents>
</Container>
</NonVisualComponents> </NonVisualComponents>
<Properties> <Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">

@ -240,13 +240,6 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
slopeBrushPanel = new javax.swing.JPanel(); slopeBrushPanel = new javax.swing.JPanel();
slopePrecisionCheckbox = new javax.swing.JCheckBox(); slopePrecisionCheckbox = new javax.swing.JCheckBox();
slopeLockCheckbox = new javax.swing.JCheckBox(); slopeLockCheckbox = new javax.swing.JCheckBox();
borderBrushPanel = new javax.swing.JPanel();
borderPrecisionCheckbox = new javax.swing.JCheckBox();
jLabel7 = new javax.swing.JLabel();
borderDistanceLabel = new javax.swing.JLabel();
borderDistanceField = new javax.swing.JFormattedTextField(NumberFormat.getInstance());
borderHeightLAbel = new javax.swing.JLabel();
borderHeightField = new javax.swing.JFormattedTextField(NumberFormat.getInstance());
jToolBar1 = new javax.swing.JToolBar(); jToolBar1 = new javax.swing.JToolBar();
createTerrainButton = new javax.swing.JButton(); createTerrainButton = new javax.swing.JButton();
jSeparator1 = new javax.swing.JToolBar.Separator(); jSeparator1 = new javax.swing.JToolBar.Separator();
@ -399,48 +392,6 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
}); });
slopeBrushPanel.add(slopeLockCheckbox); slopeBrushPanel.add(slopeLockCheckbox);
borderBrushPanel.setBackground(new java.awt.Color(204, 204, 204));
borderBrushPanel.setOpaque(false);
borderBrushPanel.setLayout(new java.awt.GridLayout(3, 2));
org.openide.awt.Mnemonics.setLocalizedText(borderPrecisionCheckbox, org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.PrecisionCheckbox.text")); // NOI18N
borderPrecisionCheckbox.setToolTipText(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.PrecisionCheckbox.tooltip")); // NOI18N
borderPrecisionCheckbox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
borderPrecisionCheckboxActionPerformed(evt);
}
});
borderBrushPanel.add(borderPrecisionCheckbox);
org.openide.awt.Mnemonics.setLocalizedText(jLabel7, org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.jLabel7.text")); // NOI18N
borderBrushPanel.add(jLabel7);
org.openide.awt.Mnemonics.setLocalizedText(borderDistanceLabel, org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.borderDistanceLabel.text")); // NOI18N
borderDistanceLabel.setToolTipText(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.borderDistanceLabel.tooltip")); // NOI18N
borderBrushPanel.add(borderDistanceLabel);
borderDistanceField.setText(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.borderDistanceField.text")); // NOI18N
borderDistanceField.setToolTipText(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.borderDistanceLabel.tooltip")); // NOI18N
borderDistanceField.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
borderDistanceFieldKeyTyped(evt);
}
});
borderBrushPanel.add(borderDistanceField);
org.openide.awt.Mnemonics.setLocalizedText(borderHeightLAbel, org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.borderHeightLAbel.text")); // NOI18N
borderHeightLAbel.setToolTipText(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.borderHeightLAbel.tooltip")); // NOI18N
borderBrushPanel.add(borderHeightLAbel);
borderHeightField.setText(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.borderHeightField.text")); // NOI18N
borderHeightField.setToolTipText(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.borderHeightLAbel.tooltip")); // NOI18N
borderHeightField.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
borderHeightFieldKeyTyped(evt);
}
});
borderBrushPanel.add(borderHeightField);
setBackground(java.awt.Color.gray); setBackground(java.awt.Color.gray);
jToolBar1.setBackground(new java.awt.Color(204, 204, 204)); jToolBar1.setBackground(new java.awt.Color(204, 204, 204));
@ -998,26 +949,8 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
levelAbsoluteHeightField.setEnabled(levelAbsoluteCheckbox.isEnabled()); levelAbsoluteHeightField.setEnabled(levelAbsoluteCheckbox.isEnabled());
}//GEN-LAST:event_levelAbsoluteCheckboxActionPerformed }//GEN-LAST:event_levelAbsoluteCheckboxActionPerformed
private void borderPrecisionCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_borderPrecisionCheckboxActionPerformed
updateBorderToolParams();
}//GEN-LAST:event_borderPrecisionCheckboxActionPerformed
private void borderDistanceFieldKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_borderDistanceFieldKeyTyped
updateBorderToolParams();
}//GEN-LAST:event_borderDistanceFieldKeyTyped
private void borderHeightFieldKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_borderHeightFieldKeyTyped
updateBorderToolParams();
}//GEN-LAST:event_borderHeightFieldKeyTyped
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton addTextureButton; private javax.swing.JButton addTextureButton;
private javax.swing.JPanel borderBrushPanel;
private javax.swing.JFormattedTextField borderDistanceField;
private javax.swing.JLabel borderDistanceLabel;
private javax.swing.JFormattedTextField borderHeightField;
private javax.swing.JLabel borderHeightLAbel;
private javax.swing.JCheckBox borderPrecisionCheckbox;
private javax.swing.JButton createTerrainButton; private javax.swing.JButton createTerrainButton;
private javax.swing.JToggleButton eraseButton; private javax.swing.JToggleButton eraseButton;
private javax.swing.JPanel fractalBrushPanel; private javax.swing.JPanel fractalBrushPanel;
@ -1029,7 +962,6 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JPanel jPanel2; private javax.swing.JPanel jPanel2;
private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2; private javax.swing.JScrollPane jScrollPane2;
@ -1125,16 +1057,6 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
} catch (NumberFormatException e) {} } catch (NumberFormatException e) {}
} }
private void updateBorderToolParams() {
try {
BorderExtraToolParams params = new BorderExtraToolParams();
params.precision = borderPrecisionCheckbox.isSelected();
params.height = new Float(borderHeightField.getText());
params.distance = new Float(borderDistanceField.getText());
toolController.setExtraToolParams(params);
} catch (NumberFormatException e) {}
}
private void updateRoughenFractalToolParams() { private void updateRoughenFractalToolParams() {
try { try {
RoughExtraToolParams params = new RoughExtraToolParams(); RoughExtraToolParams params = new RoughExtraToolParams();
@ -1157,8 +1079,6 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
updateLevelToolParams(); updateLevelToolParams();
else if (toolController.getCurrentTerrainTool().getClass() == SlopeTerrainTool.class) else if (toolController.getCurrentTerrainTool().getClass() == SlopeTerrainTool.class)
updateSlopeToolParams(); updateSlopeToolParams();
else if (toolController.getCurrentTerrainTool().getClass() == BorderTerrainTool.class)
updateBorderToolParams();
} }
} }

Loading…
Cancel
Save