[nb-visualanagram~subversion:4] added installer for changing title of app

  • From: GWiel@kenai.com
  • To: commits@nb-visualanagram.kenai.com
  • Subject: [nb-visualanagram~subversion:4] added installer for changing title of app
  • Date: Tue, 7 Jul 2009 17:10:31 +0000

Project:    nb-visualanagram
Repository: subversion
Revision:   4
Author:     GWiel
Date:       2009-07-07 17:10:29 UTC
Link:       
http://kenai.com/projects/nb-visualanagram/sources/subversion/revision/4

Log Message:
------------
added installer for changing title of app


Modified Paths:
---------------
mf_training/nbproject/project.xml
mf_training/src/org/netbeans/edu/matfyz09/GraphTopComponent.java
mf_training/manifest.mf
mf_training
mf_training/src/org/netbeans/edu/matfyz09/Bundle.properties
mf_training/nbproject/genfiles.properties
mf_training/src/org/netbeans/edu/matfyz09/GraphTopComponent.form


Added Paths:
------------
mf_training/src/org/netbeans/edu/matfyz09/Installer.java


Diffs:
------
Index: mf_training/nbproject/project.xml
===================================================================
--- mf_training/nbproject/project.xml   (revision 3)
+++ mf_training/nbproject/project.xml   (revision 4)
@@ -65,6 +65,14 @@
                     </run-dependency>
                 </dependency>
                 <dependency>
+                    <code-name-base>org.openide.modules</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.10.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
                     <code-name-base>org.openide.nodes</code-name-base>
                     <build-prerequisite/>
                     <compile-dependency/>
Index: mf_training/nbproject/genfiles.properties
===================================================================
--- mf_training/nbproject/genfiles.properties   (revision 3)
+++ mf_training/nbproject/genfiles.properties   (revision 4)
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=9d19ca0c
+build.xml.data.CRC32=946aca6c
 build.xml.script.CRC32=49da8691
 build.xml.stylesheet.CRC32=79c3b980@1.28.1.7
 # This file is used by a NetBeans-based IDE to track changes in generated 
files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never 
regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=9d19ca0c
+nbproject/build-impl.xml.data.CRC32=946aca6c
 nbproject/build-impl.xml.script.CRC32=4fb8a7ba
 nbproject/build-impl.xml.stylesheet.CRC32=261c4bef@1.28.1.7
Index: mf_training/manifest.mf
===================================================================
--- mf_training/manifest.mf     (revision 3)
+++ mf_training/manifest.mf     (revision 4)
@@ -1,5 +1,6 @@
 Manifest-Version: 1.0
 OpenIDE-Module: org.netbeans.edu.matfyz09
+OpenIDE-Module-Install: org/netbeans/edu/matfyz09/Installer.class
 OpenIDE-Module-Layer: org/netbeans/edu/matfyz09/layer.xml
 OpenIDE-Module-Localizing-Bundle: org/netbeans/edu/matfyz09/Bundle.properties
 OpenIDE-Module-Specification-Version: 1.0
Index: mf_training/src/org/netbeans/edu/matfyz09/Bundle.properties
===================================================================
--- mf_training/src/org/netbeans/edu/matfyz09/Bundle.properties (revision 3)
+++ mf_training/src/org/netbeans/edu/matfyz09/Bundle.properties (revision 4)
@@ -1,3 +1,4 @@
+OpenIDE-Module-Name=mf_training
 Actions/Window/org-netbeans-edu-matfyz09-GraphAction.instance=Graph
 CTL_GraphAction=Graph
 CTL_GraphTopComponent=Anagram Visualizer
@@ -3,3 +4,3 @@
 CTL_SomeAction=Anagram Graph
 HINT_GraphTopComponent=This is a Graph window
