added terrain material params to terrain editor window

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8809 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
bre..ns 13 years ago
parent 9da184fcd7
commit 6ef11723a3
  1. 1
      sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/AddTerrainAction.java
  2. 5
      sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/Bundle.properties
  3. 109
      sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorController.java
  4. 1043
      sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.form
  5. 146
      sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.java
  6. 170
      sdk/nbproject/platform.properties

@ -152,6 +152,7 @@ public class AddTerrainAction extends AbstractNewSpatialWizardAction {
mat.setTexture("DiffuseMap", dirtTexture);
mat.setFloat("DiffuseMap_0_scale", TerrainEditorController.DEFAULT_TEXTURE_SCALE);
mat.setBoolean("WardIso", true);
mat.setFloat("Shininess", 0.01f);
((Node)terrain).setMaterial(mat);
((Node)terrain).setModelBound(new BoundingBox());

@ -105,3 +105,8 @@ TerrainEditorTopComponent.toolHint.none=
TerrainEditorTopComponent.toolHint.default=Switch between camera and tool controls by holding down SHIFT
TerrainEditorTopComponent.toolHint.level=Right click to set desired height value, left click to adjust height to that desired value.
TerrainEditorTopComponent.jPanel2.border.title=Material
TerrainEditorTopComponent.jLabel1.text=Shininess
TerrainEditorTopComponent.wardIsoCheckBox.text=WardIso
TerrainEditorTopComponent.shininessField.text=0.001
TerrainEditorTopComponent.shininessField.toolTipText=0 or greater

@ -53,6 +53,7 @@ import com.jme3.terrain.Terrain;
import com.jme3.texture.Texture;
import com.jme3.texture.Texture.WrapMode;
import com.jme3.util.SkyFactory;
import com.sun.imageio.plugins.common.ImageUtil;
import java.awt.image.BufferedImage;
import java.beans.PropertyChangeEvent;
import java.io.File;
@ -95,7 +96,7 @@ public class TerrainEditorController implements NodeListener {
public static final int NUM_ALPHA_TEXTURES = 3;
protected final int MAX_DIFFUSE = 12;
protected final int MAX_TEXTURES = 16-NUM_ALPHA_TEXTURES; // 16 max (diffuse and normal), minus the ones we are reserving
class TerrainSaveCookie implements SaveCookie {
JmeSpatial rootNode;
@ -213,7 +214,7 @@ public class TerrainEditorController implements NodeListener {
return null;
}
/**
* Perform the actual height modification on the terrain.
* @param worldLoc the location in the world where the tool was activated
@ -454,7 +455,7 @@ public class TerrainEditorController implements NodeListener {
String path = texturePath;
if (texturePath == null || texturePath.equals(""))
path = DEFAULT_TERRAIN_TEXTURE;
Texture tex = SceneApplication.getApplication().getAssetManager().loadTexture(path);
setDiffuseTexture(layer, tex);
}
@ -1024,6 +1025,108 @@ public class TerrainEditorController implements NodeListener {
}
}
}
protected void setShininess(final float shininess) {
if (SceneApplication.getApplication().isOgl()) {
Terrain terrain = (Terrain) getTerrain(null);
if (terrain == null)
return;
terrain.getMaterial().setFloat("Shininess", shininess);
setNeedsSave(true);
} else {
SceneApplication.getApplication().enqueue(new Callable<Object>() {
public Object call() throws Exception {
setShininess(shininess);
return null;
}
});
}
}
protected float getShininess() {
if (SceneApplication.getApplication().isOgl()) {
Terrain terrain = (Terrain) getTerrain(null);
if (terrain == null)
return 0;
MatParam param = terrain.getMaterial().getParam("Shininess");
if (param != null)
return (Float)param.getValue();
return 0;
} else {
try {
Float shininess = SceneApplication.getApplication().enqueue(new Callable<Float>() {
public Float call() throws Exception {
return getShininess();
}
}).get();
return shininess;
} catch (InterruptedException ex) {
Exceptions.printStackTrace(ex);
} catch (ExecutionException ex) {
Exceptions.printStackTrace(ex);
}
return 0;
}
}
protected void setWardIsoEnabled(final boolean enabled) {
if (SceneApplication.getApplication().isOgl()) {
Terrain terrain = (Terrain) getTerrain(null);
if (terrain == null)
return;
terrain.getMaterial().setBoolean("WardIso", enabled);
setNeedsSave(true);
} else {
try {
SceneApplication.getApplication().enqueue(new Callable() {
public Object call() throws Exception {
setWardIsoEnabled(enabled);
return null;
}
}).get();
} catch (InterruptedException ex) {
Exceptions.printStackTrace(ex);
} catch (ExecutionException ex) {
Exceptions.printStackTrace(ex);
}
}
}
protected boolean isWardIsoEnabled() {
if (SceneApplication.getApplication().isOgl()) {
Terrain terrain = (Terrain) getTerrain(null);
if (terrain == null)
return false;
MatParam param = terrain.getMaterial().getParam("WardIso");
if (param != null)
return (Boolean)param.getValue();
return false;
} else {
try {
Boolean isEnabled =
SceneApplication.getApplication().enqueue(new Callable<Boolean>() {
public Boolean call() throws Exception {
return isWardIsoEnabled();
}
}).get();
return isEnabled;
} catch (InterruptedException ex) {
Exceptions.printStackTrace(ex);
} catch (ExecutionException ex) {
Exceptions.printStackTrace(ex);
}
return false;
}
}
public void propertyChange(PropertyChangeEvent ev) {
if (ev.getNewValue() == null && ev.getOldValue() != null) {

@ -64,6 +64,7 @@ import com.jme3.texture.Texture;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.beans.PropertyChangeEvent;
import java.io.File;
import java.io.IOException;
@ -75,7 +76,9 @@ import javax.swing.AbstractCellEditor;
import javax.swing.DefaultListSelectionModel;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.InputVerifier;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
@ -207,6 +210,7 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
terrainModButtonGroup = new ToggleButtonGroup();
textureFileChooser = new javax.swing.JFileChooser();
jScrollPane3 = new javax.swing.JScrollPane();
jPanel1 = new javax.swing.JPanel();
hintPanel = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
@ -238,12 +242,20 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
jSeparator2 = new javax.swing.JToolBar.Separator();
paintButton = new javax.swing.JToggleButton();
eraseButton = new javax.swing.JToggleButton();
jPanel2 = new javax.swing.JPanel();
wardIsoCheckBox = new javax.swing.JCheckBox();
shininessField = new javax.swing.JTextField();
jLabel1 = new javax.swing.JLabel();
textureFileChooser.setApproveButtonText(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.textureFileChooser.approveButtonText_1")); // NOI18N
textureFileChooser.setCurrentDirectory(new java.io.File("/Assets/Textures"));
textureFileChooser.setCurrentDirectory(new java.io.File("C:\\Assets\\Textures"));
textureFileChooser.setDialogTitle(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.textureFileChooser.dialogTitle_1")); // NOI18N
textureFileChooser.setFileFilter(new ImageFilter());
jScrollPane3.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
jPanel1.setMaximumSize(new java.awt.Dimension(32767, 300));
hintPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.hintPanel.border.title"))); // NOI18N
hintTextArea.setColumns(20);
@ -260,11 +272,11 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
hintPanel.setLayout(hintPanelLayout);
hintPanelLayout.setHorizontalGroup(
hintPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE)
);
hintPanelLayout.setVerticalGroup(
hintPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE)
);
toolSettingsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.toolSettingsPanel.border.title"))); // NOI18N
@ -348,7 +360,7 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
.addGroup(paintingPanelLayout.createSequentialGroup()
.addGroup(paintingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, paintingPanelLayout.createSequentialGroup()
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 303, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(paintingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(removeTextureButton, 0, 0, Short.MAX_VALUE)
@ -357,7 +369,7 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
.addComponent(remainingTexTitleLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(remainingTexturesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 106, Short.MAX_VALUE)
.addComponent(triPlanarCheckBox)))
.addContainerGap())
);
@ -369,7 +381,7 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
.addComponent(addTextureButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(removeTextureButton))
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 131, Short.MAX_VALUE))
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(paintingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(remainingTexTitleLabel)
@ -410,7 +422,7 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
.addComponent(genEntropiesButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton1)
.addContainerGap(96, Short.MAX_VALUE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jToolBar1.setFloatable(false);
@ -514,6 +526,58 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
});
jToolBar1.add(eraseButton);
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.jPanel2.border.title"))); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(wardIsoCheckBox, org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.wardIsoCheckBox.text")); // NOI18N
wardIsoCheckBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
wardIsoCheckBoxActionPerformed(evt);
}
});
shininessField.setText(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.shininessField.text")); // NOI18N
shininessField.setToolTipText(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.shininessField.toolTipText")); // NOI18N
shininessField.setInputVerifier(new ShininessVerifier());
shininessField.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
shininessFieldActionPerformed(evt);
}
});
shininessField.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
shininessFieldKeyTyped(evt);
}
});
org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.jLabel1.text")); // NOI18N
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(shininessField, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(24, 24, 24)
.addComponent(wardIsoCheckBox)))
.addContainerGap(51, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(wardIsoCheckBox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(shininessField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1))
.addContainerGap(43, Short.MAX_VALUE))
);
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
@ -523,10 +587,12 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(paintingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(terrainOpsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(terrainOpsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)
.addComponent(hintPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 891, Short.MAX_VALUE)
.addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 901, Short.MAX_VALUE)
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@ -534,21 +600,26 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
.addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(toolSettingsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE)
.addComponent(toolSettingsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 218, Short.MAX_VALUE)
.addComponent(paintingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(hintPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(terrainOpsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
.addComponent(terrainOpsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
);
jScrollPane3.setViewportView(jPanel1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 920, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 253, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents
@ -695,6 +766,28 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
setHintText((TerrainTool) null);
}
}//GEN-LAST:event_smoothTerrainButtonActionPerformed
private void shininessFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_shininessFieldActionPerformed
try {
Float f = new Float(shininessField.getText());
editorController.setShininess(Math.max(0, f));
} catch (Exception e) {
return;
}
}//GEN-LAST:event_shininessFieldActionPerformed
private void wardIsoCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_wardIsoCheckBoxActionPerformed
editorController.setWardIsoEnabled(wardIsoCheckBox.isSelected());
}//GEN-LAST:event_wardIsoCheckBoxActionPerformed
private void shininessFieldKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_shininessFieldKeyTyped
if (KeyEvent.VK_ENTER == evt.getKeyCode() ||
KeyEvent.VK_TAB == evt.getKeyCode() ){
shininessFieldActionPerformed(null);
}
}//GEN-LAST:event_shininessFieldKeyTyped
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton addTextureButton;
private javax.swing.JButton createTerrainButton;
@ -705,9 +798,12 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
private javax.swing.JPanel hintPanel;
private javax.swing.JTextArea hintTextArea;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JScrollPane jScrollPane3;
private javax.swing.JToolBar.Separator jSeparator1;
private javax.swing.JToolBar.Separator jSeparator2;
private javax.swing.JToolBar jToolBar1;
@ -722,6 +818,7 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
private javax.swing.JLabel remainingTexturesLabel;
private javax.swing.JButton removeTextureButton;
private javax.swing.JToggleButton roughTerrainButton;
private javax.swing.JTextField shininessField;
private javax.swing.JToggleButton smoothTerrainButton;
private javax.swing.ButtonGroup terrainModButtonGroup;
private javax.swing.JPanel terrainOpsPanel;
@ -729,8 +826,27 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
private javax.swing.JTable textureTable;
private javax.swing.JPanel toolSettingsPanel;
private javax.swing.JCheckBox triPlanarCheckBox;
private javax.swing.JCheckBox wardIsoCheckBox;
// End of variables declaration//GEN-END:variables
private class ShininessVerifier extends InputVerifier {
@Override
public boolean verify(JComponent input) {
if (input instanceof javax.swing.JTextField) {
String text = ((javax.swing.JTextField)input).getText();
try {
Float f = new Float(text);
if (f > 0)
return true;
} catch (Exception e) {
return false;
}
}
return false;
}
}
/**
* Gets default instance. Do not use directly: reserved for *.settings files only,
* i.e. deserialization routines; otherwise you could get a non-deserialized instance.
@ -1147,6 +1263,8 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce
editorController.enableTextureButtons();
triPlanarCheckBox.setSelected(editorController.isTriPlanarEnabled());
wardIsoCheckBox.setSelected(editorController.isWardIsoEnabled());
shininessField.setText(""+editorController.getShininess());
}
protected void clearTextureTable() {

@ -1,86 +1,84 @@
cluster.path=\
${nbplatform.active.dir}/extra:\
${nbplatform.active.dir}/ide:\
${nbplatform.active.dir}/java:\
${nbplatform.active.dir}/platform
disabled.modules=\
org.netbeans.libs.bugtracking,\
org.netbeans.libs.bugzilla,\
org.netbeans.libs.commons_net,\
org.netbeans.libs.jakarta_oro,\
org.netbeans.libs.jsr223,\
org.netbeans.libs.smack,\
org.netbeans.libs.springframework,\
org.netbeans.libs.swingx,\
org.netbeans.modules.apisupport.apidocs,\
org.netbeans.modules.bugtracking,\
org.netbeans.modules.bugtracking.bridge,\
org.netbeans.modules.bugzilla,\
org.netbeans.modules.db,\
org.netbeans.modules.db.core,\
org.netbeans.modules.db.dataview,\
org.netbeans.modules.db.drivers,\
org.netbeans.modules.db.kit,\
org.netbeans.modules.db.metadata.model,\
org.netbeans.modules.db.mysql,\
org.netbeans.modules.db.sql.editor,\
org.netbeans.modules.db.sql.visualeditor,\
org.netbeans.modules.dbapi,\
org.netbeans.modules.dbschema,\
org.netbeans.modules.derby,\
org.netbeans.modules.form,\
org.netbeans.modules.form.j2ee,\
org.netbeans.modules.form.kit,\
org.netbeans.modules.glassfish.common,\
org.netbeans.modules.hibernate,\
org.netbeans.modules.hibernatelib,\
org.netbeans.modules.hudson,\
org.netbeans.modules.hudson.ant,\
org.netbeans.modules.hudson.maven,\
org.netbeans.modules.hudson.mercurial,\
org.netbeans.modules.hudson.subversion,\
org.netbeans.modules.i18n.form,\
org.netbeans.modules.j2ee.core.utilities,\
org.netbeans.modules.j2ee.eclipselink,\
org.netbeans.modules.j2ee.eclipselinkmodelgen,\
org.netbeans.modules.j2ee.jpa.refactoring,\
org.netbeans.modules.j2ee.jpa.verification,\
org.netbeans.modules.j2ee.persistence,\
org.netbeans.modules.j2ee.persistence.kit,\
org.netbeans.modules.j2ee.toplinklib,\
org.netbeans.modules.jellytools,\
org.netbeans.modules.jellytools.ide,\
org.netbeans.modules.jellytools.java,\
org.netbeans.modules.jellytools.platform,\
org.netbeans.modules.jemmy,\
org.netbeans.modules.maven,\
org.netbeans.modules.maven.coverage,\
org.netbeans.modules.maven.embedder,\
org.netbeans.modules.maven.grammar,\
org.netbeans.modules.maven.graph,\
org.netbeans.modules.maven.hints,\
org.netbeans.modules.maven.indexer,\
org.netbeans.modules.maven.junit,\
org.netbeans.modules.maven.kit,\
org.netbeans.modules.maven.model,\
org.netbeans.modules.maven.osgi,\
org.netbeans.modules.maven.persistence,\
org.netbeans.modules.maven.repository,\
org.netbeans.modules.maven.search,\
org.netbeans.modules.maven.spring,\
org.netbeans.modules.projectimport.eclipse.j2se,\
org.netbeans.modules.server,\
org.netbeans.modules.spellchecker,\
org.netbeans.modules.spellchecker.bindings.htmlxml,\
org.netbeans.modules.spellchecker.bindings.properties,\
org.netbeans.modules.spellchecker.dictionary_en,\
org.netbeans.modules.spellchecker.kit,\
org.netbeans.modules.spring.beans,\
org.netbeans.modules.swingapp,\
org.netbeans.modules.websvc.saas.codegen.java,\
org.netbeans.modules.xml.wsdl.model,\
org.openide.compat,\
org.openide.options,\
org.openide.util.enumerations
nbjdk.active=default
nbplatform.active=default
cluster.path=\
${nbplatform.active.dir}/extra:\
${nbplatform.active.dir}/ide:\
${nbplatform.active.dir}/java:\
${nbplatform.active.dir}/platform
disabled.modules=\
org.netbeans.libs.bugtracking,\
org.netbeans.libs.bugzilla,\
org.netbeans.libs.commons_net,\
org.netbeans.libs.jakarta_oro,\
org.netbeans.libs.jsr223,\
org.netbeans.libs.smack,\
org.netbeans.libs.springframework,\
org.netbeans.libs.swingx,\
org.netbeans.modules.apisupport.apidocs,\
org.netbeans.modules.bugtracking,\
org.netbeans.modules.bugtracking.bridge,\
org.netbeans.modules.bugzilla,\
org.netbeans.modules.db,\
org.netbeans.modules.db.core,\
org.netbeans.modules.db.dataview,\
org.netbeans.modules.db.drivers,\
org.netbeans.modules.db.kit,\
org.netbeans.modules.db.metadata.model,\
org.netbeans.modules.db.mysql,\
org.netbeans.modules.db.sql.editor,\
org.netbeans.modules.db.sql.visualeditor,\
org.netbeans.modules.dbapi,\
org.netbeans.modules.dbschema,\
org.netbeans.modules.derby,\
org.netbeans.modules.form,\
org.netbeans.modules.form.j2ee,\
org.netbeans.modules.form.kit,\
org.netbeans.modules.glassfish.common,\
org.netbeans.modules.hibernate,\
org.netbeans.modules.hibernatelib,\
org.netbeans.modules.hudson,\
org.netbeans.modules.hudson.ant,\
org.netbeans.modules.hudson.maven,\
org.netbeans.modules.hudson.mercurial,\
org.netbeans.modules.hudson.subversion,\
org.netbeans.modules.i18n.form,\
org.netbeans.modules.j2ee.core.utilities,\
org.netbeans.modules.j2ee.eclipselink,\
org.netbeans.modules.j2ee.eclipselinkmodelgen,\
org.netbeans.modules.j2ee.jpa.refactoring,\
org.netbeans.modules.j2ee.jpa.verification,\
org.netbeans.modules.j2ee.persistence,\
org.netbeans.modules.j2ee.persistence.kit,\
org.netbeans.modules.j2ee.toplinklib,\
org.netbeans.modules.jellytools,\
org.netbeans.modules.jellytools.ide,\
org.netbeans.modules.jellytools.java,\
org.netbeans.modules.maven,\
org.netbeans.modules.maven.coverage,\
org.netbeans.modules.maven.embedder,\
org.netbeans.modules.maven.grammar,\
org.netbeans.modules.maven.graph,\
org.netbeans.modules.maven.hints,\
org.netbeans.modules.maven.indexer,\
org.netbeans.modules.maven.junit,\
org.netbeans.modules.maven.kit,\
org.netbeans.modules.maven.model,\
org.netbeans.modules.maven.osgi,\
org.netbeans.modules.maven.persistence,\
org.netbeans.modules.maven.repository,\
org.netbeans.modules.maven.search,\
org.netbeans.modules.maven.spring,\
org.netbeans.modules.projectimport.eclipse.j2se,\
org.netbeans.modules.server,\
org.netbeans.modules.spellchecker,\
org.netbeans.modules.spellchecker.bindings.htmlxml,\
org.netbeans.modules.spellchecker.bindings.properties,\
org.netbeans.modules.spellchecker.dictionary_en,\
org.netbeans.modules.spellchecker.kit,\
org.netbeans.modules.spring.beans,\
org.netbeans.modules.swingapp,\
org.netbeans.modules.websvc.saas.codegen.java,\
org.netbeans.modules.xml.wsdl.model,\
org.openide.compat,\
org.openide.options,\
org.openide.util.enumerations
nbjdk.active=default
nbplatform.active=default

Loading…
Cancel
Save