45 Commits

Author SHA1 Message Date
0e25758fcc updated version 2015-08-13 14:37:35 +02:00
c656d8b557 upgraded to zmq version of xscan 2015-08-13 08:23:16 +02:00
d43dc9ff9d packaged new version 2015-05-11 13:46:12 +02:00
4e2959d44d Fixed memory leak reported in CTRLHA-133 2015-05-05 10:56:41 +02:00
4ec9742f70 Fixed 2 memory/thread leaks 2015-05-05 10:50:05 +02:00
e1a55b8bf6 new version 2014-10-10 13:54:48 +02:00
5a1fcd0e4c Added title font property to plots. 2014-09-09 09:27:27 +02:00
63e6ee8a44 Added title font property to plots. 2014-09-09 09:18:50 +02:00
2c953786d1 Fixed bug in chained manipulations 2014-09-04 09:16:49 +02:00
19f0db668a Added visualization to Fdaq 2014-08-29 16:46:18 +02:00
a264ca3f64 Added visualization to Fdaq 2014-08-29 16:28:31 +02:00
ab6aaecc97 Added visualization to Fdaq 2014-08-29 16:18:10 +02:00
61e3b4806c Several bug fixes and small improvements 2014-08-28 14:25:42 +02:00
2246c4b4dd Fixed bugs on MatrixPlotArray 7 LinePlotArray 2014-08-22 09:25:44 +02:00
37fb752682 Fixed bugs on MatrixPlotArray 7 LinePlotArray 2014-08-22 09:25:37 +02:00
4e363ea179 Fixed bugs on MatrixPlotArray 7 LinePlotArray 2014-08-22 09:25:28 +02:00
1a8bf86cc5 Merge origin/master 2014-08-19 14:24:28 +02:00
f1c0581072 updated backing fda ... 2014-08-19 13:21:39 +02:00
40dd308127 Bug plotting -Infinity 2014-08-18 16:09:14 +02:00
028529a8c9 Added configuration for plot hardware acceleration and heavyweight popup menus 2014-08-13 13:41:19 +02:00
8936173116 Adapting to plot v2: Abstraction of graphs & new implementations: JZY3D, JavaFX, JFreeChart 2014-08-12 16:42:25 +02:00
ffb6a8b872 Updated version 2014-08-07 14:34:23 +02:00
10a80e1ad6 Fixed startup scripts for console 2014-08-07 12:59:25 +02:00
2d61a7bdf0 Updated gitignore files 2014-08-06 10:11:44 +02:00
c12e540025 Added some more folders to gitignore file 2014-08-06 10:09:06 +02:00
db3b9bc53f Upgraded to Netbeans platform 8 2014-08-06 10:08:19 +02:00
9a00e312ec Updated version to 3.0.0 2014-07-29 11:53:14 +02:00
d11c873fa4 Fixed problems that top components did not come up at startup 2014-07-29 11:46:11 +02:00
c254c30f8b upgraded to latest FDA version number ... 2014-07-28 16:30:26 +02:00
eb726a7ac1 cleanup pom 2014-07-28 11:06:26 +02:00
c40dec7a25 Upgraded used fdaq library 2014-07-28 10:41:46 +02:00
005cc205ae fix readme 2014-07-25 14:46:33 +02:00
a1594a7e2a Updated readme and cleanup pom files 2014-07-25 14:43:29 +02:00
c345841e8a Cleanup POM 2014-07-25 14:14:50 +02:00
11cb7572ae Restructured project 2014-07-25 14:08:35 +02:00
91f44a93ba Removed duplicate dependency 2014-07-25 13:24:44 +02:00
957cf02f30 removed branding folder 2014-07-25 13:14:34 +02:00
cfbe50b212 Merged maven modules into one 2014-07-25 13:11:45 +02:00
9ce2b1582b Fixed file path for cdump and fdaq scans 2014-07-25 11:04:03 +02:00
b9325dd025 Merged cdump code into ee module 2014-07-25 10:58:48 +02:00
2ab5d9edce Got things finally back working reliably.
Note: You have to use Netbeans 7.x and you have to run it with Java 7
This is extremely unsatisfying!
2014-07-25 10:31:45 +02:00
6bc71ff0e9 Updated maven configuration to have the build run again on Java 8
Also Upgraded to Netbeans Platform 8
2014-07-24 11:52:42 +02:00
17b5e98177 updates 2014-01-22 13:11:35 +01:00
a4ffeee271 Upgraded to new FDA version ... 2014-01-20 13:58:05 +01:00
6149f95eed Changes for 2.x fda version
FDA-95
Fixed command line start scripts for new Java entry points
2013-12-17 09:41:54 +01:00
279 changed files with 1591 additions and 1815 deletions

17
.gitignore vendored
View File

@@ -1,15 +1,2 @@
/application/target/
/branding/target/
/fda.ui.ce/target/
/fda.ui.cm/target/
/fda.ui.ee/target/
/fda.ui.preferences/target/
/application/data/
/application/config/
/application/logs/
/application/scans/
/nbactions.xml
/application/nbactions.xml
/fda.ui.cdump/target/
/fda.ui.cdump/nbactions.xml
/.project
target
.DS_Store

11
.project Normal file
View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ch.psi.fda.ui</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>

View File