-OpenIDE-Module-Name=mf_training
+APP_TITLE=Anagram Visualizer
\ No newline at end of file
Index: mf_training/src/org/netbeans/edu/matfyz09/GraphTopComponent.java
===================================================================
--- mf_training/src/org/netbeans/edu/matfyz09/GraphTopComponent.java    
(revision 3)
+++ mf_training/src/org/netbeans/edu/matfyz09/GraphTopComponent.java    
(revision 4)
@@ -6,6 +6,7 @@
 package org.netbeans.edu.matfyz09;
 
 import com.toy.anagrams.lib.WordLibrary;
+import java.awt.BorderLayout;
 import java.util.logging.Logger;
 import org.openide.util.NbBundle;
 import org.openide.windows.TopComponent;
@@ -36,6 +37,7 @@
 //        setIcon(ImageUtilities.loadImage(ICON_PATH, true));
         Scene sc = WordGraph.createScene(WordLibrary.getDefault());
         jScrollPane1.setViewportView(sc.createView());
+        add(sc.createSatelliteView(), BorderLayout.WEST);
 
     }
 
@@ -49,16 +51,8 @@
 
         jScrollPane1 = new javax.swing.JScrollPane();
 
-        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
-        this.setLayout(layout);
-        layout.setHorizontalGroup(
-            
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addComponent(jScrollPane1, 
javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
-        );
-        layout.setVerticalGroup(
-            
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addComponent(jScrollPane1, 
javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
-        );
+        setLayout(new java.awt.BorderLayout());
+        add(jScrollPane1, java.awt.BorderLayout.CENTER);
     }// </editor-fold>//GEN-END:initComponents
 
     // Variables declaration - do not modify//GEN-BEGIN:variables
Index: mf_training/src/org/netbeans/edu/matfyz09/GraphTopComponent.form
===================================================================
--- mf_training/src/org/netbeans/edu/matfyz09/GraphTopComponent.form    
(revision 3)
+++ mf_training/src/org/netbeans/edu/matfyz09/GraphTopComponent.form    
(revision 4)
@@ -13,20 +13,14 @@
     <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" 
value="2"/>
   </AuxValues>
 
-  <Layout>
-    <DimensionLayout dim="0">
-      <Group type="103" groupAlignment="0" attributes="0">
-          <Component id="jScrollPane1" alignment="0" pref="400" max="32767" 
attributes="0"/>
-      </Group>
-    </DimensionLayout>
-    <DimensionLayout dim="1">
-      <Group type="103" groupAlignment="0" attributes="0">
-          <Component id="jScrollPane1" alignment="0" pref="300" max="32767" 
attributes="0"/>
-      </Group>
-    </DimensionLayout>
-  </Layout>
+  <Layout 
class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
   <SubComponents>
     <Container class="javax.swing.JScrollPane" name="jScrollPane1">
+      <Constraints>
+        <Constraint 
layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" 
value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+          <BorderConstraints direction="Center"/>
+        </Constraint>
+      </Constraints>
 
       <Layout 
class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
     </Container>
Index: mf_training/src/org/netbeans/edu/matfyz09/Installer.java
===================================================================
--- mf_training/src/org/netbeans/edu/matfyz09/Installer.java    (revision 0)
+++ mf_training/src/org/netbeans/edu/matfyz09/Installer.java    (revision 4)
@@ -0,0 +1,29 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.netbeans.edu.matfyz09;
+
+import javax.swing.JFrame;
+import org.openide.modules.ModuleInstall;
+import org.openide.util.NbBundle;
+import org.openide.windows.WindowManager;
+
+/**
+ * Manages a module's lifecycle. Remember that an installer is optional and
+ * often not needed at all.
+ */
+public class Installer extends ModuleInstall {
+
+    @Override
+    public void restored() {
+        WindowManager.getDefault().invokeWhenUIReady(new Runnable() {
+            public void run() {
+                JFrame frame = (JFrame) 
WindowManager.getDefault().getMainWindow();
+                String title = NbBundle.getMessage(Installer.class, 
"APP_TITLE");
+                frame.setTitle(title);
+            }
+        });
+
+    }
+}

Property changes on: mf_training
___________________________________________________________________
Added: svn:ignore
   + build







[nb-visualanagram~subversion:4] added installer for changing title of app

GWiel 07/07/2009
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close