From b1b389be57e092727a73a08137d9038b45570e5a Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Fri, 22 Jul 2011 03:01:05 +0000 Subject: [PATCH] sdk : complete commit due to prior mistake in commit git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7897 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- sdk/jme3-core/nbproject/project.xml | 553 +++++++++--------- sdk/jme3-core/src/com/jme3/gde/core/layer.xml | 8 + .../jme3/gde/core/scene/SceneApplication.java | 4 - .../controller/AbstractCameraController.java | 23 +- .../controller/toolbars/Bundle.properties | 11 + .../controller/toolbars/CameraToolbar.form | 181 ++++++ .../controller/toolbars/CameraToolbar.java | 232 ++++++++ .../core/scene/controller/toolbars/back.png | Bin 0 -> 777 bytes .../core/scene/controller/toolbars/bottom.png | Bin 0 -> 760 bytes .../core/scene/controller/toolbars/front.png | Bin 0 -> 834 bytes .../core/scene/controller/toolbars/left.png | Bin 0 -> 858 bytes .../core/scene/controller/toolbars/right.png | Bin 0 -> 850 bytes .../core/scene/controller/toolbars/top.png | Bin 0 -> 765 bytes .../core/scene/controller/toolbars/user.png | Bin 0 -> 935 bytes .../SceneExplorerTopComponent.java | 2 +- .../gde/core/sceneviewer/Bundle.properties | 2 - .../sceneviewer/SceneViewerTopComponent.form | 43 -- .../sceneviewer/SceneViewerTopComponent.java | 4 +- 18 files changed, 735 insertions(+), 328 deletions(-) create mode 100644 sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/Bundle.properties create mode 100644 sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/CameraToolbar.form create mode 100644 sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/CameraToolbar.java create mode 100644 sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/back.png create mode 100644 sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/bottom.png create mode 100644 sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/front.png create mode 100644 sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/left.png create mode 100644 sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/right.png create mode 100644 sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/top.png create mode 100644 sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/user.png diff --git a/sdk/jme3-core/nbproject/project.xml b/sdk/jme3-core/nbproject/project.xml index d640317f2..7538930a1 100644 --- a/sdk/jme3-core/nbproject/project.xml +++ b/sdk/jme3-core/nbproject/project.xml @@ -1,272 +1,281 @@ - - - org.netbeans.modules.apisupport.project - - - com.jme3.gde.core - - - - com.jme3.gde.core.baselibs - - - - 1 - 0.6 - - - - com.jme3.gde.core.libraries - - - - 1 - 0.5 - - - - com.jme3.gde.core.updatecenters - - 0.6 - - - - org.netbeans.api.progress - - - - 1 - 1.16.1.1 - - - - org.netbeans.libs.javacapi - - - - 0.11.1.1 - - - - org.netbeans.modules.autoupdate.services - - 1.16.1 - - - - org.netbeans.modules.editor.lib2 - - - - 1 - 1.18.1.2 - - - - org.netbeans.modules.java.j2seproject - - - - 1 - - - - - org.netbeans.modules.java.source - - - - 0.52.2.8.8.2 - - - - org.netbeans.modules.project.ant - - - - 1 - 1.37 - - - - org.netbeans.modules.project.libraries - - - - 1 - 1.25.1 - - - - org.netbeans.modules.projectapi - - - - 1 - 1.28.1 - - - - org.netbeans.modules.projectuiapi - - - - 1 - 1.40.1.6 - - - - org.netbeans.modules.settings - - - - 1 - 1.22.1.1 - - - - org.netbeans.spi.palette - - - - 1 - 1.20.1 - - - - org.openide.actions - - - - 6.12.1.1 - - - - org.openide.awt - - - - 7.19.1.1 - - - - org.openide.dialogs - - - - 7.13.1 - - - - org.openide.explorer - - - - 6.22.2.1 - - - - org.openide.filesystems - - - - 7.32.1.1.1 - - - - org.openide.io - - - - 1.20.1 - - - - org.openide.loaders - - - - 7.10.1 - - - - org.openide.modules - - - - 7.13.1 - - - - org.openide.nodes - - - - 7.12.1.1 - - - - org.openide.text - - - - 6.27.1 - - - - org.openide.util - - - - 7.31.1.1 - - - - org.openide.util.lookup - - - - 8.3.1 - - - - org.openide.windows - - - - 6.30.1 - - - - - com.jme3.gde.core - com.jme3.gde.core.assets - com.jme3.gde.core.assets.actions - com.jme3.gde.core.assets.nodes - com.jme3.gde.core.codeless - com.jme3.gde.core.filters - com.jme3.gde.core.filters.actions - com.jme3.gde.core.filters.impl - com.jme3.gde.core.j2seproject - com.jme3.gde.core.nodes - com.jme3.gde.core.properties - com.jme3.gde.core.scene - com.jme3.gde.core.scene.actions - com.jme3.gde.core.scene.controller - com.jme3.gde.core.scene.processors - com.jme3.gde.core.sceneexplorer - com.jme3.gde.core.sceneexplorer.nodes - com.jme3.gde.core.sceneexplorer.nodes.actions - com.jme3.gde.core.sceneexplorer.nodes.actions.impl - com.jme3.gde.core.sceneexplorer.nodes.properties - com.jme3.gde.core.sceneviewer - com.jme3.gde.core.undoredo - com.jme3.gde.core.util - - - ext/DDSUtils.jar - release/modules/ext/DDSUtils.jar - - - - + + + org.netbeans.modules.apisupport.project + + + com.jme3.gde.core + + + + com.jme3.gde.core.baselibs + + + + 1 + 0.6 + + + + com.jme3.gde.core.libraries + + + + 1 + 0.5 + + + + com.jme3.gde.core.updatecenters + + 0.6 + + + + org.jdesktop.layout + + + + 1 + 1.18 + + + + org.netbeans.api.progress + + + + 1 + 1.16.1.1 + + + + org.netbeans.libs.javacapi + + + + 0.11.1.1 + + + + org.netbeans.modules.autoupdate.services + + 1.16.1 + + + + org.netbeans.modules.editor.lib2 + + + + 1 + 1.18.1.2 + + + + org.netbeans.modules.java.j2seproject + + + + 1 + + + + + org.netbeans.modules.java.source + + + + 0.52.2.8.8.2 + + + + org.netbeans.modules.project.ant + + + + 1 + 1.37 + + + + org.netbeans.modules.project.libraries + + + + 1 + 1.25.1 + + + + org.netbeans.modules.projectapi + + + + 1 + 1.28.1 + + + + org.netbeans.modules.projectuiapi + + + + 1 + 1.40.1.6 + + + + org.netbeans.modules.settings + + + + 1 + 1.22.1.1 + + + + org.netbeans.spi.palette + + + + 1 + 1.20.1 + + + + org.openide.actions + + + + 6.12.1.1 + + + + org.openide.awt + + + + 7.19.1.1 + + + + org.openide.dialogs + + + + 7.13.1 + + + + org.openide.explorer + + + + 6.22.2.1 + + + + org.openide.filesystems + + + + 7.32.1.1.1 + + + + org.openide.io + + + + 1.20.1 + + + + org.openide.loaders + + + + 7.10.1 + + + + org.openide.modules + + + + 7.13.1 + + + + org.openide.nodes + + + + 7.12.1.1 + + + + org.openide.text + + + + 6.27.1 + + + + org.openide.util + + + + 7.31.1.1 + + + + org.openide.util.lookup + + + + 8.3.1 + + + + org.openide.windows + + + + 6.30.1 + + + + + com.jme3.gde.core + com.jme3.gde.core.assets + com.jme3.gde.core.assets.actions + com.jme3.gde.core.assets.nodes + com.jme3.gde.core.codeless + com.jme3.gde.core.filters + com.jme3.gde.core.filters.actions + com.jme3.gde.core.filters.impl + com.jme3.gde.core.j2seproject + com.jme3.gde.core.nodes + com.jme3.gde.core.properties + com.jme3.gde.core.scene + com.jme3.gde.core.scene.actions + com.jme3.gde.core.scene.controller + com.jme3.gde.core.scene.processors + com.jme3.gde.core.sceneexplorer + com.jme3.gde.core.sceneexplorer.nodes + com.jme3.gde.core.sceneexplorer.nodes.actions + com.jme3.gde.core.sceneexplorer.nodes.actions.impl + com.jme3.gde.core.sceneexplorer.nodes.properties + com.jme3.gde.core.sceneviewer + com.jme3.gde.core.undoredo + com.jme3.gde.core.util + + + ext/DDSUtils.jar + release/modules/ext/DDSUtils.jar + + + + diff --git a/sdk/jme3-core/src/com/jme3/gde/core/layer.xml b/sdk/jme3-core/src/com/jme3/gde/core/layer.xml index 76ebc2ae6..fe9569bea 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/layer.xml +++ b/sdk/jme3-core/src/com/jme3/gde/core/layer.xml @@ -11,6 +11,14 @@ + + + + + + + + diff --git a/sdk/jme3-core/src/com/jme3/gde/core/scene/SceneApplication.java b/sdk/jme3-core/src/com/jme3/gde/core/scene/SceneApplication.java index 92bdc51f4..3002b7794 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/scene/SceneApplication.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/scene/SceneApplication.java @@ -470,10 +470,6 @@ public class SceneApplication extends Application implements LookupProvider, Loo }); } - public boolean toggleOrthoPerspMode() { - return camController.toggleOrthoPerspMode(); - } - public void enableWireFrame(final boolean selected) { enqueue(new Callable() { diff --git a/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/AbstractCameraController.java b/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/AbstractCameraController.java index 40a44f7d1..b003aee2a 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/AbstractCameraController.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/AbstractCameraController.java @@ -28,6 +28,7 @@ import com.jme3.app.Application; import com.jme3.app.state.AbstractAppState; import com.jme3.app.state.AppStateManager; import com.jme3.gde.core.scene.SceneApplication; +import com.jme3.gde.core.scene.controller.toolbars.CameraToolbar; import com.jme3.gde.core.sceneviewer.SceneViewerTopComponent; import com.jme3.input.InputManager; import com.jme3.input.RawInputListener; @@ -79,10 +80,24 @@ public abstract class AbstractCameraController extends AbstractAppState implemen protected boolean checkDraggedR = false; protected boolean checkReleaseLeft = false; protected boolean checkReleaseRight = false; + protected CameraToolbar camToolbar = new CameraToolbar(); public AbstractCameraController(Camera cam, InputManager inputManager) { this.cam = cam; this.inputManager = inputManager; + + java.awt.EventQueue.invokeLater(new Runnable() { + + public void run() { + + SceneViewerTopComponent svtc = SceneViewerTopComponent.findInstance(); + if (svtc != null) { + svtc.addAdditionnalToolbar(camToolbar); + } + + } + }); + } public void setMaster(Object component) { @@ -166,21 +181,19 @@ public abstract class AbstractCameraController extends AbstractAppState implemen } - public boolean toggleOrthoPerspMode() { + public void toggleOrthoPerspMode() { try { - return SceneApplication.getApplication().enqueue(new Callable() { + camToolbar.toggleOrthoMode(SceneApplication.getApplication().enqueue(new Callable() { public Boolean call() throws Exception { return doToggleOrthoPerspMode(); } - }).get(); + }).get()); } catch (InterruptedException ex) { Exceptions.printStackTrace(ex); } catch (ExecutionException ex) { Exceptions.printStackTrace(ex); } - return false; - } protected boolean doToggleOrthoPerspMode() { diff --git a/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/Bundle.properties b/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/Bundle.properties new file mode 100644 index 000000000..94cfd58da --- /dev/null +++ b/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/Bundle.properties @@ -0,0 +1,11 @@ +CameraToolbar.frontMenuItem.text=Front +CameraToolbar.rightMenuItem.text=Right +CameraToolbar.topMenuItem.text=Top +CameraToolbar.backMenuItem.text=Back +CameraToolbar.bottomMenuItem.text=Bottom +CameraToolbar.viewButton.label=User +CameraToolbar.leftMenuItem.text=Left +CameraToolbar.enableOrtho.text=Persp. +CameraToolbar.enableOrtho.textO=Ortho. +CameraToolbar.enableOrtho.toolTipText=Toggle Orthographic / Perspective view +CameraToolbar.viewButton.text=User diff --git a/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/CameraToolbar.form b/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/CameraToolbar.form new file mode 100644 index 000000000..fa2149423 --- /dev/null +++ b/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/CameraToolbar.form @@ -0,0 +1,181 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/CameraToolbar.java b/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/CameraToolbar.java new file mode 100644 index 000000000..81c848235 --- /dev/null +++ b/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/CameraToolbar.java @@ -0,0 +1,232 @@ + +/* + * NewJPanel.java

Created on 20 juil. 2011, 14:50:22 + */ +package com.jme3.gde.core.scene.controller.toolbars; + +import com.jme3.gde.core.sceneviewer.actions.ToggleOrthoPerspAction; +import javax.swing.ImageIcon; +import org.openide.util.NbBundle; + +/** + * + * @author Nehon + */ +public class CameraToolbar extends javax.swing.JToolBar { + + ImageIcon userIcon = new ImageIcon(getClass().getResource("/com/jme3/gde/core/scene/controller/toolbars/user.png")); + //toolbar actions + private ToggleOrthoPerspAction toggleOrthoPerspAction; + + /** + * Creates new form NewJPanel + */ + public CameraToolbar() { + toggleOrthoPerspAction = new ToggleOrthoPerspAction(); + initComponents(); + } + + /** This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + viewMenu = new javax.swing.JPopupMenu(); + frontMenuItem = new javax.swing.JMenuItem(); + leftMenuItem = new javax.swing.JMenuItem(); + rightMenuItem = new javax.swing.JMenuItem(); + topMenuItem = new javax.swing.JMenuItem(); + backMenuItem = new javax.swing.JMenuItem(); + bottomMenuItem = new javax.swing.JMenuItem(); + viewButton = new javax.swing.JButton(); + enableOrtho = new javax.swing.JToggleButton(); + + frontMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/jme3/gde/core/scene/controller/toolbars/front.png"))); // NOI18N + frontMenuItem.setText(org.openide.util.NbBundle.getMessage(CameraToolbar.class, "CameraToolbar.frontMenuItem.text")); // NOI18N + frontMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + frontMenuItemActionPerformed(evt); + } + }); + viewMenu.add(frontMenuItem); + + leftMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/jme3/gde/core/scene/controller/toolbars/left.png"))); // NOI18N + leftMenuItem.setText(org.openide.util.NbBundle.getMessage(CameraToolbar.class, "CameraToolbar.leftMenuItem.text")); // NOI18N + leftMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + leftMenuItemActionPerformed(evt); + } + }); + viewMenu.add(leftMenuItem); + + rightMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/jme3/gde/core/scene/controller/toolbars/right.png"))); // NOI18N + rightMenuItem.setText(org.openide.util.NbBundle.getMessage(CameraToolbar.class, "CameraToolbar.rightMenuItem.text")); // NOI18N + rightMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + rightMenuItemActionPerformed(evt); + } + }); + viewMenu.add(rightMenuItem); + + topMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/jme3/gde/core/scene/controller/toolbars/top.png"))); // NOI18N + topMenuItem.setText(org.openide.util.NbBundle.getMessage(CameraToolbar.class, "CameraToolbar.topMenuItem.text")); // NOI18N + topMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + topMenuItemActionPerformed(evt); + } + }); + viewMenu.add(topMenuItem); + + backMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/jme3/gde/core/scene/controller/toolbars/back.png"))); // NOI18N + backMenuItem.setText(org.openide.util.NbBundle.getMessage(CameraToolbar.class, "CameraToolbar.backMenuItem.text")); // NOI18N + backMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + backMenuItemActionPerformed(evt); + } + }); + viewMenu.add(backMenuItem); + + bottomMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/jme3/gde/core/scene/controller/toolbars/bottom.png"))); // NOI18N + bottomMenuItem.setText(org.openide.util.NbBundle.getMessage(CameraToolbar.class, "CameraToolbar.bottomMenuItem.text")); // NOI18N + bottomMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + bottomMenuItemActionPerformed(evt); + } + }); + viewMenu.add(bottomMenuItem); + + viewButton.setFont(new java.awt.Font("Tahoma", 0, 8)); // NOI18N + viewButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/jme3/gde/core/scene/controller/toolbars/user.png"))); // NOI18N + viewButton.setText(org.openide.util.NbBundle.getMessage(CameraToolbar.class, "CameraToolbar.viewButton.text")); // NOI18N + viewButton.setFocusable(false); + viewButton.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + viewButton.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); + viewButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + viewButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + viewButtonActionPerformed(evt); + } + }); + + enableOrtho.setFont(new java.awt.Font("Tahoma", 0, 8)); // NOI18N + enableOrtho.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/jme3/gde/core/sceneviewer/icons/persp.png"))); // NOI18N + enableOrtho.setText(org.openide.util.NbBundle.getMessage(CameraToolbar.class, "CameraToolbar.enableOrtho.text")); // NOI18N + enableOrtho.setToolTipText(org.openide.util.NbBundle.getMessage(CameraToolbar.class, "CameraToolbar.enableOrtho.toolTipText")); // NOI18N + enableOrtho.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + enableOrtho.setFocusable(false); + enableOrtho.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); + enableOrtho.setMaximumSize(new java.awt.Dimension(27, 23)); + enableOrtho.setMinimumSize(new java.awt.Dimension(27, 23)); + enableOrtho.setPreferredSize(new java.awt.Dimension(50, 23)); + enableOrtho.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/com/jme3/gde/core/sceneviewer/icons/ortho.png"))); // NOI18N + enableOrtho.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + enableOrtho.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + enableOrthoActionPerformed(evt); + } + }); + + org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); + this.setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(layout.createSequentialGroup() + .add(viewButton) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(enableOrtho, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addContainerGap(96, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(viewButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 23, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(enableOrtho, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + ); + }// //GEN-END:initComponents + +private void viewButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_viewButtonActionPerformed + viewMenu.show(viewButton, viewButton.getX(), viewButton.getY() + viewButton.getHeight()); +}//GEN-LAST:event_viewButtonActionPerformed + +private void frontMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_frontMenuItemActionPerformed + toggleFrontView(); +}//GEN-LAST:event_frontMenuItemActionPerformed + +private void leftMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_leftMenuItemActionPerformed + toggleLeftView(); +}//GEN-LAST:event_leftMenuItemActionPerformed + +private void rightMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rightMenuItemActionPerformed + toggleRightView(); +}//GEN-LAST:event_rightMenuItemActionPerformed + +private void topMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_topMenuItemActionPerformed + toggleTopView(); +}//GEN-LAST:event_topMenuItemActionPerformed + +private void backMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backMenuItemActionPerformed + toggleBackView(); +}//GEN-LAST:event_backMenuItemActionPerformed + +private void bottomMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bottomMenuItemActionPerformed + toggleBottomView(); +}//GEN-LAST:event_bottomMenuItemActionPerformed + +private void enableOrthoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_enableOrthoActionPerformed + toggleOrthoPerspAction.actionPerformed(evt); +}//GEN-LAST:event_enableOrthoActionPerformed + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JMenuItem backMenuItem; + private javax.swing.JMenuItem bottomMenuItem; + private javax.swing.JToggleButton enableOrtho; + private javax.swing.JMenuItem frontMenuItem; + private javax.swing.JMenuItem leftMenuItem; + private javax.swing.JMenuItem rightMenuItem; + private javax.swing.JMenuItem topMenuItem; + private javax.swing.JButton viewButton; + private javax.swing.JPopupMenu viewMenu; + // End of variables declaration//GEN-END:variables + + public void toggleFrontView() { + viewButton.setIcon(frontMenuItem.getIcon()); + viewButton.setText(frontMenuItem.getText()); + } + + public void toggleUserView() { + viewButton.setIcon(userIcon); + viewButton.setText(NbBundle.getMessage(CameraToolbar.class, "CameraToolbar.viewButton.label")); + } + + public void toggleLeftView() { + viewButton.setIcon(leftMenuItem.getIcon()); + viewButton.setText(leftMenuItem.getText()); + } + + public void toggleRightView() { + viewButton.setIcon(rightMenuItem.getIcon()); + viewButton.setText(rightMenuItem.getText()); + } + + public void toggleBackView() { + viewButton.setIcon(backMenuItem.getIcon()); + viewButton.setText(backMenuItem.getText()); + } + + public void toggleTopView() { + viewButton.setIcon(topMenuItem.getIcon()); + viewButton.setText(topMenuItem.getText()); + } + + public void toggleBottomView() { + viewButton.setIcon(bottomMenuItem.getIcon()); + viewButton.setText(bottomMenuItem.getText()); + } + + public void toggleOrthoMode(boolean enabled) { + enableOrtho.setText(NbBundle.getMessage(CameraToolbar.class, "CameraToolbar.enableOrtho.text" + (enabled ? "O" : ""))); + enableOrtho.setSelected(enabled); + } +} diff --git a/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/back.png b/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/back.png new file mode 100644 index 0000000000000000000000000000000000000000..3b9058080f74acdc40f2ab86e8cab66c63d7154c GIT binary patch literal 777 zcmV+k1NQuhP)Nik-=8n7%A0wGwAM^8>oj<>i4 zA}Z1O8j3t}&=2=mXyQ(Tn`r4GSD&> zZ;OF1X>M_>T~@kl)23ZNIrMc^bmxF@$JEN`JHYHF!?gbJ^92F{Rum34EEv|h65*dq z%E8R^)V_hwAKE-bpXIE@mTC5quCwK@S5^|IO(rlx1TCfMUM*ufs{e`$Z8%}@Z}F&Z zD&!c3!Bg_Q6MQ9gucl&2#ASsn%8EC^)m2WA<_??|vRk*HJB~O>QqjHfRaJ;A$SA34 zc`H=bw>%8(IdC_gOe2*xkTGqp#wX(_Zft8k2N))Uq8pfx%cweW{z2Qtj{8EsKZr|L zI=kGy!aK7|s=cQ1kusJgaW1LTi34_soPX1?l)bCG=3e{N&g)zAd~kJKZqLp$==Z(% zxW(ep(TOUK%?4<4mW*L@`!-a=L^7%4P~+k5W2eqsD=Oa2sEdNy%m$?tM;hx94CLSb zF*05iiOf~;)*-k^HblnBBucQoFg)1Ya`L7x7y=J*{T^fwaIc!Cfe~S<;$UqP_4+R? zCgkSWLTs-y>p&>*D;&uGSW#B;g6EMkH^A8m{rA`SSAYQkGJJ2gPy^Hp00000NkvXX Hu0mjf5IAiY literal 0 HcmV?d00001 diff --git a/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/bottom.png b/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..0ac5c2f35c85d5629377ec0b49d057d17931eeb3 GIT binary patch literal 760 zcmVRYAaMeMWL{e zu5GtF+nHTw7l=QAgOg0Mnc02b=lxjZx-J}KVL0F-KNoWUXp#g=bKhX%)#xBK%a<)m zPbL#Fs{0Bu=U}kFa-fVWh!7v$=ObTU-`B6d&5fB+FX0HDA*y#P< zp57tbwgg-N^v!ixocjtGVaWejNa%VIN)&*K0N&?94$9RUFuMjdvjWqZOx!UI;D|tL zTRUJZ)QzG6SXMy|g*O7CFET-ZytKr|dpjUuaV~%e7xYpMR@QYtZGth9ZN@ayb_`M7 zWH11Nj)A+5P~27U0IH0jP5?rYNTQ0>W{Vc1;&>U|8R#CK`ZRmjm1MI@nHoTxFz!N` zIzSotCbF;!2eGj5v;tfW%H z>a~q=28HdaR4Ey;`f#1y*s8rJ?I${(iV98T=d!m1{g7?j-Ajv0SG*yWZAbJ6fzX18 z;)14W<4REdz^uwv=h>bY9jDKIAzV-q#@S>tnT<6xf|lw^ynXq6?0YVkj)!DF1?1Eq zl}df=zkYLYZF!-vx$#S!BjCc8fIn3(aL&QDsaLh_bpN#*s;WL*SO7wkN;bdRrMjIM3&dL{@08tc4N zUY=8wGxHemN$?aqP*YunjqXa6iUj`MUQ{!4*i`Bi+qO5-riD;i-#*3+51$(k&jy@& zBGOszlHuM^WG%)7F|$Y}Rb;bS-xX}{{`mM$rGsF;(PII zWW*r~T!#sU3e3zQs-*BIqCiQgRwbcnX>cru-}6i4dsw~ZKYd}SprDX2{$odx%YrC6 zUN}TYWoS0onlu0lvs6cjNl9|av`xr+?J6#LU|Alw3TxQ^L9{(S-`)#y>z2LF!s?>El08+=z-RA1x|UYEfG(RcmT%G;Nc# z<~5o3<9ajbfG$07VYuhc?|k1m_cDYKj6Z#VM)0D9?9>=aOJC8y_ZS38PQHIT!E5DW zUaT%)eR~gBK|;^YgIL#+!r;(u@c1hjuq+GDwee|k3}S4<0oSN^^R9lKxDFVa`!{?* zLq#Jz&xN6@Lt3eD++dZda^}mq^6JWPXM1ZjE-^E%<4lTTILk21-+)qa8U7x_vBkB@ z#Y%Dc1UM1(x(SvraFxP{qH|EHrD~+PDDA0jo zcrY9flP{l~3IH6(L2%T==_G#xoWLj+Jxl>C!-6_Mxo*Iwu)5)(tXfbkU~%DVD(Hb) zDu!1+PTm^a6z|o&9Qsm8oNfukjOI8;$4zY5|JP##RvLTjokA1L^loxPyftGysD z!im1GI@~F}u%8CX>H)#Wb8lB&2MZ@%$ z94e{<>HsRuMdB@U>4CxN0MOEzzVoAGXfyLmnEzfthOWgz1xqCzRn77%Gt|9im~;xn z9zJq%WN_C$Be2lX-M_Fgz2oMi`}Z#Kf{0p8#maKUzXNnYw2V|HLgb?$%b&a2TJE-` zy2tSQI{ScdEPOV07*qoM6N<$g7kQl5dZ)H literal 0 HcmV?d00001 diff --git a/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/right.png b/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/right.png new file mode 100644 index 0000000000000000000000000000000000000000..1159c4c809dd0f6f1ad217b3f61cc47f120b9bc1 GIT binary patch literal 850 zcmV-Y1FigtP)KorJ5$99~wByB?I zLX$R4X{p)+RXG3$mJ0$TkN_bev0eHva6{sP#FZQ3ALxk-LMj5J0$rd81Y)ZSEf6+C zQ#Wbi*seX^crK8z+!!w!&%F7)Z@ziveBa0Hv&T@CFPMLL6FxJs`1vi=hAblSmX@L6 zVHz`*zP-4E+`v{eZR~;PItbd11IHoYuf~N!fNNvDC4!YJ$u=T?3{6cBBvZ6wFLYte~vPUVM_Y1NHFw_-H-MD(`*^@^jVx$os zjoB^*a6mN7uYITD5xC6Skx2I?!cwH@xo#cs`pNYEM|a0YI57g|`EY2?@jQ4z65fYL z{Z&mzJeQ8O=LVBJ=N0i&K`405jE|kMm~d4A>+tCkK40$&HL zOSXPBEe4-1)nNEiT7@58w`ML+5e<@nxJ1EAuMp+E-npmKm#f7>yaq_MXYP}&Ynh80 z$u(VM(j91QXaEVK?FiVE?S$wvQpr#$ucYOL=Vxnx=0s{r5W}8L2G~wuqK9|y^C*?o zph6&uBBV$ZtIR>EVqoFpA|~#Q@2LTD{e!P!$<~*KVInv^jrP5$lnLg5IUZ~}$6&EW z^UIYg-pfmfZ0MP&0fx5kVSA69I$yOoQzysCM)0KFp~Z$}qoP|_E?1$@Q>thL19Slu&27J@ZYLkCm(Xc1=}t6?vsCWx7^hE<3tw@1YCvMCwQG-+zq% cY2O7H0GT<6q-^jn2LJ#707*qoM6N<$f=f<~MgRZ+ literal 0 HcmV?d00001 diff --git a/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/top.png b/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/top.png new file mode 100644 index 0000000000000000000000000000000000000000..043041f7bc88f333d15d547078e65d56ba693af4 GIT binary patch literal 765 zcmVWzj> zFv1}6D}5`oWBtwDgV(95Z3ezU%svA`X%N&}*v(ukrszS-}W-F|R^%)-R|wWxWAWL8pFEDe@NL;0MidR(ChI^#;GY{^5W=)&h*UceOu z+ZE>Ld_AwiHOm`IgDlxIaBKeS=f}sZ>h|dB+M}N{6GNu1BAs>M_yS>_q2fu&kXiSN zIMd$!T7-|@rseIbwo83WOzN))kZDC0MR@jx$_Ti0C-NT)5f~~((dKYH9}z=^kUC5= zl6DDAbIDYeSU#o&w_Jp9O0@=KFeFF-Xz7r7Id;kp;u0)wDljRpt%>R&ECL~=vFb!U zg3DA5sUMS>i4Uu=3Kcdr!q$*Ral{G8$;yQ_*>l~(iR3xNNNKOGwfh;-!;%{RJ3`B;*@Lm9OvA$D$D1qP zM}|YPZ6U)z*wnx%2?{!{$D8h+zIgQ$m4ozehZy($0{|gxgrYUi4J)39Zx4XdQw~@1 vHVeIA;qZH+M_leXQkr@Ip#1l3{3E~svtlTP;y;qA00000NkvXXu0mjfAFFCZ literal 0 HcmV?d00001 diff --git a/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/user.png b/sdk/jme3-core/src/com/jme3/gde/core/scene/controller/toolbars/user.png new file mode 100644 index 0000000000000000000000000000000000000000..bb0f2c3163f054930ab7eb389f1150255afba548 GIT binary patch literal 935 zcmV;Y16cftP)G5f(f&^JaxNx8mX(^MCO#Gj`BV@@ z?_VA&2;`u0V`0to5n;~sKJtq<$0a+51*kgzb8f;HMS9cD?1}H`IuceD5nD{1|$}V_}flM5q z!PLw%!@2iA>?+BE(C>DHnR72UXq+IRfUESm9~5FFfxe-YrOoPBmPap9+tj0- z`rV7JYbO|FD3su((`A@S8b)IosdyNpcM|!tO_U}ONsr^Fo4=y9-j0kTu8Nf`eOd1` zE+yhIN#d7n$3svSp~66fG9=?sw3-cg{zw6*Vh+}88}5_mW?wB=p1MW?*{OxKZDVoi z?i$)VU0AjS({^FGJRLk(W8A1rIs?;kaBI10efP`C7vb!YSMtTl?-?hfschkXY3A(P zzyC0Q!?0V$bS#8aB8p%z04m9F`RqOq)Q;|KC-ddkO~=0xiX8$U`Cu$csD#7isnvm@ zy>{=n#jCseFx~8G2PBjSM;{FF=SJsF_UO}ZK$LFPYBm0m*du?z_uz2Z>D>5_o2lZN zt$OXPUT^ya_&yD)>XOUw?a&K-UPv4=db?fx7o+&&|KM){1^|pEi1sjiZiD~;002ov JPDHLkV1jNn#(w|+ literal 0 HcmV?d00001 diff --git a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/SceneExplorerTopComponent.java b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/SceneExplorerTopComponent.java index b0f13252e..afb1613d9 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/SceneExplorerTopComponent.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/SceneExplorerTopComponent.java @@ -95,7 +95,7 @@ public final class SceneExplorerTopComponent extends TopComponent implements Exp CopyAction copy = SystemAction.get(CopyAction.class); getActionMap().put(copy.getActionMapKey(), ExplorerUtils.actionCopy(explorerManager)); PasteAction paste = SystemAction.get(PasteAction.class); - getActionMap().put(paste.getActionMapKey(), ExplorerUtils.actionPaste(explorerManager)); + getActionMap().put(paste.getActionMapKey(), ExplorerUtils.actionPaste(explorerManager)); DeleteAction delete = SystemAction.get(DeleteAction.class); getActionMap().put(delete.getActionMapKey(), ExplorerUtils.actionDelete(explorerManager, true)); } diff --git a/sdk/jme3-core/src/com/jme3/gde/core/sceneviewer/Bundle.properties b/sdk/jme3-core/src/com/jme3/gde/core/sceneviewer/Bundle.properties index 7e94c2681..5657de269 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/sceneviewer/Bundle.properties +++ b/sdk/jme3-core/src/com/jme3/gde/core/sceneviewer/Bundle.properties @@ -10,6 +10,4 @@ SceneViewerTopComponent.enableStats.text= SceneViewerTopComponent.jToggleButton2.AccessibleContext.accessibleName=Ortho / Persp SceneViewerTopComponent.jToggleButton1.toolTipText=show post filter effects SceneViewerTopComponent.jToggleButton1.text= -SceneViewerTopComponent.enableOrtho.text=Persp. SceneViewerTopComponent.enableOrtho.textO=Ortho. -SceneViewerTopComponent.enableOrtho.toolTipText=Toggle Orthographic / Perspective view diff --git a/sdk/jme3-core/src/com/jme3/gde/core/sceneviewer/SceneViewerTopComponent.form b/sdk/jme3-core/src/com/jme3/gde/core/sceneviewer/SceneViewerTopComponent.form index 2969cc62c..feb107e93 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/sceneviewer/SceneViewerTopComponent.form +++ b/sdk/jme3-core/src/com/jme3/gde/core/sceneviewer/SceneViewerTopComponent.form @@ -93,49 +93,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sdk/jme3-core/src/com/jme3/gde/core/sceneviewer/SceneViewerTopComponent.java b/sdk/jme3-core/src/com/jme3/gde/core/sceneviewer/SceneViewerTopComponent.java index 355eecce1..cd17f75d3 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/sceneviewer/SceneViewerTopComponent.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/sceneviewer/SceneViewerTopComponent.java @@ -324,8 +324,10 @@ public final class SceneViewerTopComponent extends TopComponent { public UndoRedo getUndoRedo() { return Lookup.getDefault().lookup(UndoRedo.class); } + public void addAdditionnalToolbar(JToolBar tb){ - jToolBar1.add(tb,4); + // jToolBar1.add(tb,4); } + }