|
From: <de...@us...> - 2011-11-16 23:07:49
|
Revision: 6674
http://fudaa.svn.sourceforge.net/fudaa/?rev=6674&view=rev
Author: deniger
Date: 2011-11-16 23:07:42 +0000 (Wed, 16 Nov 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-crue/pom.xml
trunk/soft/fudaa-crue/ui-application/pom.xml
trunk/soft/fudaa-crue/ui-branding/src/main/nbm-branding/modules/org-netbeans-core-ui.jar/org/netbeans/core/ui/resources/Bundle_fr.properties
trunk/soft/fudaa-crue/ui-branding/src/main/nbm-branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties
trunk/soft/fudaa-crue/ui-branding/src/main/nbm-branding/modules/org-openide-actions.jar/org/openide/actions/Bundle_fr.properties
trunk/soft/fudaa-crue/ui-branding/src/main/resources/org/fudaa/fudaa/crue/branding/layer.xml
trunk/soft/fudaa-crue/ui-study/pom.xml
trunk/soft/fudaa-crue/ui-study/src/main/java/org/fudaa/fudaa/crue/study/FileListTopComponent.java
trunk/soft/fudaa-crue/ui-study/src/main/java/org/fudaa/fudaa/crue/study/node/FichierCrueNode.java
trunk/soft/fudaa-crue/ui-study/src/main/resources/org/fudaa/fudaa/crue/study/actions/Bundle.properties
trunk/soft/fudaa-crue/ui-wrapper/pom.xml
Added Paths:
-----------
trunk/soft/fudaa-crue/ui-options/
trunk/soft/fudaa-crue/ui-options/pom.xml
trunk/soft/fudaa-crue/ui-options/src/
trunk/soft/fudaa-crue/ui-options/src/main/
trunk/soft/fudaa-crue/ui-options/src/main/java/
trunk/soft/fudaa-crue/ui-options/src/main/java/org/
trunk/soft/fudaa-crue/ui-options/src/main/java/org/fudaa/
trunk/soft/fudaa-crue/ui-options/src/main/java/org/fudaa/fudaa/
trunk/soft/fudaa-crue/ui-options/src/main/java/org/fudaa/fudaa/crue/
trunk/soft/fudaa-crue/ui-options/src/main/java/org/fudaa/fudaa/crue/options/
trunk/soft/fudaa-crue/ui-options/src/main/java/org/fudaa/fudaa/crue/options/Crue9OptionsPanelController.java
trunk/soft/fudaa-crue/ui-options/src/main/java/org/fudaa/fudaa/crue/options/Crue9Panel.form
trunk/soft/fudaa-crue/ui-options/src/main/java/org/fudaa/fudaa/crue/options/Crue9Panel.java
trunk/soft/fudaa-crue/ui-options/src/main/nbm/
trunk/soft/fudaa-crue/ui-options/src/main/nbm/manifest.mf
trunk/soft/fudaa-crue/ui-options/src/main/nbm/module.xml
trunk/soft/fudaa-crue/ui-options/src/main/resources/
trunk/soft/fudaa-crue/ui-options/src/main/resources/org/
trunk/soft/fudaa-crue/ui-options/src/main/resources/org/fudaa/
trunk/soft/fudaa-crue/ui-options/src/main/resources/org/fudaa/fudaa/
trunk/soft/fudaa-crue/ui-options/src/main/resources/org/fudaa/fudaa/crue/
trunk/soft/fudaa-crue/ui-options/src/main/resources/org/fudaa/fudaa/crue/options/
trunk/soft/fudaa-crue/ui-options/src/main/resources/org/fudaa/fudaa/crue/options/Bundle.properties
trunk/soft/fudaa-crue/ui-options/src/main/resources/org/fudaa/fudaa/crue/options/frame.gif
trunk/soft/fudaa-crue/ui-options/src/main/resources/org/fudaa/fudaa/crue/options/layer.xml
trunk/soft/fudaa-crue/ui-study/src/main/java/org/fudaa/fudaa/crue/study/actions/OpenFichierCrueNode.java
Modified: trunk/soft/fudaa-crue/pom.xml
===================================================================
--- trunk/soft/fudaa-crue/pom.xml 2011-11-15 22:56:47 UTC (rev 6673)
+++ trunk/soft/fudaa-crue/pom.xml 2011-11-16 23:07:42 UTC (rev 6674)
@@ -41,6 +41,7 @@
<module>ui-post</module>
<module>ui-otfa</module>
<module>ui-application</module>
+ <module>ui-options</module>
</modules>
<dependencyManagement>
<dependencies>
@@ -74,6 +75,12 @@
</dependency>
<dependency>
<groupId>org.fudaa.soft.fudaa-crue</groupId>
+ <artifactId>ui-options</artifactId>
+ <version>${project.version}</version>
+ <type>nbm</type>
+ </dependency>
+ <dependency>
+ <groupId>org.fudaa.soft.fudaa-crue</groupId>
<artifactId>ui-branding</artifactId>
<version>${project.version}</version>
<type>nbm</type>
Modified: trunk/soft/fudaa-crue/ui-application/pom.xml
===================================================================
--- trunk/soft/fudaa-crue/ui-application/pom.xml 2011-11-15 22:56:47 UTC (rev 6673)
+++ trunk/soft/fudaa-crue/ui-application/pom.xml 2011-11-16 23:07:42 UTC (rev 6674)
@@ -56,7 +56,11 @@
<artifactId>ui-otfa</artifactId>
<type>nbm</type>
</dependency>
-
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>ui-options</artifactId>
+ <type>nbm</type>
+ </dependency>
</dependencies>
<build>
Modified: trunk/soft/fudaa-crue/ui-branding/src/main/nbm-branding/modules/org-netbeans-core-ui.jar/org/netbeans/core/ui/resources/Bundle_fr.properties
===================================================================
--- trunk/soft/fudaa-crue/ui-branding/src/main/nbm-branding/modules/org-netbeans-core-ui.jar/org/netbeans/core/ui/resources/Bundle_fr.properties 2011-11-15 22:56:47 UTC (rev 6673)
+++ trunk/soft/fudaa-crue/ui-branding/src/main/nbm-branding/modules/org-netbeans-core-ui.jar/org/netbeans/core/ui/resources/Bundle_fr.properties 2011-11-16 23:07:42 UTC (rev 6674)
@@ -1 +1,3 @@
Menu/Edit=&Edition
+Actions/Tools=Outils
+Menu/Tools=&Outils
Modified: trunk/soft/fudaa-crue/ui-branding/src/main/nbm-branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties
===================================================================
--- trunk/soft/fudaa-crue/ui-branding/src/main/nbm-branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties 2011-11-15 22:56:47 UTC (rev 6673)
+++ trunk/soft/fudaa-crue/ui-branding/src/main/nbm-branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties 2011-11-16 23:07:42 UTC (rev 6674)
@@ -1,3 +1,2 @@
-
CTL_MainWindow_Title=Fudaa-Crue {0}
CTL_MainWindow_Title_No_Project=Fudaa-Crue {0}
Modified: trunk/soft/fudaa-crue/ui-branding/src/main/nbm-branding/modules/org-openide-actions.jar/org/openide/actions/Bundle_fr.properties
===================================================================
--- trunk/soft/fudaa-crue/ui-branding/src/main/nbm-branding/modules/org-openide-actions.jar/org/openide/actions/Bundle_fr.properties 2011-11-15 22:56:47 UTC (rev 6673)
+++ trunk/soft/fudaa-crue/ui-branding/src/main/nbm-branding/modules/org-openide-actions.jar/org/openide/actions/Bundle_fr.properties 2011-11-16 23:07:42 UTC (rev 6674)
@@ -6,3 +6,4 @@
RedoSimple=&Refaire
Rename=Renommer...
UndoSimple=&D\u00e9faire
+CTL_Tools=Outils
Modified: trunk/soft/fudaa-crue/ui-branding/src/main/resources/org/fudaa/fudaa/crue/branding/layer.xml
===================================================================
--- trunk/soft/fudaa-crue/ui-branding/src/main/resources/org/fudaa/fudaa/crue/branding/layer.xml 2011-11-15 22:56:47 UTC (rev 6673)
+++ trunk/soft/fudaa-crue/ui-branding/src/main/resources/org/fudaa/fudaa/crue/branding/layer.xml 2011-11-16 23:07:42 UTC (rev 6674)
@@ -27,8 +27,7 @@
<folder name="Help_hidden"/>
<file name="Refactoring_hidden"/>
<file name="RunProject_hidden"/>
- <file name="View_hidden"/>
- <file name="Tools_hidden"/>
+ <file name="View_hidden"/>
<folder name="Window">
<file name="CloneDocumentAction.shadow_hidden"/>
<file name="CloseAllButThisAction.shadow_hidden"/>
@@ -49,9 +48,6 @@
<file name="Memory_hidden"/>
</folder>
<folder name="Windows2">
- <folder name="Components">
- <file name="properties.settings_hidden"/>
- </folder>
<folder name="Modes">
<file name="properties.wsmode" url="/modes/propertiesWsmode.xml"/>
<file name="rightTopMode.wsmode" url="/modes/rightTopMode.wsmode"/>
Property changes on: trunk/soft/fudaa-crue/ui-options
___________________________________________________________________
Added: svn:ignore
+ target
Added: trunk/soft/fudaa-crue/ui-options/pom.xml
===================================================================
--- trunk/soft/fudaa-crue/ui-options/pom.xml (rev 0)
+++ trunk/soft/fudaa-crue/ui-options/pom.xml 2011-11-16 23:07:42 UTC (rev 6674)
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.fudaa.soft.fudaa-crue</groupId>
+ <artifactId>fudaa-crue</artifactId>
+ <version>0.38-SNAPSHOT</version>
+ </parent>
+ <artifactId>ui-options</artifactId>
+ <name>Crue UI Options</name>
+ <packaging>nbm</packaging>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <repositories>
+ <!--
+ Repository hosting NetBeans modules, especially APIs.
+ Versions are based on IDE releases, e.g.: RELEASE691
+ To create your own repository, use: nbm:populate-repository
+ -->
+ <repository>
+ <id>netbeans</id>
+ <name>NetBeans</name>
+ <url>http://bits.netbeans.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.fudaa.soft.fudaa-crue</groupId>
+ <artifactId>ui-wrapper</artifactId>
+ <type>nbm</type>
+ </dependency>
+
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-netbeans-api-annotations-common</artifactId>
+ <version>${netbeans.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-openide-windows</artifactId>
+ <version>${netbeans.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-netbeans-swing-outline</artifactId>
+ <version>${netbeans.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-openide-util</artifactId>
+ <version>RELEASE70</version>
+ </dependency>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-netbeans-api-progress</artifactId>
+ <version>${netbeans.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-openide-util-lookup</artifactId>
+ <version>RELEASE70</version>
+ </dependency>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-openide-explorer</artifactId>
+ <version>${netbeans.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-openide-nodes</artifactId>
+ <version>${netbeans.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-openide-actions</artifactId>
+ <version>${netbeans.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-openide-awt</artifactId>
+ <version>RELEASE70</version>
+ </dependency>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-openide-modules</artifactId>
+ <version>${netbeans.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-netbeans-modules-settings</artifactId>
+ <version>${netbeans.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-openide-filesystems</artifactId>
+ <version>${netbeans.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-netbeans-modules-options-api</artifactId>
+ <version>RELEASE70</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>nbm-maven-plugin</artifactId>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <!-- to have the jar plugin pickup the nbm generated manifest -->
+ <useDefaultManifestFile>true</useDefaultManifestFile>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: trunk/soft/fudaa-crue/ui-options/src/main/java/org/fudaa/fudaa/crue/options/Crue9OptionsPanelController.java
===================================================================
--- trunk/soft/fudaa-crue/ui-options/src/main/java/org/fudaa/fudaa/crue/options/Crue9OptionsPanelController.java (rev 0)
+++ trunk/soft/fudaa-crue/ui-options/src/main/java/org/fudaa/fudaa/crue/options/Crue9OptionsPanelController.java 2011-11-16 23:07:42 UTC (rev 6674)
@@ -0,0 +1,76 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.fudaa.fudaa.crue.options;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import javax.swing.JComponent;
+import org.netbeans.spi.options.OptionsPanelController;
+import org.openide.util.HelpCtx;
+import org.openide.util.Lookup;
+
+@OptionsPanelController.TopLevelRegistration(categoryName = "#OptionsCategory_Name_Crue9",
+iconBase = "org/fudaa/fudaa/crue/options/frame.gif",
+keywords = "#OptionsCategory_Keywords_Crue9",
+keywordsCategory = "Crue9")
+public final class Crue9OptionsPanelController extends OptionsPanelController {
+
+ private Crue9Panel panel;
+ private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
+ private boolean changed;
+
+ public void update() {
+ getPanel().load();
+ changed = false;
+ }
+
+ public void applyChanges() {
+ getPanel().store();
+ changed = false;
+ }
+
+ public void cancel() {
+ // need not do anything special, if no changes have been persisted yet
+ }
+
+ public boolean isValid() {
+ return getPanel().valid();
+ }
+
+ public boolean isChanged() {
+ return changed;
+ }
+
+ public HelpCtx getHelpCtx() {
+ return null; // new HelpCtx("...ID") if you have a help set
+ }
+
+ public JComponent getComponent(Lookup masterLookup) {
+ return getPanel();
+ }
+
+ public void addPropertyChangeListener(PropertyChangeListener l) {
+ pcs.addPropertyChangeListener(l);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener l) {
+ pcs.removePropertyChangeListener(l);
+ }
+
+ private Crue9Panel getPanel() {
+ if (panel == null) {
+ panel = new Crue9Panel(this);
+ }
+ return panel;
+ }
+
+ void changed() {
+ if (!changed) {
+ changed = true;
+ pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, false, true);
+ }
+ pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
+ }
+}
Added: trunk/soft/fudaa-crue/ui-options/src/main/java/org/fudaa/fudaa/crue/options/Crue9Panel.form
===================================================================
--- trunk/soft/fudaa-crue/ui-options/src/main/java/org/fudaa/fudaa/crue/options/Crue9Panel.form (rev 0)
+++ trunk/soft/fudaa-crue/ui-options/src/main/java/org/fudaa/fudaa/crue/options/Crue9Panel.form 2011-11-16 23:07:42 UTC (rev 6674)
@@ -0,0 +1,70 @@
+<?xml version="1.1" encoding="UTF-8" ?>
+
+<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+ <AuxValues>
+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ </AuxValues>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
+ <EmptySpace type="unrelated" max="-2" attributes="0"/>
+ <Component id="jTextField1" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jButton1" min="-2" max="-2" attributes="0"/>
+ <EmptySpace pref="172" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace min="-2" pref="24" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="jTextField1" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="jButton1" alignment="3" min="-2" pref="25" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace pref="19" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="jLabel1">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/fudaa/fudaa/crue/options/Bundle.properties" key="Crue9Panel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
+ </Property>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JTextField" name="jTextField1">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/fudaa/fudaa/crue/options/Bundle.properties" key="Crue9Panel.jTextField1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
+ </Property>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JButton" name="jButton1">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/fudaa/fudaa/crue/options/Bundle.properties" key="Crue9Panel.jButton1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
+ </Property>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
+ </Events>
+ </Component>
+ </SubComponents>
+</Form>
Added: trunk/soft/fudaa-crue/ui-options/src/main/java/org/fudaa/fudaa/crue/options/Crue9Panel.java
===================================================================
--- trunk/soft/fudaa-crue/ui-options/src/main/java/org/fudaa/fudaa/crue/options/Crue9Panel.java (rev 0)
+++ trunk/soft/fudaa-crue/ui-options/src/main/java/org/fudaa/fudaa/crue/options/Crue9Panel.java 2011-11-16 23:07:42 UTC (rev 6674)
@@ -0,0 +1,98 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.fudaa.fudaa.crue.options;
+
+final class Crue9Panel extends javax.swing.JPanel {
+
+ private final Crue9OptionsPanelController controller;
+
+ Crue9Panel(Crue9OptionsPanelController controller) {
+ this.controller = controller;
+ initComponents();
+ // TODO listen to changes in form fields and call controller.changed()
+ }
+
+ /** 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.
+ */
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ jLabel1 = new javax.swing.JLabel();
+ jTextField1 = new javax.swing.JTextField();
+ jButton1 = new javax.swing.JButton();
+
+ org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(Crue9Panel.class, "Crue9Panel.jLabel1.text")); // NOI18N
+
+ jTextField1.setText(org.openide.util.NbBundle.getMessage(Crue9Panel.class, "Crue9Panel.jTextField1.text")); // NOI18N
+
+ org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle.getMessage(Crue9Panel.class, "Crue9Panel.jButton1.text")); // NOI18N
+ jButton1.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jButton1ActionPerformed(evt);
+ }
+ });
+
+ javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
+ this.setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(jLabel1)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jButton1)
+ .addContainerGap(172, Short.MAX_VALUE))
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addGap(24, 24, 24)
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel1)
+ .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(19, Short.MAX_VALUE))
+ );
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
+ // TODO add your handling code here:
+ }//GEN-LAST:event_jButton1ActionPerformed
+
+ void load() {
+ // TODO read settings and initialize GUI
+ // Example:
+ // someCheckBox.setSelected(Preferences.userNodeForPackage(Crue9Panel.class).getBoolean("someFlag", false));
+ // or for org.openide.util with API spec. version >= 7.4:
+ // someCheckBox.setSelected(NbPreferences.forModule(Crue9Panel.class).getBoolean("someFlag", false));
+ // or:
+ // someTextField.setText(SomeSystemOption.getDefault().getSomeStringProperty());
+ }
+
+ void store() {
+ // TODO store modified settings
+ // Example:
+ // Preferences.userNodeForPackage(Crue9Panel.class).putBoolean("someFlag", someCheckBox.isSelected());
+ // or for org.openide.util with API spec. version >= 7.4:
+ // NbPreferences.forModule(Crue9Panel.class).putBoolean("someFlag", someCheckBox.isSelected());
+ // or:
+ // SomeSystemOption.getDefault().setSomeStringProperty(someTextField.getText());
+ }
+
+ boolean valid() {
+ // TODO check whether form is consistent and complete
+ return true;
+ }
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton jButton1;
+ private javax.swing.JLabel jLabel1;
+ private javax.swing.JTextField jTextField1;
+ // End of variables declaration//GEN-END:variables
+}
Added: trunk/soft/fudaa-crue/ui-options/src/main/nbm/manifest.mf
===================================================================
--- trunk/soft/fudaa-crue/ui-options/src/main/nbm/manifest.mf (rev 0)
+++ trunk/soft/fudaa-crue/ui-options/src/main/nbm/manifest.mf 2011-11-16 23:07:42 UTC (rev 6674)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+OpenIDE-Module-Localizing-Bundle: org/fudaa/fudaa/crue/options/Bundle.properties
+OpenIDE-Module-Layer: org/fudaa/fudaa/crue/options/layer.xml
Added: trunk/soft/fudaa-crue/ui-options/src/main/nbm/module.xml
===================================================================
--- trunk/soft/fudaa-crue/ui-options/src/main/nbm/module.xml (rev 0)
+++ trunk/soft/fudaa-crue/ui-options/src/main/nbm/module.xml 2011-11-16 23:07:42 UTC (rev 6674)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nbm>
+ <!--
+ <moduleType>autoload</moduleType>
+ <codeNameBase>org.fudaa.fudaa.crue.options/1</codeNameBase>
+ <licenseName>Apache License, Version 2.0</licenseName>
+ <licenseFile>license.txt</licenseFile>
+ -->
+</nbm>
Added: trunk/soft/fudaa-crue/ui-options/src/main/resources/org/fudaa/fudaa/crue/options/Bundle.properties
===================================================================
--- trunk/soft/fudaa-crue/ui-options/src/main/resources/org/fudaa/fudaa/crue/options/Bundle.properties (rev 0)
+++ trunk/soft/fudaa-crue/ui-options/src/main/resources/org/fudaa/fudaa/crue/options/Bundle.properties 2011-11-16 23:07:42 UTC (rev 6674)
@@ -0,0 +1,7 @@
+AdvancedOption_DisplayName_Test=Test
+AdvancedOption_Keywords_Test=Test
+OptionsCategory_Keywords_Crue9=crue9
+OptionsCategory_Name_Crue9=Crue9
+Crue9Panel.jLabel1.text=exeCrue9
+Crue9Panel.jTextField1.text=jTextField1
+Crue9Panel.jButton1.text=jButton1
Added: trunk/soft/fudaa-crue/ui-options/src/main/resources/org/fudaa/fudaa/crue/options/frame.gif
===================================================================
(Binary files differ)
Property changes on: trunk/soft/fudaa-crue/ui-options/src/main/resources/org/fudaa/fudaa/crue/options/frame.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/soft/fudaa-crue/ui-options/src/main/resources/org/fudaa/fudaa/crue/options/layer.xml
===================================================================
--- trunk/soft/fudaa-crue/ui-options/src/main/resources/org/fudaa/fudaa/crue/options/layer.xml (rev 0)
+++ trunk/soft/fudaa-crue/ui-options/src/main/resources/org/fudaa/fudaa/crue/options/layer.xml 2011-11-16 23:07:42 UTC (rev 6674)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
+<filesystem>
+ <folder name="Menu">
+ <folder name="Tools">
+ <file name="Separator1.instance_hidden"/>
+ <file name="Separator2.instance_hidden"/>
+ <file name="org-netbeans-modules-autoupdate-ui-actions-PluginManagerAction.shadow_hidden"/>
+ <file name="org-netbeans-modules-favorites-templates-TemplatesAction.shadow_hidden"/>
+ <file name="org-netbeans-modules-options-OptionsWindowAction-separatorBefore.instance_hidden"/>
+ <file name="org-openide-actions-ToolsAction.shadow_hidden"/>
+ </folder>
+ </folder>
+ <folder name="OptionsDialog">
+ <file name="Advanced.instance_hidden"/>
+ <file name="General.instance_hidden"/>
+ <file name="Keymaps.instance_hidden"/>
+ </folder>
+</filesystem>
Modified: trunk/soft/fudaa-crue/ui-study/pom.xml
===================================================================
--- trunk/soft/fudaa-crue/ui-study/pom.xml 2011-11-15 22:56:47 UTC (rev 6673)
+++ trunk/soft/fudaa-crue/ui-study/pom.xml 2011-11-16 23:07:42 UTC (rev 6674)
@@ -64,7 +64,7 @@
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-nodes</artifactId>
- <version>RELEASE70</version>
+ <version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
@@ -74,7 +74,7 @@
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-awt</artifactId>
- <version>RELEASE70</version>
+ <version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
Modified: trunk/soft/fudaa-crue/ui-study/src/main/java/org/fudaa/fudaa/crue/study/FileListTopComponent.java
===================================================================
--- trunk/soft/fudaa-crue/ui-study/src/main/java/org/fudaa/fudaa/crue/study/FileListTopComponent.java 2011-11-15 22:56:47 UTC (rev 6673)
+++ trunk/soft/fudaa-crue/ui-study/src/main/java/org/fudaa/fudaa/crue/study/FileListTopComponent.java 2011-11-16 23:07:42 UTC (rev 6674)
@@ -4,12 +4,15 @@
*/
package org.fudaa.fudaa.crue.study;
+import java.awt.FlowLayout;
import java.beans.PropertyVetoException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import javax.swing.JButton;
import org.fudaa.dodico.crue.metier.etude.FichierCrue;
import org.fudaa.dodico.crue.metier.etude.ManagerEMHContainerBase;
+import org.fudaa.fudaa.crue.study.actions.OpenFichierCrueNode;
import org.fudaa.fudaa.crue.study.node.ListingFichierCrue;
import org.fudaa.fudaa.crue.study.node.NodesManager;
import org.openide.nodes.Node;
@@ -39,41 +42,45 @@
@TopComponent.OpenActionRegistration(displayName = "#CTL_FileListAction",
preferredID = "FileListTopComponent")
public final class FileListTopComponent extends ListTopComponentAbstract {
-
+
ContainerListener listener;
-
+
public FileListTopComponent() {
super(FichierCrue.class);
initComponents();
setName(NbBundle.getMessage(FileListTopComponent.class, "CTL_FileListTopComponent"));
setToolTipText(NbBundle.getMessage(FileListTopComponent.class, "HINT_FileListTopComponent"));
+ JButton bt = new JButton();
+ bt.setAction(new OpenFichierCrueNode().createContextAwareInstance(getLookup()));
+ pnButtons.setLayout(new FlowLayout(FlowLayout.CENTER));
+ pnButtons.add(bt);
}
-
+
@Override
public void componentOpened() {
super.componentOpened();
listener = new ContainerListener();
}
-
+
@Override
public void componentClosed() {
super.componentClosed();
listener.clean();
}
-
+
private class ContainerListener implements LookupListener {
-
+
private Lookup.Result<ManagerEMHContainerBase> selectedContainer;
-
+
public ContainerListener() {
selectedContainer = Utilities.actionsGlobalContext().lookupResult(ManagerEMHContainerBase.class);
selectedContainer.addLookupListener(this);
}
-
+
public void clean() {
selectedContainer.removeLookupListener(this);
}
-
+
@Override
public void resultChanged(LookupEvent ev) {
Collection<? extends ManagerEMHContainerBase> allInstances = selectedContainer.allInstances();
@@ -114,7 +121,6 @@
add(listView1, java.awt.BorderLayout.CENTER);
add(pnButtons, java.awt.BorderLayout.PAGE_END);
}// </editor-fold>//GEN-END:initComponents
-
// Variables declaration - do not modify//GEN-BEGIN:variables
private org.openide.explorer.view.ListView listView1;
private javax.swing.JPanel pnButtons;
@@ -124,14 +130,14 @@
protected Node getNode(NodesManager nodesManager) {
return nodesManager.getNodeFichierCrueList();
}
-
+
void writeProperties(java.util.Properties p) {
// better to version settings since initial version as advocated at
// http://wiki.apidesign.org/wiki/PropertyFiles
p.setProperty("version", "1.0");
// TODO store your settings
}
-
+
void readProperties(java.util.Properties p) {
String version = p.getProperty("version");
// TODO read your settings according to their version
Added: trunk/soft/fudaa-crue/ui-study/src/main/java/org/fudaa/fudaa/crue/study/actions/OpenFichierCrueNode.java
===================================================================
--- trunk/soft/fudaa-crue/ui-study/src/main/java/org/fudaa/fudaa/crue/study/actions/OpenFichierCrueNode.java (rev 0)
+++ trunk/soft/fudaa-crue/ui-study/src/main/java/org/fudaa/fudaa/crue/study/actions/OpenFichierCrueNode.java 2011-11-16 23:07:42 UTC (rev 6674)
@@ -0,0 +1,54 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.fudaa.fudaa.crue.study.actions;
+
+import org.apache.commons.lang.ArrayUtils;
+import org.fudaa.fudaa.crue.study.node.FichierCrueNode;
+import org.openide.nodes.Node;
+import org.openide.util.HelpCtx;
+import org.openide.util.NbBundle;
+import org.openide.util.actions.NodeAction;
+
+/**
+ *
+ * @author genesis
+ */
+public class OpenFichierCrueNode extends NodeAction {
+
+ @Override
+ protected boolean enable(Node[] activatedNodes) {
+ if (ArrayUtils.isEmpty(activatedNodes)) {
+ return false;
+ }
+ for (Node node : activatedNodes) {
+ FichierCrueNode fichier = (FichierCrueNode) node;
+ if (fichier.fileExists()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ protected void initialize() {
+ super.initialize();
+ }
+
+ @Override
+ protected void performAction(Node[] activatedNodes) {
+
+ System.err.println("Yes");
+ }
+
+ @Override
+ public HelpCtx getHelpCtx() {
+ return HelpCtx.DEFAULT_HELP;
+ }
+
+ @Override
+ public String getName() {
+ return NbBundle.getMessage(OpenFichierCrueNode.class, "OpenFichierAction");
+ }
+}
Modified: trunk/soft/fudaa-crue/ui-study/src/main/java/org/fudaa/fudaa/crue/study/node/FichierCrueNode.java
===================================================================
--- trunk/soft/fudaa-crue/ui-study/src/main/java/org/fudaa/fudaa/crue/study/node/FichierCrueNode.java 2011-11-15 22:56:47 UTC (rev 6673)
+++ trunk/soft/fudaa-crue/ui-study/src/main/java/org/fudaa/fudaa/crue/study/node/FichierCrueNode.java 2011-11-16 23:07:42 UTC (rev 6674)
@@ -8,11 +8,9 @@
import javax.swing.Action;
import org.fudaa.dodico.crue.metier.etude.EMHProjet;
import org.fudaa.dodico.crue.metier.etude.FichierCrue;
-import org.openide.actions.OpenAction;
-import org.openide.cookies.OpenCookie;
+import org.fudaa.fudaa.crue.study.actions.OpenFichierCrueNode;
import org.openide.nodes.AbstractNode;
import org.openide.nodes.Children;
-import org.openide.util.actions.SystemAction;
import org.openide.util.lookup.Lookups;
/**
@@ -31,17 +29,23 @@
}
protected final void updateIcon() {
- FichierCrue lookup = getLookup().lookup(FichierCrue.class);
- if (lookup.getProjectFile(projet).exists()) {
+ boolean exists = fileExists();
+ if (exists) {
setIconBaseWithExtension("org/fudaa/fudaa/crue/study/icons/file.png");
} else {
setIconBaseWithExtension("org/fudaa/fudaa/crue/study/icons/file-broken.png");
}
}
+ public boolean fileExists() {
+ FichierCrue lookup = getLookup().lookup(FichierCrue.class);
+ final boolean exists = lookup.getProjectFile(projet).exists();
+ return exists;
+ }
+
@Override
public Action[] getActions(boolean context) {
- Action[] result = new Action[]{SystemAction.get(OpenAction.class)};
+ Action[] result = new Action[]{new OpenFichierCrueNode()};
return result;
}
Modified: trunk/soft/fudaa-crue/ui-study/src/main/resources/org/fudaa/fudaa/crue/study/actions/Bundle.properties
===================================================================
--- trunk/soft/fudaa-crue/ui-study/src/main/resources/org/fudaa/fudaa/crue/study/actions/Bundle.properties 2011-11-15 22:56:47 UTC (rev 6673)
+++ trunk/soft/fudaa-crue/ui-study/src/main/resources/org/fudaa/fudaa/crue/study/actions/Bundle.properties 2011-11-16 23:07:42 UTC (rev 6674)
@@ -1,3 +1,4 @@
CTL_LoadStudy=Charger une \u00e9tude
CTL_CloseStudy=Fermer l'\u00e9tude courante
CTL_SaveScenario=Enregister EMHScenario
+OpenFichierAction=Ouvrir le fichier
Modified: trunk/soft/fudaa-crue/ui-wrapper/pom.xml
===================================================================
--- trunk/soft/fudaa-crue/ui-wrapper/pom.xml 2011-11-15 22:56:47 UTC (rev 6673)
+++ trunk/soft/fudaa-crue/ui-wrapper/pom.xml 2011-11-16 23:07:42 UTC (rev 6674)
@@ -24,12 +24,12 @@
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util</artifactId>
- <version>RELEASE70</version>
+ <version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-awt</artifactId>
- <version>RELEASE70</version>
+ <version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|