summaryrefslogtreecommitdiff
path: root/BKULocal
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-10-31 15:30:34 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-10-31 15:30:34 +0000
commit4032e46810c24dc3f013de296a2133f4651696b9 (patch)
tree2c81a1a0f3ddec6b9901c61d7fb887b418d8e3a6 /BKULocal
parent35096aca11df113631a982554e85a22fff350813 (diff)
downloadmocca-4032e46810c24dc3f013de296a2133f4651696b9.tar.gz
mocca-4032e46810c24dc3f013de296a2133f4651696b9.tar.bz2
mocca-4032e46810c24dc3f013de296a2133f4651696b9.zip
local HelpListener
card locked/not activated git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@137 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKULocal')
-rw-r--r--BKULocal/pom.xml119
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/gui/LocalHelpListener.java41
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java11
3 files changed, 109 insertions, 62 deletions
diff --git a/BKULocal/pom.xml b/BKULocal/pom.xml
index 204fa6b9..03a6a10b 100644
--- a/BKULocal/pom.xml
+++ b/BKULocal/pom.xml
@@ -1,25 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <parent>
- <artifactId>bku</artifactId>
- <groupId>at.gv.egiz</groupId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>at.gv.egiz</groupId>
- <artifactId>BKULocal</artifactId>
- <packaging>war</packaging>
- <name>BKU Local</name>
- <version>1.0-SNAPSHOT</version>
- <description />
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>bku</artifactId>
+ <groupId>at.gv.egiz</groupId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>at.gv.egiz</groupId>
+ <artifactId>BKULocal</artifactId>
+ <packaging>war</packaging>
+ <name>BKU Local</name>
+ <version>1.0-SNAPSHOT</version>
<scm>
<developerConnection>scm:svn:svn://svn.egovlabs.gv.at/svnroot/mocca/trunk/BKULocal</developerConnection>
<connection>scm:svn:svn://svn.egovlabs.gv.at/svnroot/mocca/trunk/BKULocal</connection>
<url>scm:svn:svn://svn.egovlabs.gv.at/svnroot/mocca/trunk/BKULocal</url>
- </scm>
+ </scm>
<build>
<plugins>
<plugin>
@@ -27,15 +24,11 @@
<version>2.0.2</version>
<configuration>
<manifest>
- <addDefaultImplementationEntries>
- true
- </addDefaultImplementationEntries>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<archive>
<manifestEntries>
- <Implementation-Build>
- ${project.version}-r${buildNumber}
- </Implementation-Build>
+ <Implementation-Build>${project.version}-r${buildNumber}</Implementation-Build>
</manifestEntries>
</archive>
</configuration>
@@ -59,47 +52,47 @@
</plugin>
</plugins>
</build>
-
- <dependencies>
- <dependency>
- <groupId>at.gv.egiz</groupId>
- <artifactId>STAL</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>at.gv.egiz</groupId>
- <artifactId>bkucommon</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>at.gv.egiz</groupId>
- <artifactId>smcc</artifactId>
- <version>1.0-SNAPSHOT</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>at.gv.egiz</groupId>
+ <artifactId>STAL</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>at.gv.egiz</groupId>
+ <artifactId>bkucommon</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>at.gv.egiz</groupId>
+ <artifactId>smcc</artifactId>
+ <version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>at.gv.egiz</groupId>
<artifactId>smccSTAL</artifactId>
<version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>2.5.5</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- <version>2.5.5</version>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>2.5.5</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>2.5.5</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>at.gv.egiz</groupId>
@@ -110,6 +103,10 @@
<groupId>at.gv.egiz</groupId>
<artifactId>BKUViewer</artifactId>
<version>1.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
-</project> \ No newline at end of file
+ </dependency>
+ </dependencies>
+
+ <properties>
+ <netbeans.hint.deploy.server>Tomcat60</netbeans.hint.deploy.server>
+ </properties>
+</project>
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/gui/LocalHelpListener.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/gui/LocalHelpListener.java
new file mode 100644
index 00000000..ebec9c65
--- /dev/null
+++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/gui/LocalHelpListener.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2008 Federal Chancellery Austria and
+ * Graz University of Technology
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package at.gv.egiz.bku.local.gui;
+
+import at.gv.egiz.bku.gui.AbstractHelpListener;
+import java.awt.Desktop;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+/**
+ *
+ * @author Clemens Orthacker <clemens.orthacker@iaik.tugraz.at>
+ */
+public class LocalHelpListener extends AbstractHelpListener {
+
+ public LocalHelpListener(URL baseURL, String locale) {
+ super(baseURL, locale);
+ }
+
+ @Override
+ public void showDocument(URL helpDocument) throws IOException, URISyntaxException {
+ Desktop.getDesktop().browse(helpDocument.toURI());
+ }
+
+}
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java
index df5c2b28..d3530332 100644
--- a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java
+++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/SMCCSTALFactory.java
@@ -18,6 +18,7 @@ package at.gv.egiz.bku.local.stal;
import java.awt.Dimension;
import java.awt.Toolkit;
+import java.net.MalformedURLException;
import java.util.Locale;
import java.util.ResourceBundle;
@@ -26,9 +27,11 @@ import javax.swing.WindowConstants;
import at.gv.egiz.bku.gui.BKUGUIFacade;
import at.gv.egiz.bku.gui.BKUGUIFactory;
+import at.gv.egiz.bku.local.gui.LocalHelpListener;
import at.gv.egiz.bku.online.applet.BKUApplet;
import at.gv.egiz.stal.STAL;
import at.gv.egiz.stal.STALFactory;
+import java.net.URL;
public class SMCCSTALFactory implements STALFactory {
@@ -48,7 +51,13 @@ public class SMCCSTALFactory implements STALFactory {
}
dialog = new JDialog();
BKUGUIFacade gui = BKUGUIFactory.createGUI(BKUGUIFactory.ADVANCED_GUI);
- gui.init(dialog.getContentPane(), locale.toString(), null, null);
+ LocalHelpListener helpListener =null;
+ try {
+ helpListener = new LocalHelpListener(new URL("http://localhost:3495/help"), "en");
+ } catch (MalformedURLException ex) {
+ ex.printStackTrace();
+ }
+ gui.init(dialog.getContentPane(), locale.toString(), null, helpListener);
stal = new SMCCSTAL(new BKUGuiProxy(dialog, gui), dialog, resourceBundle);
dialog.setPreferredSize(new Dimension(400, 200));
dialog.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);