@@ -1,6 +1,42 @@
To build the whole application use:
```Bash
mvn -DskipTests=true --also-make --projects application install
```
# Overview
The `ch.psi.fda.ui` project holds the GUI part of the FDA application. It consists of 3 Maven projects, a parent project, a project holding the
application configuration itself (`fda.ui.application`) and a project holding the code (`fda.ui.module`).
Startup parameters and configurations are specificed in `fda.ui.application/src/main/resources/fda.conf`.
Shell startup scripts are located in the `fda.ui.application/src/main/scripts`.
# Development
The application is build via maven (use `-DskipTests=true` option to skip tests) . Use the toplevel `pom.xml` file to build the whole application. After the compilation
and packaging the resulting application zip file will be located in `fda.ui.application/target`.
## Changing Version
In the ch.psi.fda Eclipse project
* Change version in pom.xml (remove -SNAPSHOT)
* Compile and deploy the new ch.psi.fda jar file (Eclipse) via maven
* Run goal: `clean deploy`
* Change version in pom.xml (add -SNAPSHOT)
In ch.psi.fda.ui.module (Netbeans) project
* Change used ch.psi.fda version in `fda.ui.module` project pom (section dependencies) to the version you compiled and deployed before
* Change project version in pom.xml of all projects:
* pom.xml
* fda.ui.application
* fda.ui.module
* Change version in branding file:
* `./branding/src/main/nbm-branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties`
* Restart Netbeans (Workaround: due to compiling errors that cannot be otherwise easily resolved)
* Right click on fda.ui.parent project and select `Clean and Build`
* Start and test GUI from within Netbeans
## Release
* Locate `fda.ui.application-<version>.zip` in `fda.ui.application/target`
* Rename file to `fda-<version>.zip`
* Upload file into the releases repository of artifactory (http://yoke/artifactory)

View File

@@ -1,149 +0,0 @@
<?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>ch.psi</groupId>
<artifactId>fda.ui</artifactId>
<version>1.1.40</version>
</parent>
<artifactId>application</artifactId>
<packaging>nbm-application</packaging>
<name>fda.ui - NB App</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<netbeans.run.params.ide/>
<netbeans.run.params>${netbeans.run.params.ide}</netbeans.run.params>
</properties>
<dependencies>
<dependency>
<groupId>org.netbeans.cluster</groupId>
<artifactId>platform</artifactId>
<version>${netbeans.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>branding</artifactId>
<version>${project.version}</version>
</dependency>
<!-- To run NbModuleSuite functional tests in src/test/java, use nbjunit (assumes RELEASE70 or later):
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-modules-nbjunit</artifactId>
<version>${netbeans.version}</version>
<scope>test</scope>
</dependency>
-->
<!-- To use Jelly in your functional tests, add or replace with:
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-modules-jellytools-platform</artifactId>
<version>${netbeans.version}</version>
<scope>test</scope>
</dependency>
-->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>fda.ui.cm</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>fda.ui.ce</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>fda.ui.ee</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>fda.ui.preferences</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>fda.ui.cdump</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<configuration>
<etcConfFile>src/main/resources/fda.conf</etcConfFile>
</configuration>
</plugin>
<!-- To run NbModuleSuite in integration-test phase:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.1</version>
<configuration>
<systemProperties>
<property>
<name>cluster.path.final</name>
<value>${project.build.directory}/${brandingToken}/${brandingToken}:${project.build.directory}/${brandingToken}/platform</value>
</property>
</systemProperties>
</configuration>
</plugin>
-->
<!-- Copy additional start scripts to bin folder -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>copy-resources</id>
<!-- here the phase you need -->
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/fda/bin</outputDirectory>
<resources>
<resource>
<directory>src/main/scripts</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>deployment</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<executions>
<execution>
<id>extra</id>
<goals>
<goal>autoupdate</goal>
<goal>webstart-app</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@@ -1,78 +0,0 @@
<?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>ch.psi</groupId>
<artifactId>fda.ui</artifactId>
<version>1.1.40</version>
</parent>
<artifactId>branding</artifactId>
<packaging>nbm</packaging>
<name>fda.ui - NB App Branding</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-api-annotations-common</artifactId>
<version>${netbeans.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
</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>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>compile</phase>
<configuration>
<target name="run">
<!-- http://blogs.kiyut.com/tonny/2007/08/06/netbeans-platform-branding-and-version-info/ -->
<!-- <propertyfile
file="src/main//branding/core/core.jar/org/netbeans/core/startup/Bundle.properties"
comment="Updated by build script">
<entry key="currentVersion" value="${app.title} ${app.version} " />
</propertyfile>-->
<propertyfile
file="src/main/nbm-branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties">
<entry key="CTL_MainWindow_Title" value="FDA ${project.version}" />
<entry key="CTL_MainWindow_Title_No_Project" value="FDA ${project.version}" />
</propertyfile>
<replaceregexp file="src/main/nbm-branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties" match="^#.*\n" replace="" byline="false" />
<!-- <propertyfile
file="${basedir}/branding/modules/org-netbeans-core.jar/org/netbeans/core/ui/Bundle.properties"
comment="Updated by build script">
<entry key="LBL_ProductInformation" value="${app.title}" />
</propertyfile>-->
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -1,2 +0,0 @@
CTL_MainWindow_Title=FDA 1.1.40
CTL_MainWindow_Title_No_Project=FDA 1.1.40

View File

@@ -1,2 +0,0 @@
Manifest-Version: 1.0
OpenIDE-Module-Localizing-Bundle: ch/psi/fda/ui/branding/Bundle.properties

4
fda.ui.application/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
/config/
/data/
/scans/
/logs/

View File

@@ -0,0 +1,68 @@
<?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>ch.psi</groupId>
<artifactId>fda.ui</artifactId>
<version>3.5.0_zmq</version>
</parent>
<artifactId>fda.ui.application</artifactId>
<packaging>nbm-application</packaging>
<name>ch.psi.fda.ui.application</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.netbeans.cluster</groupId>
<artifactId>platform</artifactId>
<version>${netbeans.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>fda.ui.module</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<version>3.13</version>
<configuration>
<etcConfFile>src/main/resources/fda.conf</etcConfFile>
</configuration>
</plugin>
<!-- Copy additional start scripts to bin folder -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/fda/bin</outputDirectory>
<resources>
<resource>
<directory>src/main/scripts</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -37,4 +37,4 @@ do
done
# Execute java
java -Xmx1024m -XX:MaxPermSize=128m -cp $CLASSPATH -Dch.psi.fda.home=${APPLICATION_HOME} -Djava.util.logging.config.file=${APPLICATION_HOME}/config/logging.properties $VM_ARGUMENTS ch.psi.fda.co.ConversionEngine $ARGUMENTS
java -Xmx1024m -XX:MaxPermSize=128m -cp $CLASSPATH -Dch.psi.fda.home=${APPLICATION_HOME} -Djava.util.logging.config.file=${APPLICATION_HOME}/config/logging.properties $VM_ARGUMENTS ch.psi.fda.ui.ConversionMain $ARGUMENTS

View File

@@ -37,4 +37,4 @@ do
done
# Execute java
java -Xmx1024m -XX:MaxPermSize=128m -Dch.psi.fda.home=${APPLICATION_HOME} $VM_ARGUMENTS -cp $CLASSPATH ch.psi.fda.aq.AcquisitionMain $ARGUMENTS
java -Xmx1024m -XX:MaxPermSize=128m -Dch.psi.fda.home=${APPLICATION_HOME} $VM_ARGUMENTS -cp $CLASSPATH ch.psi.fda.ui.AcquisitionMain $ARGUMENTS

View File

@@ -37,4 +37,4 @@ do
done
# Execute java
java -Xmx1024m -XX:MaxPermSize=128m -cp $CLASSPATH -Dch.psi.fda.home=${APPLICATION_HOME} -Djava.util.logging.config.file=${APPLICATION_HOME}/config/logging.properties $VM_ARGUMENTS ch.psi.fda.vis.VisualizationEngine $ARGUMENTS
java -Xmx1024m -XX:MaxPermSize=128m -cp $CLASSPATH -Dch.psi.fda.home=${APPLICATION_HOME} -Djava.util.logging.config.file=${APPLICATION_HOME}/config/logging.properties $VM_ARGUMENTS ch.psi.fda.ui.VisualizationMain $ARGUMENTS

View File

@@ -1,132 +0,0 @@
<?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>
<artifactId>fda.ui</artifactId>
<groupId>ch.psi</groupId>
<version>1.1.40</version>
</parent>
<artifactId>fda.ui.cdump</artifactId>
<packaging>nbm</packaging>
<name>fda.ui.cdump NetBeans Module</name>
<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.netbeans.api</groupId>
<artifactId>org-netbeans-api-annotations-common</artifactId>
<version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-windows</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-modules-settings</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-io</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util-lookup</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-awt</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-dialogs</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>ch.psi</groupId>
<artifactId>fda.ui.preferences</artifactId>
<version>${project.version}</version>
<type>nbm</type>
</dependency>
<dependency>
<groupId>ch.psi</groupId>
<artifactId>cdump</artifactId>
<version>0.9.6-SNAPSHOT</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>ch.psi</groupId>
<artifactId>ch.psi.fdaq</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<extensions>true</extensions>
</plugin>
<plugin>
<!-- NetBeans 6.9+ requires JDK 6 -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<!-- to have the jar plugin pickup the nbm generated manifest -->
<useDefaultManifestFile>true</useDefaultManifestFile>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@@ -1,4 +0,0 @@
Manifest-Version: 1.0
OpenIDE-Module-Localizing-Bundle: ch/psi/fda/ui/cdump/Bundle.properties
OpenIDE-Module-Layer: ch/psi/fda/ui/cdump/layer.xml
OpenIDE-Module-Requires: org.openide.windows.WindowManager

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<nbm>
<!--
<moduleType>autoload</moduleType>
<codeNameBase>ch.psi.fda.ui.cdump/1</codeNameBase>
<licenseName>Apache License, Version 2.0</licenseName>
<licenseFile>license.txt</licenseFile>
-->
</nbm>

View File

@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.0//EN" "http://www.netbeans.org/dtds/filesystem-1_0.dtd">
<filesystem>
<folder name="Actions">
<folder name="Window">
<file name="ch-psi-fda-ui-cdump-CdumpExecutionAction.instance">
<attr name="component" methodvalue="ch.psi.fda.ui.cdump.CdumpExecutionTopComponent.findInstance"/>
<attr name="displayName" bundlevalue="ch.psi.fda.ui.cdump.Bundle#CTL_CdumpExecutionAction"/>
<attr name="instanceCreate" methodvalue="org.openide.windows.TopComponent.openAction"/>
</file>
</folder>
</folder>
<folder name="Menu">
<folder name="Window">
<file name="CdumpExecutionAction.shadow">
<attr name="originalFile" stringvalue="Actions/Window/ch-psi-fda-ui-cdump-CdumpExecutionAction.instance"/>
</file>
</folder>
</folder>
<folder name="Windows2">
<folder name="Components">
<file name="CdumpExecutionTopComponent.settings" url="CdumpExecutionTopComponentSettings.xml"/>
</folder>
<folder name="Modes">
<folder name="editor">
<file name="CdumpExecutionTopComponent.wstcref" url="CdumpExecutionTopComponentWstcref.xml"/>
</folder>
</folder>
</folder>
</filesystem>

View File

@@ -1,5 +0,0 @@
Manifest-Version: 1.0
OpenIDE-Module-Localizing-Bundle: ch/psi/fda/ui/ce/Bundle.properties
OpenIDE-Module-Layer: ch/psi/fda/ui/ce/layer.xml
OpenIDE-Module-Requires: org.openide.windows.WindowManager
OpenIDE-Module: ch.psi.fda.ui.ce

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<nbm>
<!--
<moduleType>autoload</moduleType>
<codeNameBase>ch.psi.fda.ui.ce/1</codeNameBase>
<licenseName>Apache License, Version 2.0</licenseName>
<licenseFile>license.txt</licenseFile>
-->
</nbm>

View File

@@ -1,109 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.0//EN" "http://www.netbeans.org/dtds/filesystem-1_0.dtd">
<filesystem>
<folder name="Actions">
<folder name="File">
<file name="ch-psi-fda-ui-ce-ExecuteAction.instance">
<attr name="delegate" methodvalue="org.openide.awt.Actions.inject"/>
<attr name="displayName" bundlevalue="ch.psi.fda.ui.ce.Bundle#CTL_ExecuteAction"/>
<attr name="iconBase" stringvalue="ch/psi/fda/ui/ce/runProject24.png"/>
<attr name="injectable" stringvalue="ch.psi.fda.ui.ce.ExecuteAction"/>
<attr name="instanceCreate" methodvalue="org.openide.awt.Actions.context"/>
<attr name="noIconInMenu" boolvalue="false"/>
<attr name="selectionType" stringvalue="EXACTLY_ONE"/>
<attr name="type" stringvalue="ch.psi.fda.ui.ce.ExecuteCapability"/>
</file>
<file name="ch-psi-fda-ui-ce-NewAction.instance">
<attr name="delegate" newvalue="ch.psi.fda.ui.ce.NewAction"/>
<attr name="displayName" bundlevalue="ch.psi.fda.ui.ce.Bundle#CTL_NewAction"/>
<attr name="instanceCreate" methodvalue="org.openide.awt.Actions.alwaysEnabled"/>
<attr name="noIconInMenu" boolvalue="false"/>
</file>
</folder>
<folder name="View">
<file name="ch-psi-fda-ui-ce-ViewConfigurationAction.instance">
<attr name="delegate" methodvalue="org.openide.awt.Actions.inject"/>
<attr name="displayName" bundlevalue="ch.psi.fda.ui.ce.Bundle#CTL_ViewConfigurationAction"/>
<attr name="injectable" stringvalue="ch.psi.fda.ui.ce.ViewConfigurationAction"/>
<attr name="instanceCreate" methodvalue="org.openide.awt.Actions.context"/>
<attr name="noIconInMenu" boolvalue="false"/>
<attr name="selectionType" stringvalue="EXACTLY_ONE"/>
<attr name="type" stringvalue="org.openide.loaders.DataObject"/>
</file>
</folder>
<!--Overwrite display name of default Open action-->
<!--<folder name="System">
<file name="org-openide-actions-OpenAction.instance">
<attr name="displayName" stringvalue="Edit"/>
</file>
</folder>-->
<folder name="Window">
<!--<file name="ch-psi-fda-ui-ce-VisualEditorAction.instance">
<attr name="component" methodvalue="ch.psi.fda.ui.ce.VisualEditorTopComponent.findInstance"/>
<attr name="displayName" bundlevalue="ch.psi.fda.ui.ce.Bundle#CTL_VisualEditorAction"/>
<attr name="instanceCreate" methodvalue="org.openide.windows.TopComponent.openAction"/>
</file>-->
</folder>
</folder>
<folder name="Loaders">
<folder name="text">
<folder name="x10+xml">
<folder name="Actions">
<file name="ch-psi-fda-ui-ce-ViewConfigurationAction-separatorAfter.instance">
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
<attr name="position" intvalue="50"/>
</file>
<file name="ch-psi-fda-ui-ce-ViewConfigurationAction.shadow">
<attr name="originalFile" stringvalue="Actions/View/ch-psi-fda-ui-ce-ViewConfigurationAction.instance"/>
<attr name="position" intvalue="0"/>
</file>
</folder>
</folder>
</folder>
</folder>
<folder name="Menu">
<folder name="File">
<file name="ch-psi-fda-ui-ce-NewAction.shadow">
<attr name="originalFile" stringvalue="Actions/File/ch-psi-fda-ui-ce-NewAction.instance"/>
<attr name="position" intvalue="1300"/>
</file>
</folder>
<folder name="Window">
<file name="VisualEditorAction.shadow">
<attr name="originalFile" stringvalue="Actions/Window/ch-psi-fda-ui-ce-VisualEditorAction.instance"/>
</file>
</folder>
</folder>
<folder name="Toolbars">
<folder name="File">
<file name="org-openide-actions-SaveAction.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-SaveAction.instance"/>
<attr name="position" intvalue="444"/>
</file>
<file name="org-openide-actions-SaveAllAction.shadow_hidden"/>
</folder>
<folder name="Run"> <!-- Run is a name I choose -->
<file name="ch-psi-fda-ui-ce-ExecuteAction.shadow">
<attr name="originalFile" stringvalue="Actions/File/ch-psi-fda-ui-ce-ExecuteAction.instance"/>
<attr name="position" intvalue="544"/>
</file>
</folder>
</folder>
<folder name="Shortcuts">
<file name="D-S.shadow">
<attr name="originalFile" stringvalue="Actions/System/org-openide-actions-SaveAction.instance"/>
</file>
</folder>
<folder name="Windows2">
<folder name="Components">
<file name="VisualEditorTopComponent.settings" url="VisualEditorTopComponentSettings.xml"/>
</folder>
<folder name="Modes">
<folder name="editor">
<file name="VisualEditorTopComponent.wstcref" url="VisualEditorTopComponentWstcref.xml"/>
</folder>
</folder>
</folder>
</filesystem>

View File

@@ -1,139 +0,0 @@
<?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>
<artifactId>fda.ui</artifactId>
<groupId>ch.psi</groupId>
<version>1.1.40</version>
</parent>
<artifactId>fda.ui.cm</artifactId>
<packaging>nbm</packaging>
<name>fda.ui.cm NetBeans Module</name>
<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.netbeans.api</groupId>
<artifactId>org-netbeans-api-annotations-common</artifactId>
<version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-filesystems</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-loaders</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util-lookup</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-explorer</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-nodes</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-text</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-windows</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>ch.psi</groupId>
<artifactId>fda.ui.preferences</artifactId>
<version>${project.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>ch.psi</groupId>
<artifactId>fda.ui.ee</artifactId>
<version>${project.version}</version>
<type>jar</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<publicPackages>
<publicPackage>ch.psi.fda.ui.cm</publicPackage>
<publicPackage>ch.psi.fda.ui.cm.fs</publicPackage>
</publicPackages>
</configuration>
</plugin>
<plugin>
<!-- NetBeans 6.9+ requires JDK 6 -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<!-- to have the jar plugin pickup the nbm generated manifest -->
<useDefaultManifestFile>true</useDefaultManifestFile>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@@ -1,5 +0,0 @@
Manifest-Version: 1.0
OpenIDE-Module-Localizing-Bundle: ch/psi/fda/ui/cm/Bundle.properties
OpenIDE-Module-Layer: ch/psi/fda/ui/cm/layer.xml
OpenIDE-Module: ch.psi.fda.ui.cm
OpenIDE-Module-Requires: org.openide.windows.WindowManager

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<nbm>
<!--
<moduleType>autoload</moduleType>
<codeNameBase>ch.psi.fda.ui.cm/1</codeNameBase>
<licenseName>Apache License, Version 2.0</licenseName>
<licenseFile>license.txt</licenseFile>
-->
</nbm>

View File

@@ -1,120 +0,0 @@
<?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>
<artifactId>fda.ui</artifactId>
<groupId>ch.psi</groupId>
<version>1.1.40</version>
</parent>
<artifactId>fda.ui.ee</artifactId>
<packaging>nbm</packaging>
<name>fda.ui.ee NetBeans Module</name>
<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
-->
</repositories>
<dependencies>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util</artifactId>
<version>${netbeans.version}</version>
<type>jar</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-util-lookup</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-api-progress</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-dialogs</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-io</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-modules</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-windows</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-modules-settings</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>ch.psi</groupId>
<artifactId>fda.ui.preferences</artifactId>
<version>${project.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>ch.psi</groupId>
<artifactId>fda</artifactId>
<version>1.1.40</version>
<type>jar</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<publicPackages>
<publicPackage>ch.psi.fda.model</publicPackage>
<publicPackage>ch.psi.fda.model.v1</publicPackage>
<publicPackage>ch.psi.fda.ui.ee.api</publicPackage>
</publicPackages>
</configuration>
</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>

View File

@@ -1,99 +0,0 @@
/*
* Copyright (C) 2011 Paul Scherrer Institute
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ch.psi.fda.ui.ee;
import ch.psi.fda.deserializer.DataDeserializer;
import ch.psi.fda.deserializer.DataDeserializerMDA;
import ch.psi.fda.deserializer.DataDeserializerTXT;
import ch.psi.fda.serializer.DataSerializer;
import ch.psi.fda.serializer.DataSerializerMAT;
import ch.psi.fda.serializer.DataSerializerMAT2D;
import ch.psi.fda.serializer.DataSerializerMAT2DZigZag;
import ch.psi.fda.serializer.DataSerializerMDA;
import ch.psi.fda.serializer.DataSerializerTXT;
import ch.psi.fda.serializer.DataSerializerTXT2D;
import ch.psi.fda.serializer.DataSerializerTXTSplit;
import ch.psi.fda.ui.ee.api.ConversionService;
import java.io.File;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.openide.DialogDisplayer;
import org.openide.NotifyDescriptor;
import org.openide.util.lookup.ServiceProvider;
import org.openide.windows.IOProvider;
import org.openide.windows.InputOutput;
/**
*
* @author ebner
*/
@ServiceProvider(service = ConversionService.class)
public class SimpleConversionService implements ConversionService {
@Override
public void convert(File input, File output, Reader reader, Writer writer) {
try {
Logger.getLogger(SimpleConversionService.class.getName()).log(Level.INFO, "Convert file {0} from {1} to {2}", new Object[]{input.getAbsolutePath(), reader, writer});
// Create deserializer
final DataDeserializer deserializer;
if (reader.equals(Reader.TXT)) {
deserializer = new DataDeserializerTXT(input);
} else if (reader.equals(Reader.MDA)) {
deserializer = new DataDeserializerMDA(input);
} else {
throw new IllegalArgumentException("Reader of type " + reader + " not supported.");
}
final DataSerializer serializer;
if (writer.equals(Writer.MAT)) {
serializer = new DataSerializerMAT(deserializer.getQueue(), output);
} else if (writer.equals(Writer.MAT_2D)) {
serializer = new DataSerializerMAT2D(deserializer.getQueue(), output);
} else if (writer.equals(Writer.TXT)) {
serializer = new DataSerializerTXT(deserializer.getQueue(), output, false);
} else if (writer.equals(Writer.TXT_2D)) {
serializer = new DataSerializerTXT2D(deserializer.getQueue(), output);
} else if (writer.equals(Writer.TXT_SPLIT)) {
serializer = new DataSerializerTXTSplit(deserializer.getQueue(), output);
} else if (writer.equals(Writer.MDA)) {
serializer = new DataSerializerMDA(deserializer.getQueue(), output);
} else if (writer.equals(Writer.MAT_2D_Z)) {
serializer = new DataSerializerMAT2DZigZag(deserializer.getQueue(), output);
} else {
throw new IllegalArgumentException("Writer of type " + writer + " not supported.");
}
// Convert file
deserializer.run();
serializer.run();
} catch (Exception e) {
// Inform the user without waiting for its response
NotifyDescriptor d = new NotifyDescriptor.Message("An error occured while converting '" + input.getName() + "':\n" + e.getMessage(), NotifyDescriptor.ERROR_MESSAGE);
DialogDisplayer.getDefault().notifyLater(d);
// Print exception to output window of the application
InputOutput io = IOProvider.getDefault().getIO("Error", false);
// Set output console visible
io.select();
io.getOut().println("Conversion of '" + input.getName() + "' failed");
e.printStackTrace(io.getErr());
}
}
}

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<nbm>
<!--
<moduleType>autoload</moduleType>
<codeNameBase>ch.psi.fda.ui/1</codeNameBase>
<licenseName>Apache License, Version 2.0</licenseName>
<licenseFile>license.txt</licenseFile>
-->
</nbm>

View File

@@ -1,10 +0,0 @@
# Localized module labels. Defaults taken from POM (<name>, <description>, <groupId>) if unset.
#OpenIDE-Module-Name=
#OpenIDE-Module-Short-Description=
#OpenIDE-Module-Long-Description=
#OpenIDE-Module-Display-Category=
CTL_AbortAllAction=Abort All
CTL_ExportAsPNGAction=Export as PNGs
CTL_PlotVisualizerAction=Visualization
CTL_PlotVisualizerTopComponent=Visualization
HINT_PlotVisualizerTopComponent=This is a Visualization window

View File

@@ -1,64 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.0//EN" "http://www.netbeans.org/dtds/filesystem-1_0.dtd">
<filesystem>
<folder name="Actions">
<folder name="File">
<file name="ch-psi-fda-ui-ee-AbortAllAction.instance">
<attr name="delegate" newvalue="ch.psi.fda.ui.ee.AbortAllAction"/>
<attr name="displayName" bundlevalue="ch.psi.fda.ui.ee.Bundle#CTL_AbortAllAction"/>
<attr name="iconBase" stringvalue="ch/psi/fda/ui/ee/stop.png"/>
<attr name="instanceCreate" methodvalue="org.openide.awt.Actions.alwaysEnabled"/>
<attr name="noIconInMenu" boolvalue="false"/>
</file>
</folder>
<folder name="Tools">
<file name="ch-psi-fda-ui-ee-ExportAsPNGAction.instance">
<attr name="delegate" methodvalue="org.openide.awt.Actions.inject"/>
<attr name="displayName" bundlevalue="ch.psi.fda.ui.ee.Bundle#CTL_ExportAsPNGAction"/>
<attr name="injectable" stringvalue="ch.psi.fda.ui.ee.ExportAsPNGAction"/>
<attr name="instanceCreate" methodvalue="org.openide.awt.Actions.context"/>
<attr name="noIconInMenu" boolvalue="false"/>
<attr name="selectionType" stringvalue="EXACTLY_ONE"/>
<attr name="type" stringvalue="ch.psi.fda.ui.ee.ExportCapability"/>
</file>
</folder>
<folder name="Window">
<file name="ch-psi-fda-ui-ee-PlotVisualizerAction.instance">
<attr name="component" methodvalue="ch.psi.fda.ui.ee.PlotVisualizerTopComponent.findInstance"/>
<attr name="displayName" bundlevalue="ch.psi.fda.ui.ee.Bundle#CTL_PlotVisualizerAction"/>
<attr name="instanceCreate" methodvalue="org.openide.windows.TopComponent.openAction"/>
</file>
</folder>
</folder>
<folder name="Menu">
<folder name="Tools">
<file name="ch-psi-fda-ui-ee-ExportAsPNGAction.shadow">
<attr name="originalFile" stringvalue="Actions/Tools/ch-psi-fda-ui-ee-ExportAsPNGAction.instance"/>
<attr name="position" intvalue="10"/>
</file>
</folder>
<folder name="Window">
<file name="PlotVisualizerAction.shadow">
<attr name="originalFile" stringvalue="Actions/Window/ch-psi-fda-ui-ee-PlotVisualizerAction.instance"/>
</file>
</folder>
</folder>
<folder name="Toolbars">
<folder name="Run">
<file name="ch-psi-fda-ui-ee-AbortAllAction.shadow">
<attr name="originalFile" stringvalue="Actions/File/ch-psi-fda-ui-ee-AbortAllAction.instance"/>
<attr name="position" intvalue="644"/>
</file>
</folder>
</folder>
<folder name="Windows2">
<folder name="Components">
<file name="PlotVisualizerTopComponent.settings" url="PlotVisualizerTopComponentSettings.xml"/>
</folder>
<folder name="Modes">
<folder name="editor">
<file name="PlotVisualizerTopComponent.wstcref" url="PlotVisualizerTopComponentWstcref.xml"/>
</folder>
</folder>
</folder>
</filesystem>

View File

View File

@@ -1,151 +1,167 @@
<?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>
<artifactId>fda.ui</artifactId>
<groupId>ch.psi</groupId>
<version>1.1.40</version>
</parent>
<artifactId>fda.ui.ce</artifactId>
<packaging>nbm</packaging>
<name>fda.ui.ce NetBeans Module</name>
<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.netbeans.api</groupId>
<artifactId>org-netbeans-api-annotations-common</artifactId>
<version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-filesystems</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-loaders</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-modules-settings</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-io</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util-lookup</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-dialogs</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-nodes</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-windows</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>ch.psi</groupId>
<artifactId>fda.ui.preferences</artifactId>
<version>${project.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>ch.psi</groupId>
<artifactId>fda.ui.ee</artifactId>
<version>${project.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>ch.psi</groupId>
<artifactId>fda.ui.cm</artifactId>
<version>${project.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<type>jar</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<extensions>true</extensions>
</plugin>
<plugin>
<!-- NetBeans 6.9+ requires JDK 6 -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<!-- to have the jar plugin pickup the nbm generated manifest -->
<useDefaultManifestFile>true</useDefaultManifestFile>
</configuration>
</plugin>
</plugins>
</build>
</project>
<?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>
<artifactId>fda.ui</artifactId>
<groupId>ch.psi</groupId>
<version>3.5.0_zmq</version>
</parent>
<artifactId>fda.ui.module</artifactId>
<packaging>nbm</packaging>
<name>ch.psi.fda.ui.module</name>
<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
-->
</repositories>
<dependencies>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-modules-options-api</artifactId>
<version>${netbeans.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-filesystems</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-explorer</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-nodes</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-loaders</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util</artifactId>
<version>${netbeans.version}</version>
<type>jar</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-util-lookup</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-api-progress</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-dialogs</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-io</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-modules</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-windows</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-modules-settings</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-awt</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>ch.psi</groupId>
<artifactId>fda</artifactId>
<version>2.5.1_zmq</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
<type>jar</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>plot</artifactId>
<version>2.1-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<version>3.8.1</version>
<extensions>true</extensions>
<configuration>
<publicPackages>
<publicPackage>ch.psi.fda.model</publicPackage>
<publicPackage>ch.psi.fda.model.v1</publicPackage>
<publicPackage>ch.psi.fda.ui.ee.api</publicPackage>
<publicPackage>org.xml.sax</publicPackage>
<publicPackage>ch.psi.fda.ui.cm</publicPackage>
<publicPackage>ch.psi.fda.ui.cm.fs</publicPackage>
<publicPackage>ch.psi.fda.ui.preferences.api</publicPackage>
</publicPackages>
</configuration>
</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>

View File

@@ -32,7 +32,7 @@
</Group>
<Component id="jButton1" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="108" max="32767" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
<Component id="jPanel1" alignment="1" max="32767" attributes="0"/>
</Group>
@@ -62,7 +62,7 @@
<Component class="javax.swing.JComboBox" name="jComboBox1">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="new javax.swing.DefaultComboBoxModel(RunConfiguration.rates)" type="code"/>
<Connection code="new javax.swing.DefaultComboBoxModel(Cdump.SAMPLING_RATES)" type="code"/>
</Property>
</Properties>
</Component>
@@ -106,14 +106,34 @@
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="jTextField2" min="-2" pref="176" max="-2" attributes="0"/>
</Group>
<Component id="jButton2" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="jTextField2" min="-2" pref="176" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace min="21" pref="21" max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel6" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="comboNumberPoints" max="32767" attributes="0"/>
<Component id="comboSubsampling" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<Component id="checkPlot" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<Component id="jButton2" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="113" max="32767" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -121,15 +141,32 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel3" min="-2" pref="14" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jTextField2" alignment="3" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jTextField2" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="jButton2" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="checkPlot" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="comboNumberPoints" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="comboSubsampling" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="jButton2" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="90" max="32767" attributes="0"/>
<EmptySpace pref="68" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -166,6 +203,63 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel5">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="ch/psi/fda/ui/cdump/Bundle.properties" key="CdumpExecutionTopComponent.jLabel5.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel6">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="ch/psi/fda/ui/cdump/Bundle.properties" key="CdumpExecutionTopComponent.jLabel6.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JComboBox" name="comboNumberPoints">
<Properties>
<Property name="editable" type="boolean" value="true"/>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="7">
<StringItem index="0" value="100"/>
<StringItem index="1" value="200"/>
<StringItem index="2" value="500"/>
<StringItem index="3" value="1000"/>
<StringItem index="4" value="2000"/>
<StringItem index="5" value="5000"/>
<StringItem index="6" value="10000"/>
</StringArray>
</Property>
<Property name="selectedIndex" type="int" value="3"/>
</Properties>
</Component>
<Component class="javax.swing.JComboBox" name="comboSubsampling">
<Properties>
<Property name="editable" type="boolean" value="true"/>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="5">
<StringItem index="0" value="1"/>
<StringItem index="1" value="10"/>
<StringItem index="2" value="100"/>
<StringItem index="3" value="1000"/>
<StringItem index="4" value="10000"/>
</StringArray>
</Property>
<Property name="selectedIndex" type="int" value="2"/>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="checkPlot">
<Properties>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="ch/psi/fda/ui/cdump/Bundle.properties" key="CdumpExecutionTopComponent.checkPlot.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="checkPlotActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
</SubComponents>

View File

@@ -16,25 +16,38 @@
*/
package ch.psi.fda.ui.cdump;
import ch.psi.cdump.CdumpConfiguration;
import ch.psi.cdump.CdumpService;
import ch.psi.cdump.RunConfiguration;
import ch.psi.fda.aq.AcquisitionConfiguration;
import ch.psi.fda.cdump.Cdump;
import ch.psi.fda.cdump.CdumpConfiguration;
import ch.psi.fda.fdaq.Fdaq;
import ch.psi.fda.fdaq.FdaqConfiguration;
import ch.psi.fda.model.v1.Visualization;
import ch.psi.fda.serializer.SerializerTXT;
import ch.psi.fda.ui.ee.PlotVisualizerTopComponent;
import ch.psi.fda.ui.preferences.api.Preferences;
import ch.psi.fdaq.FdaqConfiguration;
import ch.psi.fdaq.FdaqService;
import ch.psi.fda.ui.visualizer.Visualizer;
import ch.psi.fda.vdescriptor.LinePlot;
import ch.psi.fda.vdescriptor.VDescriptor;
import ch.psi.fda.vdescriptor.XYSeries;
import ch.psi.jcae.ChannelService;
import ch.psi.jcae.impl.DefaultChannelService;
import com.google.common.eventbus.AsyncEventBus;
import com.google.common.eventbus.EventBus;
import java.io.File;
import java.util.Date;
import java.util.List;
import java.util.concurrent.Executors;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.openide.util.NbBundle;
import org.openide.windows.TopComponent;
import org.openide.windows.WindowManager;
import org.netbeans.api.settings.ConvertAsProperties;
import org.openide.DialogDisplayer;
import org.openide.NotifyDescriptor;
import org.openide.util.Lookup;
import org.openide.util.NbBundle;
import org.openide.windows.IOProvider;
import org.openide.windows.InputOutput;
import org.openide.windows.TopComponent;
import org.openide.windows.WindowManager;
/**
* Top component which displays something.
@@ -44,12 +57,11 @@ autostore = false)
public final class CdumpExecutionTopComponent extends TopComponent {
private static CdumpExecutionTopComponent instance;
/** path to the icon used by the component and its open action */
// static final String ICON_PATH = "SET/PATH/TO/ICON/HERE";
private static final String PREFERRED_ID = "CdumpExecutionTopComponent";
private CdumpService service;
private FdaqService fdaqService;
final ChannelService cservice = new DefaultChannelService();
private Cdump service;
private Fdaq fdaqService;
public CdumpExecutionTopComponent() {
initComponents();
@@ -81,8 +93,13 @@ public final class CdumpExecutionTopComponent extends TopComponent {
jLabel4 = new javax.swing.JLabel();
jTextField2 = new javax.swing.JTextField();
jButton2 = new javax.swing.JButton();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
comboNumberPoints = new javax.swing.JComboBox();
comboSubsampling = new javax.swing.JComboBox();
checkPlot = new javax.swing.JCheckBox();
jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(RunConfiguration.rates));
jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(Cdump.SAMPLING_RATES));
org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(CdumpExecutionTopComponent.class, "CdumpExecutionTopComponent.jLabel1.text")); // NOI18N
@@ -110,6 +127,26 @@ public final class CdumpExecutionTopComponent extends TopComponent {
}
});
org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(CdumpExecutionTopComponent.class, "CdumpExecutionTopComponent.jLabel5.text")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(jLabel6, org.openide.util.NbBundle.getMessage(CdumpExecutionTopComponent.class, "CdumpExecutionTopComponent.jLabel6.text")); // NOI18N
comboNumberPoints.setEditable(true);
comboNumberPoints.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "100", "200", "500", "1000", "2000", "5000", "10000" }));
comboNumberPoints.setSelectedIndex(3);
comboSubsampling.setEditable(true);
comboSubsampling.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "10", "100", "1000", "10000" }));
comboSubsampling.setSelectedIndex(2);
checkPlot.setSelected(true);
org.openide.awt.Mnemonics.setLocalizedText(checkPlot, org.openide.util.NbBundle.getMessage(CdumpExecutionTopComponent.class, "CdumpExecutionTopComponent.checkPlot.text")); // NOI18N
checkPlot.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
checkPlotActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
@@ -119,24 +156,50 @@ public final class CdumpExecutionTopComponent extends TopComponent {
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel3)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel4)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel4)
.addGap(18, 18, 18)
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 176, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jButton2))
.addGap(18, 18, 18)
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 176, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jButton2))
.addContainerGap(113, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(21, 21, 21)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel5, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel6, javax.swing.GroupLayout.Alignment.LEADING))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(comboNumberPoints, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(comboSubsampling, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addComponent(checkPlot))))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel3)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel4)
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton2)
.addContainerGap(90, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel4)
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(jButton2))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(checkPlot)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel6)
.addComponent(comboNumberPoints, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel5)
.addComponent(comboSubsampling, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addContainerGap(68, Short.MAX_VALUE))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
@@ -155,7 +218,7 @@ public final class CdumpExecutionTopComponent extends TopComponent {
.addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)))
.addComponent(jButton1))
.addContainerGap(108, Short.MAX_VALUE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
@@ -254,7 +317,16 @@ public final class CdumpExecutionTopComponent extends TopComponent {
}
}//GEN-LAST:event_jButton2ActionPerformed
private void checkPlotActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkPlotActionPerformed
// TODO add your handling code here:
comboNumberPoints.setEnabled(checkPlot.isSelected());
comboSubsampling.setEnabled(checkPlot.isSelected());
}//GEN-LAST:event_checkPlotActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JCheckBox checkPlot;
private javax.swing.JComboBox comboNumberPoints;
private javax.swing.JComboBox comboSubsampling;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JComboBox jComboBox1;
@@ -262,6 +334,8 @@ public final class CdumpExecutionTopComponent extends TopComponent {
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JPanel jPanel1;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
@@ -342,27 +416,28 @@ public final class CdumpExecutionTopComponent extends TopComponent {
*/
public void startAcquisition() {
Preferences p = Lookup.getDefault().lookup(Preferences.class);
System.setProperty("ch.psi.cdump.home", p.getHome().getAbsolutePath());
System.setProperty("ch.psi.fda.cdump.config.file", p.getHome().getAbsolutePath()+"/etc/cdump.properties");
Logger.getLogger(CdumpExecutionTopComponent.class.getName()).log(Level.INFO, "Start acquisition");
RunConfiguration c = new RunConfiguration();
c.setSamplingRate((String) jComboBox1.getSelectedItem());
// Calculate data file location/name
String fname = jTextField1.getText();
CdumpConfiguration cc = CdumpConfiguration.getInstance();
String d = cc.getDataDirectory() + "/" + cc.replaceMacros(cc.getFilePrefix(), new Date(), fname) + fname + ".txt";
File f = new File(d);
AcquisitionConfiguration config = ch.psi.fda.ui.ee.Configuration.getInstance().getConfiguration();
String fileName = config.getDataBaseDirectory() + "/" + config.replaceMacros(config.getDataFilePrefix(), new Date(), fname) + fname + ".txt";
File f = new File(fileName);
f.getParentFile().mkdirs(); // Create data base directory
// Set file to save data
c.setDatafile(f);
// Create execution service
service = new CdumpService();
// Take data
service.startAcquisition(c);
// Create execution service
EventBus eventbus = new AsyncEventBus(Executors.newSingleThreadExecutor());
service = new Cdump(cservice, eventbus, new CdumpConfiguration());
SerializerTXT serializer = new SerializerTXT(f);
serializer.setShowDimensionHeader(false);
eventbus.register(serializer);
String samplingRate = (String) jComboBox1.getSelectedItem();
service.acquire(samplingRate);
}
/**
@@ -372,45 +447,107 @@ public final class CdumpExecutionTopComponent extends TopComponent {
if(service != null){
Logger.getLogger(CdumpExecutionTopComponent.class.getName()).log(Level.INFO, "Stop acquisition");
service.stopAcquisition();
service.stop();
}
}
public void startAcquisitionFdaq() {
final boolean showPlot = checkPlot.isSelected();
final int itemCount = Integer.valueOf(comboNumberPoints.getSelectedItem().toString());
final int subsamplingFactor = Integer.valueOf(comboSubsampling.getSelectedItem().toString());
final PlotVisualizerTopComponent tc = PlotVisualizerTopComponent.findInstance();
new Thread(new Runnable() {
// // Destroy jca context to let the program abort
// try {
// ChannelBeanFactory.getFactory().getChannelFactory().getContext().destroy();
// } catch (IllegalStateException e) {
// throw new RuntimeException(e);
// } catch (CAException e) {
// throw new RuntimeException(e);
// }
@Override
public void run() {
try{
acquireFdaq(tc, showPlot, itemCount, subsamplingFactor);
}
catch (Exception ex){
Logger.getLogger(CdumpExecutionTopComponent.class.getName()).log(Level.WARNING,null,ex);
}
}
}).start();
if (showPlot){
tc.requestVisible();
}
}
public void startAcquisitionFdaq() {
public void acquireFdaq(PlotVisualizerTopComponent tc, boolean showPlot, int itemCount, int subsamplingFactor) {
Preferences p = Lookup.getDefault().lookup(Preferences.class);
System.setProperty(FdaqService.APP_HOME, p.getHome().getAbsolutePath());
// TODO currently only the hardcoded configurations are supported
// The ch.psi.fda.fdaq.config.file configuration file is not set base on FDA_HOME ...
FdaqConfiguration configuration = new FdaqConfiguration();
EventBus bus = new AsyncEventBus(Executors.newSingleThreadExecutor());
fdaqService = new Fdaq(bus, configuration);
String fname = jTextField2.getText();
AcquisitionConfiguration config = ch.psi.fda.ui.ee.Configuration.getInstance().getConfiguration();
String fileName = config.getDataBaseDirectory() + "/" + config.replaceMacros(config.getDataFilePrefix(), new Date(), fname) + fname + ".txt";
File f = new File(fileName);
f.getParentFile().mkdirs(); // Create data base directory
SerializerTXT serializer = new SerializerTXT(f, false);
serializer.setShowDimensionHeader(false);
bus.register(serializer);
// This stop ensures that the data server is in a good shape (i.e. gets restarted)
// We need to wait a certain amount of time to have the server restarted.
fdaqService.stop();
try {
Thread.sleep(1000); // TODO check whether this sleep is really necessary
} catch (InterruptedException e) {
e.printStackTrace();
}
Logger.getLogger(CdumpExecutionTopComponent.class.getName()).log(Level.INFO, "Start fdaq acquisition");
// Calculate data file location/name
String fname = jTextField2.getText();
FdaqConfiguration cc = FdaqConfiguration.getInstance();
String d = cc.getDataDirectory() + "/" + cc.replaceMacros(cc.getFilePrefix(), new Date(), fname) + fname + ".txt";
File f = new File(d);
f.getParentFile().mkdirs(); // Create data base directory
if (showPlot) {
VDescriptor vd = new VDescriptor();
//LinePlot lineplot = new LinePlot();
for (String plot: new String[]{"ain1","ain2","ain3","ain4","enc1"}){
LinePlot lineplot = new LinePlot(plot);
XYSeries series = new XYSeries("counter", plot);
series.setMaxItemCount(itemCount);
lineplot.getData().add(series);
vd.getPlots().add(lineplot);
}
//vd.getPlots().add(lineplot);
String linePlotImpl=Lookup.getDefault().lookup(Preferences.class).getLinePlotImpl();
Visualizer visualizer = new Visualizer(vd,linePlotImpl);
visualizer.setSubsampling(subsamplingFactor);
bus.register(visualizer);
tc.updatePanel(visualizer.getPlotPanels());
}
// Create execution service
fdaqService = new FdaqService();
fdaqService.acquire();
// Take data
fdaqService.startAcquisition(f);
// // Calculate data file location/name
// String fname = jTextField2.getText();
// FdaqConfiguration cc = FdaqConfiguration.getInstance();
// String d = cc.getDataDirectory() + "/" + cc.replaceMacros(cc.getFilePrefix(), new Date(), fname) + fname + ".txt";
// File f = new File(d);
// f.getParentFile().mkdirs(); // Create data base directory
//
// // Create execution service
// fdaqService = new FdaqService();
//
// // Take data
// fdaqService.startAcquisition(f);
}
public void stopAcquisitionFdaq() {
if(fdaqService != null){
Logger.getLogger(CdumpExecutionTopComponent.class.getName()).log(Level.INFO, "Stop fdaq acquisition");
fdaqService.stopAcquisition();
fdaqService.stop();
}
}

Some files were not shown because too many files have changed in this diff Show More