|
@@ -19,6 +19,7 @@ import com.jme3.gde.core.sceneexplorer.nodes.JmeSpatial;
|
|
|
import com.jme3.gde.core.sceneexplorer.nodes.NodeUtility;
|
|
|
import com.jme3.gde.core.sceneviewer.SceneViewerTopComponent;
|
|
|
import com.jme3.gde.scenecomposer.tools.MoveTool;
|
|
|
+import com.jme3.gde.scenecomposer.tools.RotateTool;
|
|
|
import com.jme3.gde.scenecomposer.tools.ScaleTool;
|
|
|
import com.jme3.gde.scenecomposer.tools.SelectTool;
|
|
|
import com.jme3.math.Vector3f;
|
|
@@ -194,10 +195,14 @@ public final class SceneComposerTopComponent extends TopComponent implements Sce
|
|
|
rotateButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/jme3/gde/scenecomposer/icon_arrow_rotate_clockwise.png"))); // NOI18N
|
|
|
org.openide.awt.Mnemonics.setLocalizedText(rotateButton, org.openide.util.NbBundle.getMessage(SceneComposerTopComponent.class, "SceneComposerTopComponent.rotateButton.text")); // NOI18N
|
|
|
rotateButton.setToolTipText(org.openide.util.NbBundle.getMessage(SceneComposerTopComponent.class, "SceneComposerTopComponent.rotateButton.toolTipText")); // NOI18N
|
|
|
- rotateButton.setEnabled(false);
|
|
|
rotateButton.setFocusable(false);
|
|
|
rotateButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
|
|
|
rotateButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
|
|
|
+ rotateButton.addActionListener(new java.awt.event.ActionListener() {
|
|
|
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
|
+ rotateButtonActionPerformed(evt);
|
|
|
+ }
|
|
|
+ });
|
|
|
jToolBar1.add(rotateButton);
|
|
|
|
|
|
spatialModButtonGroup.add(scaleButton);
|
|
@@ -309,7 +314,7 @@ public final class SceneComposerTopComponent extends TopComponent implements Sce
|
|
|
jToolBar1.add(camToCursorSelectionButton);
|
|
|
jToolBar1.add(jSeparator1);
|
|
|
|
|
|
- jLabel6.setFont(new java.awt.Font("Lucida Grande", 0, 10)); // NOI18N
|
|
|
+ jLabel6.setFont(new java.awt.Font("Lucida Grande", 0, 10));
|
|
|
org.openide.awt.Mnemonics.setLocalizedText(jLabel6, org.openide.util.NbBundle.getMessage(SceneComposerTopComponent.class, "SceneComposerTopComponent.jLabel6.text")); // NOI18N
|
|
|
jToolBar1.add(jLabel6);
|
|
|
|
|
@@ -345,11 +350,11 @@ public final class SceneComposerTopComponent extends TopComponent implements Sce
|
|
|
jPanel3.setLayout(jPanel3Layout);
|
|
|
jPanel3Layout.setHorizontalGroup(
|
|
|
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
|
- .addGap(0, 131, Short.MAX_VALUE)
|
|
|
+ .addGap(0, 272, Short.MAX_VALUE)
|
|
|
);
|
|
|
jPanel3Layout.setVerticalGroup(
|
|
|
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
|
- .addGap(0, 21, Short.MAX_VALUE)
|
|
|
+ .addGap(0, 23, Short.MAX_VALUE)
|
|
|
);
|
|
|
|
|
|
jToolBar1.add(jPanel3);
|
|
@@ -429,8 +434,8 @@ public final class SceneComposerTopComponent extends TopComponent implements Sce
|
|
|
.addGap(10, 10, 10)
|
|
|
.addComponent(jLabel5)
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
|
- .addComponent(emitButton, javax.swing.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE))
|
|
|
- .addComponent(jSeparator6, javax.swing.GroupLayout.DEFAULT_SIZE, 337, Short.MAX_VALUE))
|
|
|
+ .addComponent(emitButton, javax.swing.GroupLayout.DEFAULT_SIZE, 302, Short.MAX_VALUE))
|
|
|
+ .addComponent(jSeparator6, javax.swing.GroupLayout.DEFAULT_SIZE, 357, Short.MAX_VALUE))
|
|
|
.addContainerGap())
|
|
|
);
|
|
|
jPanel4Layout.setVerticalGroup(
|
|
@@ -445,7 +450,7 @@ public final class SceneComposerTopComponent extends TopComponent implements Sce
|
|
|
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
|
.addComponent(jLabel5)
|
|
|
.addComponent(emitButton))
|
|
|
- .addContainerGap(39, Short.MAX_VALUE))
|
|
|
+ .addContainerGap(40, Short.MAX_VALUE))
|
|
|
);
|
|
|
|
|
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
|
@@ -456,7 +461,7 @@ public final class SceneComposerTopComponent extends TopComponent implements Sce
|
|
|
.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
|
.addComponent(sceneInfoPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
|
|
- .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 766, Short.MAX_VALUE)
|
|
|
+ .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 772, Short.MAX_VALUE)
|
|
|
);
|
|
|
layout.setVerticalGroup(
|
|
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
@@ -561,6 +566,12 @@ private void scaleButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-F
|
|
|
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
|
|
|
SceneApplication.getApplication().setPhysicsEnabled(false);
|
|
|
}//GEN-LAST:event_jButton3ActionPerformed
|
|
|
+
|
|
|
+ private void rotateButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rotateButtonActionPerformed
|
|
|
+ RotateTool tool = new RotateTool();
|
|
|
+ toolController.showEditTool(tool);
|
|
|
+ }//GEN-LAST:event_rotateButtonActionPerformed
|
|
|
+
|
|
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
|
|
private javax.swing.JButton camToCursorSelectionButton;
|
|
|
private javax.swing.JButton createPhysicsMeshButton;
|