|
|
@ -212,8 +212,8 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce |
|
|
|
toolSettingsPanel = new javax.swing.JPanel(); |
|
|
|
toolSettingsPanel = new javax.swing.JPanel(); |
|
|
|
radiusLabel = new javax.swing.JLabel(); |
|
|
|
radiusLabel = new javax.swing.JLabel(); |
|
|
|
radiusSlider = new javax.swing.JSlider(); |
|
|
|
radiusSlider = new javax.swing.JSlider(); |
|
|
|
heightSlider = new javax.swing.JSlider(); |
|
|
|
|
|
|
|
heightLabel = new javax.swing.JLabel(); |
|
|
|
heightLabel = new javax.swing.JLabel(); |
|
|
|
|
|
|
|
heightSlider = new javax.swing.JSlider(); |
|
|
|
paintingPanel = new javax.swing.JPanel(); |
|
|
|
paintingPanel = new javax.swing.JPanel(); |
|
|
|
jScrollPane2 = new javax.swing.JScrollPane(); |
|
|
|
jScrollPane2 = new javax.swing.JScrollPane(); |
|
|
|
textureTable = new javax.swing.JTable(); |
|
|
|
textureTable = new javax.swing.JTable(); |
|
|
@ -238,7 +238,7 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce |
|
|
|
eraseButton = new javax.swing.JToggleButton(); |
|
|
|
eraseButton = new javax.swing.JToggleButton(); |
|
|
|
|
|
|
|
|
|
|
|
textureFileChooser.setApproveButtonText(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.textureFileChooser.approveButtonText_1")); // NOI18N
|
|
|
|
textureFileChooser.setApproveButtonText(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.textureFileChooser.approveButtonText_1")); // NOI18N
|
|
|
|
textureFileChooser.setCurrentDirectory(new java.io.File("C:\\Assets\\Textures")); |
|
|
|
textureFileChooser.setCurrentDirectory(new java.io.File("/Assets/Textures")); |
|
|
|
textureFileChooser.setDialogTitle(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.textureFileChooser.dialogTitle_1")); // NOI18N
|
|
|
|
textureFileChooser.setDialogTitle(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.textureFileChooser.dialogTitle_1")); // NOI18N
|
|
|
|
textureFileChooser.setFileFilter(new ImageFilter()); |
|
|
|
textureFileChooser.setFileFilter(new ImageFilter()); |
|
|
|
|
|
|
|
|
|
|
@ -258,16 +258,18 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce |
|
|
|
hintPanel.setLayout(hintPanelLayout); |
|
|
|
hintPanel.setLayout(hintPanelLayout); |
|
|
|
hintPanelLayout.setHorizontalGroup( |
|
|
|
hintPanelLayout.setHorizontalGroup( |
|
|
|
hintPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
|
|
hintPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
|
|
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 283, Short.MAX_VALUE) |
|
|
|
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE) |
|
|
|
); |
|
|
|
); |
|
|
|
hintPanelLayout.setVerticalGroup( |
|
|
|
hintPanelLayout.setVerticalGroup( |
|
|
|
hintPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
|
|
hintPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
|
|
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 151, Short.MAX_VALUE) |
|
|
|
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE) |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
toolSettingsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.toolSettingsPanel.border.title"))); // NOI18N
|
|
|
|
toolSettingsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.toolSettingsPanel.border.title"))); // NOI18N
|
|
|
|
|
|
|
|
toolSettingsPanel.setLayout(new javax.swing.BoxLayout(toolSettingsPanel, javax.swing.BoxLayout.PAGE_AXIS)); |
|
|
|
|
|
|
|
|
|
|
|
org.openide.awt.Mnemonics.setLocalizedText(radiusLabel, org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.radiusLabel.text")); // NOI18N
|
|
|
|
org.openide.awt.Mnemonics.setLocalizedText(radiusLabel, org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.radiusLabel.text")); // NOI18N
|
|
|
|
|
|
|
|
toolSettingsPanel.add(radiusLabel); |
|
|
|
|
|
|
|
|
|
|
|
radiusSlider.setMajorTickSpacing(5); |
|
|
|
radiusSlider.setMajorTickSpacing(5); |
|
|
|
radiusSlider.setMaximum(20); |
|
|
|
radiusSlider.setMaximum(20); |
|
|
@ -281,6 +283,10 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce |
|
|
|
radiusSliderStateChanged(evt); |
|
|
|
radiusSliderStateChanged(evt); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
toolSettingsPanel.add(radiusSlider); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
org.openide.awt.Mnemonics.setLocalizedText(heightLabel, org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.heightLabel.text")); // NOI18N
|
|
|
|
|
|
|
|
toolSettingsPanel.add(heightLabel); |
|
|
|
|
|
|
|
|
|
|
|
heightSlider.setMajorTickSpacing(20); |
|
|
|
heightSlider.setMajorTickSpacing(20); |
|
|
|
heightSlider.setMaximum(200); |
|
|
|
heightSlider.setMaximum(200); |
|
|
@ -290,35 +296,7 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce |
|
|
|
heightSliderStateChanged(evt); |
|
|
|
heightSliderStateChanged(evt); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
toolSettingsPanel.add(heightSlider); |
|
|
|
org.openide.awt.Mnemonics.setLocalizedText(heightLabel, org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.heightLabel.text")); // NOI18N
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
javax.swing.GroupLayout toolSettingsPanelLayout = new javax.swing.GroupLayout(toolSettingsPanel); |
|
|
|
|
|
|
|
toolSettingsPanel.setLayout(toolSettingsPanelLayout); |
|
|
|
|
|
|
|
toolSettingsPanelLayout.setHorizontalGroup( |
|
|
|
|
|
|
|
toolSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
|
|
|
|
|
|
.addGroup(toolSettingsPanelLayout.createSequentialGroup() |
|
|
|
|
|
|
|
.addGroup(toolSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) |
|
|
|
|
|
|
|
.addComponent(radiusLabel) |
|
|
|
|
|
|
|
.addComponent(heightLabel)) |
|
|
|
|
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|
|
|
|
|
|
|
.addGroup(toolSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) |
|
|
|
|
|
|
|
.addComponent(heightSlider, 0, 0, Short.MAX_VALUE) |
|
|
|
|
|
|
|
.addComponent(radiusSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)) |
|
|
|
|
|
|
|
.addContainerGap(46, Short.MAX_VALUE)) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
toolSettingsPanelLayout.setVerticalGroup( |
|
|
|
|
|
|
|
toolSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
|
|
|
|
|
|
.addGroup(toolSettingsPanelLayout.createSequentialGroup() |
|
|
|
|
|
|
|
.addGroup(toolSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
|
|
|
|
|
|
.addComponent(radiusSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) |
|
|
|
|
|
|
|
.addComponent(radiusLabel)) |
|
|
|
|
|
|
|
.addGap(21, 21, 21) |
|
|
|
|
|
|
|
.addGroup(toolSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
|
|
|
|
|
|
.addComponent(heightLabel) |
|
|
|
|
|
|
|
.addComponent(heightSlider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) |
|
|
|
|
|
|
|
.addContainerGap(76, Short.MAX_VALUE)) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
paintingPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.paintingPanel.border.title"))); // NOI18N
|
|
|
|
paintingPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(TerrainEditorTopComponent.class, "TerrainEditorTopComponent.paintingPanel.border.title"))); // NOI18N
|
|
|
|
|
|
|
|
|
|
|
@ -368,7 +346,7 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce |
|
|
|
.addGroup(paintingPanelLayout.createSequentialGroup() |
|
|
|
.addGroup(paintingPanelLayout.createSequentialGroup() |
|
|
|
.addGroup(paintingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
|
|
.addGroup(paintingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
|
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, paintingPanelLayout.createSequentialGroup() |
|
|
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, paintingPanelLayout.createSequentialGroup() |
|
|
|
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 425, Short.MAX_VALUE) |
|
|
|
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) |
|
|
|
.addGroup(paintingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) |
|
|
|
.addGroup(paintingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) |
|
|
|
.addComponent(removeTextureButton, 0, 0, Short.MAX_VALUE) |
|
|
|
.addComponent(removeTextureButton, 0, 0, Short.MAX_VALUE) |
|
|
@ -377,7 +355,7 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce |
|
|
|
.addComponent(remainingTexTitleLabel) |
|
|
|
.addComponent(remainingTexTitleLabel) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) |
|
|
|
.addComponent(remainingTexturesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE) |
|
|
|
.addComponent(remainingTexturesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 228, Short.MAX_VALUE) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE) |
|
|
|
.addComponent(triPlanarCheckBox))) |
|
|
|
.addComponent(triPlanarCheckBox))) |
|
|
|
.addContainerGap()) |
|
|
|
.addContainerGap()) |
|
|
|
); |
|
|
|
); |
|
|
@ -389,7 +367,7 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce |
|
|
|
.addComponent(addTextureButton) |
|
|
|
.addComponent(addTextureButton) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|
|
|
.addComponent(removeTextureButton)) |
|
|
|
.addComponent(removeTextureButton)) |
|
|
|
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)) |
|
|
|
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 131, Short.MAX_VALUE)) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|
|
|
.addGroup(paintingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) |
|
|
|
.addGroup(paintingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) |
|
|
|
.addComponent(remainingTexTitleLabel) |
|
|
|
.addComponent(remainingTexTitleLabel) |
|
|
@ -430,7 +408,7 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce |
|
|
|
.addComponent(genEntropiesButton) |
|
|
|
.addComponent(genEntropiesButton) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|
|
|
.addComponent(jButton1) |
|
|
|
.addComponent(jButton1) |
|
|
|
.addContainerGap(99, Short.MAX_VALUE)) |
|
|
|
.addContainerGap(96, Short.MAX_VALUE)) |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
jToolBar1.setFloatable(false); |
|
|
|
jToolBar1.setFloatable(false); |
|
|
@ -539,25 +517,25 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce |
|
|
|
jPanel1Layout.setHorizontalGroup( |
|
|
|
jPanel1Layout.setHorizontalGroup( |
|
|
|
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
|
|
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
|
|
.addGroup(jPanel1Layout.createSequentialGroup() |
|
|
|
.addGroup(jPanel1Layout.createSequentialGroup() |
|
|
|
.addComponent(toolSettingsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) |
|
|
|
.addComponent(toolSettingsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|
|
|
.addComponent(paintingPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) |
|
|
|
.addComponent(paintingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|
|
|
.addComponent(terrainOpsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) |
|
|
|
.addComponent(terrainOpsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|
|
|
.addComponent(hintPanel, 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(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 1261, Short.MAX_VALUE) |
|
|
|
.addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 891, Short.MAX_VALUE) |
|
|
|
); |
|
|
|
); |
|
|
|
jPanel1Layout.setVerticalGroup( |
|
|
|
jPanel1Layout.setVerticalGroup( |
|
|
|
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
|
|
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
|
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() |
|
|
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() |
|
|
|
.addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) |
|
|
|
.addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|
|
|
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
|
|
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) |
|
|
|
.addComponent(hintPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
|
|
|
.addComponent(toolSettingsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE) |
|
|
|
.addComponent(terrainOpsPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
|
|
|
.addComponent(paintingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
|
|
|
.addComponent(paintingPanel, javax.swing.GroupLayout.Alignment.TRAILING, 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(toolSettingsPanel, javax.swing.GroupLayout.Alignment.TRAILING, 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))) |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); |
|
|
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); |
|
|
|