|
|
|
@ -72,7 +72,7 @@ public final class SceneComposerTopComponent extends TopComponent implements Sce |
|
|
|
|
SceneEditorController editorController; |
|
|
|
|
private SceneRequest sentRequest; |
|
|
|
|
private SceneRequest currentRequest; |
|
|
|
|
private HelpCtx ctx = new HelpCtx("sdk.scene_composer"); |
|
|
|
|
private final HelpCtx ctx = new HelpCtx("sdk.scene_composer"); |
|
|
|
|
private ProjectAssetManager.ClassPathChangeListener listener; |
|
|
|
|
|
|
|
|
|
public SceneComposerTopComponent() { |
|
|
|
@ -88,6 +88,7 @@ public final class SceneComposerTopComponent extends TopComponent implements Sce |
|
|
|
|
* WARNING: Do NOT modify this code. The content of this method is |
|
|
|
|
* always regenerated by the Form Editor. |
|
|
|
|
*/ |
|
|
|
|
@SuppressWarnings("UnnecessaryBoxing") |
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
|
|
|
|
private void initComponents() { |
|
|
|
|
|
|
|
|
@ -353,6 +354,7 @@ public final class SceneComposerTopComponent extends TopComponent implements Sce |
|
|
|
|
}); |
|
|
|
|
jToolBar1.add(showSelectionToggleButton); |
|
|
|
|
|
|
|
|
|
showGridToggleButton.setSelected(true); |
|
|
|
|
org.openide.awt.Mnemonics.setLocalizedText(showGridToggleButton, org.openide.util.NbBundle.getMessage(SceneComposerTopComponent.class, "SceneComposerTopComponent.showGridToggleButton.text")); // NOI18N
|
|
|
|
|
showGridToggleButton.setToolTipText(org.openide.util.NbBundle.getMessage(SceneComposerTopComponent.class, "SceneComposerTopComponent.showGridToggleButton.toolTipText")); // NOI18N
|
|
|
|
|
showGridToggleButton.setFocusable(false); |
|
|
|
@ -709,6 +711,7 @@ private void jToggleSelectGeomActionPerformed(java.awt.event.ActionEvent evt) {/ |
|
|
|
|
* Gets default instance. Do not use directly: reserved for *.settings files only, |
|
|
|
|
* i.e. deserialization routines; otherwise you could get a non-deserialized instance. |
|
|
|
|
* To obtain the singleton instance, use {@link #findInstance}. |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
public static synchronized SceneComposerTopComponent getDefault() { |
|
|
|
|
if (instance == null) { |
|
|
|
@ -719,6 +722,7 @@ private void jToggleSelectGeomActionPerformed(java.awt.event.ActionEvent evt) {/ |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Obtain the SceneComposerTopComponent instance. Never call {@link #getDefault} directly! |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
public static synchronized SceneComposerTopComponent findInstance() { |
|
|
|
|
TopComponent win = WindowManager.getDefault().findTopComponent(PREFERRED_ID); |
|
|
|
@ -841,7 +845,7 @@ private void jToggleSelectGeomActionPerformed(java.awt.event.ActionEvent evt) {/ |
|
|
|
|
if (!active) { |
|
|
|
|
result.removeLookupListener(inst); |
|
|
|
|
showSelectionToggleButton.setSelected(true); |
|
|
|
|
showGridToggleButton.setSelected(false); |
|
|
|
|
showGridToggleButton.setSelected(true); |
|
|
|
|
sceneInfoLabel1.setText(""); |
|
|
|
|
sceneInfoLabel2.setText(""); |
|
|
|
|
sceneInfoLabel1.setToolTipText(""); |
|
|
|
@ -850,7 +854,7 @@ private void jToggleSelectGeomActionPerformed(java.awt.event.ActionEvent evt) {/ |
|
|
|
|
} else { |
|
|
|
|
result.addLookupListener(this); |
|
|
|
|
showSelectionToggleButton.setSelected(true); |
|
|
|
|
showGridToggleButton.setSelected(false); |
|
|
|
|
showGridToggleButton.setSelected(true); |
|
|
|
|
//TODO: threading
|
|
|
|
|
if (file != null) { |
|
|
|
|
sceneInfoLabel1.setText("Name: " + file.getNameExt()); |
|
|
|
@ -917,6 +921,7 @@ private void jToggleSelectGeomActionPerformed(java.awt.event.ActionEvent evt) {/ |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* listener for node selection changes |
|
|
|
|
* @param ev |
|
|
|
|
*/ |
|
|
|
|
public void resultChanged(LookupEvent ev) { |
|
|
|
|
if (currentRequest == null || !currentRequest.isDisplayed()) { |
|
|
|
@ -994,10 +999,11 @@ private void jToggleSelectGeomActionPerformed(java.awt.event.ActionEvent evt) {/ |
|
|
|
|
camController.setMaster(this); |
|
|
|
|
camController.enable(); |
|
|
|
|
|
|
|
|
|
toolController.setCameraController(camController); |
|
|
|
|
toolController.createOnTopToolNode(); |
|
|
|
|
SelectTool tool = new SelectTool(); |
|
|
|
|
toolController.showEditTool(tool); |
|
|
|
|
toolController.setShowSelection(true); |
|
|
|
|
toolController.setShowGrid(true); |
|
|
|
|
|
|
|
|
|
editorController.setToolController(toolController); |
|
|
|
|
toolController.refreshNonSpatialMarkers(); |
|
|
|
|