Revision 165
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
3 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 |
|
4 |
http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
5 |
|
|
6 |
<modelVersion>4.0.0</modelVersion> |
|
7 |
<groupId>org.gvsig</groupId> |
|
8 |
<artifactId>org.gvsig.scripting.swing.api</artifactId> |
|
9 |
<packaging>jar</packaging> |
|
10 |
<version>1.0-SNAPSHOT</version> |
|
11 |
<name>org.gvsig.scripting.swing.api</name> |
|
12 |
<description>[PUT LIBRARY DESCRIPTION HERE]</description> |
|
13 |
<url>http://www.gvsig.org</url> |
|
14 |
<parent> |
|
15 |
<groupId>org.gvsig</groupId> |
|
16 |
<artifactId>org.gvsig.scripting.swing</artifactId> |
|
17 |
<version>1.0-SNAPSHOT</version> |
|
18 |
</parent> |
|
19 |
<scm> |
|
20 |
<connection>scm:svn:http://subversion.gvsig.org/gvSIG/branches/v2_0_0_prep/libraries/org.gvsig.scripting</connection> |
|
21 |
<developerConnection>scm:svn:https://gvsig.org/svn/gvSIG/branches/v2_0_0_prep/libraries/org.gvsig.scripting</developerConnection> |
|
22 |
<url>http://subversion.gvsig.org/viewvc/?root=gvSIG</url> |
|
23 |
<tag>HEAD</tag> |
|
24 |
</scm> |
|
25 |
<properties> |
|
26 |
<build-dir>${basedir}/../../../build</build-dir> |
|
27 |
</properties> |
|
28 |
<developers> |
|
29 |
<developer> |
|
30 |
<id>developer1</id> |
|
31 |
<name>Name Surname</name> |
|
32 |
<email>name@domain</email> |
|
33 |
<roles> |
|
34 |
<role>Architect</role> |
|
35 |
<role>Developer</role> |
|
36 |
</roles> |
|
37 |
</developer> |
|
38 |
<developer> |
|
39 |
<id>developer2</id> |
|
40 |
<name>Name2 Surname</name> |
|
41 |
<email>name2@domain</email> |
|
42 |
<roles> |
|
43 |
<role>Developer</role> |
|
44 |
</roles> |
|
45 |
</developer> |
|
46 |
</developers> |
|
47 |
<dependencies> |
|
48 |
<dependency> |
|
49 |
<groupId>org.gvsig</groupId> |
|
50 |
<artifactId>org.gvsig.scripting.thing</artifactId> |
|
51 |
<version>1.0-SNAPSHOT</version> |
|
52 |
</dependency> |
|
53 |
<dependency> |
|
54 |
<groupId>org.gvsig</groupId> |
|
55 |
<artifactId>org.gvsig.about.api</artifactId> |
|
56 |
<version>1.0-SNAPSHOT</version> |
|
57 |
</dependency> |
|
58 |
<dependency> |
|
59 |
<groupId>org.gvsig</groupId> |
|
60 |
<artifactId>org.gvsig.scripting.lib.api</artifactId> |
|
61 |
<version>1.0-SNAPSHOT</version> |
|
62 |
</dependency> |
|
63 |
<dependency> |
|
64 |
<groupId>org.gvsig.legacy</groupId> |
|
65 |
<artifactId>jhall</artifactId> |
|
66 |
</dependency> |
|
67 |
</dependencies> |
|
68 |
<reporting> |
|
69 |
<plugins> |
|
70 |
<plugin> |
|
71 |
<groupId>org.apache.maven.plugins</groupId> |
|
72 |
<artifactId>maven-javadoc-plugin</artifactId> |
|
73 |
<configuration> |
|
74 |
<doctitle>${project.name} ${project.version}</doctitle> |
|
75 |
</configuration> |
|
76 |
<reportSets> |
|
77 |
<reportSet> |
|
78 |
<id>api</id> |
|
79 |
<configuration> |
|
80 |
<name>Javadoc: Swing</name> |
|
81 |
<destDir>apidoc</destDir> |
|
82 |
<windowtitle>Swing Documentation</windowtitle> |
|
83 |
<links> |
|
84 |
<link>http://java.sun.com/j2se/1.5.0/docs/api/</link> |
|
85 |
<link>http://www.slf4j.org/api/</link> |
|
86 |
<link>${site-repository}/org.gvsig.tools/2.0.0/apidocs/</link> |
|
87 |
<link>${site-repository}/org.gvsig.i18n/2.0.0/apidocs/</link> |
|
88 |
</links> |
|
89 |
</configuration> |
|
90 |
<reports> |
|
91 |
<report>javadoc</report> |
|
92 |
</reports> |
|
93 |
</reportSet> |
|
94 |
|
|
95 |
</reportSets> |
|
96 |
</plugin> |
|
97 |
</plugins> |
|
98 |
</reporting> |
|
99 |
</project> |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/README.txt | ||
---|---|---|
1 |
The project structure of this project is the following: |
|
2 |
|
|
3 |
Project |
|
4 |
|-pom.xml: Maven 2 configuration file. |
|
5 |
`-src |
|
6 |
|-main: Project source code, resources and configuration |
|
7 |
| |-java: Java source code |
|
8 |
| |-resources: Resources needed by the code (resource bundles, images, etc.) |
|
9 |
|`-javadoc: Javadoc common resources |
|
10 |
`-test: Unit tests source code, resources and configuration |
|
11 |
|-java: Unit tests java source code |
|
12 |
`-resources: Resources needed by the test code (resource bundles, images, etc.) |
|
13 |
|
|
14 |
Look at the main folders for a README.txt file with more information on the |
|
15 |
contents of each folder. |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/test/resources/README.txt | ||
---|---|---|
1 |
#set( $symbol_pound = '#' ) |
|
2 |
#set( $symbol_dollar = '$' ) |
|
3 |
#set( $symbol_escape = '\' ) |
|
4 |
Put into this folder the resources needed by your test classes. |
|
5 |
|
|
6 |
This folder is added to the Tests classpath, so you can load any resources |
|
7 |
through the ClassLoader. |
|
8 |
|
|
9 |
By default, in this folder you can find an example of log4j configuration, |
|
10 |
prepared to log messages through the console, so logging works when you |
|
11 |
run your tests classes. |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/test/resources/log4j.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
|
2 |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> |
|
3 |
|
|
4 |
<!-- |
|
5 |
Log4J configuration file for unit tests execution. |
|
6 |
--> |
|
7 |
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> |
|
8 |
|
|
9 |
<!-- Appender configuration to show logging messages through the console --> |
|
10 |
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> |
|
11 |
<layout class="org.apache.log4j.PatternLayout"> |
|
12 |
<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n %m%n" /> |
|
13 |
</layout> |
|
14 |
</appender> |
|
15 |
|
|
16 |
<!-- |
|
17 |
Activate logging messages of DEBUG level of higher only for the |
|
18 |
DefaultExampleManager class. |
|
19 |
You can put full classes names or packages instead, to configure |
|
20 |
logging for all the classes and subpackages of the package. |
|
21 |
--> |
|
22 |
<category name="org.gvsig.scripting.impl.DefaultExampleManager"> |
|
23 |
<priority value="DEBUG" /> |
|
24 |
</category> |
|
25 |
|
|
26 |
<!-- |
|
27 |
By default, show only logging messages of INFO level or higher, |
|
28 |
through the previously configured CONSOLE appender. |
|
29 |
--> |
|
30 |
<root> |
|
31 |
<priority value="INFO" /> |
|
32 |
<appender-ref ref="CONSOLE" /> |
|
33 |
</root> |
|
34 |
</log4j:configuration> |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/test/java/README.txt | ||
---|---|---|
1 |
#set( $symbol_pound = '#' ) |
|
2 |
#set( $symbol_dollar = '$' ) |
|
3 |
#set( $symbol_escape = '\' ) |
|
4 |
For each class you are going to test, create one Test class with the same |
|
5 |
name as the class to test, ending with Test. |
|
6 |
|
|
7 |
For example, the unit tests of the "ExampleLibrary" class are performed |
|
8 |
by the "ExampleLibraryTest" class. |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/main/javadoc/overview.html | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
|
2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
3 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
4 |
<head> |
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|
6 |
<title>org.gvsig.scripting package documentation</title> |
|
7 |
</head> |
|
8 |
<body> |
|
9 |
|
|
10 |
<p>TODO: Example library overview.</p> |
|
11 |
|
|
12 |
<p>See the <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#overviewcomment">Javadoc Tool documentation about the overview file</a></p> |
|
13 |
|
|
14 |
</body> |
|
15 |
</html> |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/main/resources/org/gvsig/scripting/i18n/text.properties | ||
---|---|---|
1 |
# Resource bundle texts for the Spanish language locale (es) |
|
2 |
Example.returns_value=devuelve el valor |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/main/resources/org/gvsig/scripting/i18n/text_en.properties | ||
---|---|---|
1 |
# Resource bundle texts for the English language locale (en) |
|
2 |
Example.returns_value=returns value |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/main/resources/overview.html | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
|
2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
3 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
4 |
<head> |
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|
6 |
<title>org.gvsig.scripting package documentation</title> |
|
7 |
</head> |
|
8 |
<body> |
|
9 |
|
|
10 |
<p>TODO: Example library overview.</p> |
|
11 |
|
|
12 |
<p>See the <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#overviewcomment">Javadoc Tool documentation about the overview file</a></p> |
|
13 |
|
|
14 |
</body> |
|
15 |
</html> |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/main/resources/README.txt | ||
---|---|---|
1 |
Put into this folder the resources needed by your library classes. |
|
2 |
|
|
3 |
This folder is added to the runtime classpath, so you can load any resources |
|
4 |
through the ClassLoader. |
|
5 |
|
|
6 |
By default, into this folder you can find some examples of resource bundle |
|
7 |
property files that may be used by your library classes. |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.scripting.swing.impl.ScriptingSwingDefaultSwingLibrary |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/main/java/org/gvsig/scripting/package.html | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
|
2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
3 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
4 |
<head> |
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|
6 |
<title>org.gvsig.scripting package documentation</title> |
|
7 |
</head> |
|
8 |
<body> |
|
9 |
|
|
10 |
<p>TODO: Example library description.</p> |
|
11 |
|
|
12 |
<p>See the <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#packagecomment">Javadoc Tool documentation about the package file</a></p> |
|
13 |
|
|
14 |
</body> |
|
15 |
</html> |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/main/java/org/gvsig/scripting/swing/api/JThinG.java | ||
---|---|---|
1 |
package org.gvsig.scripting.swing.api; |
|
2 |
|
|
3 |
import java.io.File; |
|
4 |
|
|
5 |
import javax.swing.JPanel; |
|
6 |
|
|
7 |
import thinlet.Thinlet; |
|
8 |
|
|
9 |
/** |
|
10 |
* <code>JThinG</code> is a component that provides an interface to edit the dialog window |
|
11 |
* associated to a {@link ScriptingDialog}. |
|
12 |
* |
|
13 |
* @see JThinlet |
|
14 |
* |
|
15 |
*/ |
|
16 |
public abstract class JThinG extends JPanel{ |
|
17 |
|
|
18 |
/** |
|
19 |
* Loads the file with the code of the dialog interface. |
|
20 |
* |
|
21 |
* @param file File where is the code of the dialog window of the {@link ScriptingDialog} |
|
22 |
*/ |
|
23 |
public abstract void load(File file); |
|
24 |
|
|
25 |
/** |
|
26 |
* Saves the file with the code of the dialog interface. |
|
27 |
* |
|
28 |
* @param file File where it will be saved the code of the dialog window of the {@link ScriptingDialog} |
|
29 |
*/ |
|
30 |
public abstract void save(File file); |
|
31 |
|
|
32 |
/** |
|
33 |
* Gets the Thinlet Component associated to this. |
|
34 |
* |
|
35 |
* @return Thinlet |
|
36 |
*/ |
|
37 |
public abstract Thinlet getThinlet(); |
|
38 |
} |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/main/java/org/gvsig/scripting/swing/api/AbstractJEditor.java | ||
---|---|---|
1 |
package org.gvsig.scripting.swing.api; |
|
2 |
|
|
3 |
import java.awt.event.ActionListener; |
|
4 |
|
|
5 |
import javax.swing.JEditorPane; |
|
6 |
import javax.swing.JPanel; |
|
7 |
|
|
8 |
import org.gvsig.scripting.ScriptingScript; |
|
9 |
|
|
10 |
/** |
|
11 |
* <code>AbstractJEditor</code> is a component that provides services to edit the content of |
|
12 |
* a {@link ScriptingBaseScript}. |
|
13 |
* |
|
14 |
* @see JCodeEditor |
|
15 |
* @see JDialogEditor |
|
16 |
* |
|
17 |
*/ |
|
18 |
public abstract class AbstractJEditor extends JPanel { |
|
19 |
|
|
20 |
/** |
|
21 |
* Gets the {@link ScriptingScript} associated with this AbstractJEditor |
|
22 |
* |
|
23 |
* @return {@link ScriptingScript} |
|
24 |
*/ |
|
25 |
public abstract ScriptingScript getScript(); |
|
26 |
|
|
27 |
|
|
28 |
public abstract void addDefaultActionListener(ActionListener actionlistener); |
|
29 |
|
|
30 |
/** |
|
31 |
* Saves the {@link ScriptingScript} associated with this AbstractJEditor |
|
32 |
* |
|
33 |
*/ |
|
34 |
public abstract void save(); |
|
35 |
|
|
36 |
/** |
|
37 |
* Returns the JEditorPane included in the AbstractJEditor |
|
38 |
* |
|
39 |
* @return JEditorPane |
|
40 |
*/ |
|
41 |
public abstract JEditorPane getJEditorPanel(); |
|
42 |
} |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/main/java/org/gvsig/scripting/swing/api/JScriptingComposer.java | ||
---|---|---|
1 |
package org.gvsig.scripting.swing.api; |
|
2 |
|
|
3 |
import javax.swing.JPanel; |
|
4 |
|
|
5 |
import org.gvsig.scripting.ScriptingUnit; |
|
6 |
|
|
7 |
/** |
|
8 |
* <code>JScriptingComposer</code> provides services to the management and edition of the |
|
9 |
* {@link ScriptingUnit}s of the ScriptingFramework. |
|
10 |
* |
|
11 |
* @see JScriptingLauncher |
|
12 |
*/ |
|
13 |
|
|
14 |
public abstract class JScriptingComposer extends JPanel { |
|
15 |
|
|
16 |
public abstract void getAboutUsDialog(); |
|
17 |
|
|
18 |
} |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/main/java/org/gvsig/scripting/swing/api/JCodeEditor.java | ||
---|---|---|
1 |
package org.gvsig.scripting.swing.api; |
|
2 |
|
|
3 |
|
|
4 |
/** |
|
5 |
* <code>JCodeEditor</code> is a component that support edition to a {@link ScriptingScript}. |
|
6 |
* |
|
7 |
* @see AbstractJEditor |
|
8 |
* @see JDialogEditor |
|
9 |
* |
|
10 |
*/ |
|
11 |
public abstract class JCodeEditor extends AbstractJEditor{ |
|
12 |
|
|
13 |
} |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/main/java/org/gvsig/scripting/swing/api/ScriptingUIManager.java | ||
---|---|---|
1 |
package org.gvsig.scripting.swing.api; |
|
2 |
|
|
3 |
import javax.swing.ImageIcon; |
|
4 |
import javax.swing.JEditorPane; |
|
5 |
import javax.swing.JPanel; |
|
6 |
|
|
7 |
import org.gvsig.about.AboutManager; |
|
8 |
import org.gvsig.scripting.ScriptingDialog; |
|
9 |
import org.gvsig.scripting.ScriptingFolder; |
|
10 |
import org.gvsig.scripting.ScriptingManager; |
|
11 |
import org.gvsig.scripting.ScriptingScript; |
|
12 |
import org.gvsig.scripting.WindowManager; |
|
13 |
|
|
14 |
/** |
|
15 |
* There are two top level management roles within ScriptingFramework: logical and User's Interface (UI) management. |
|
16 |
* |
|
17 |
* This class is responsible of the UI management role. It provides all the components shown in the ScriptingFramework. |
|
18 |
* |
|
19 |
* @see ScriptingManager |
|
20 |
* @see WindowManager |
|
21 |
* |
|
22 |
*/ |
|
23 |
public interface ScriptingUIManager { |
|
24 |
|
|
25 |
/** |
|
26 |
* Creates a new {@link JScriptingLauncher} component. |
|
27 |
* |
|
28 |
* @return a new {@link JScriptingLauncher}. |
|
29 |
* |
|
30 |
* @see JScriptingLauncher |
|
31 |
*/ |
|
32 |
public JScriptingLauncher createLauncher(); |
|
33 |
|
|
34 |
/** |
|
35 |
* Creates a new {@link JScriptingComposer} component. |
|
36 |
* |
|
37 |
* @return a new {@link JScriptingComposer}. |
|
38 |
* |
|
39 |
* @see JScriptingComposer |
|
40 |
*/ |
|
41 |
public JScriptingComposer createComposer(); |
|
42 |
|
|
43 |
/** |
|
44 |
* Creates a new {@link JScriptingBrowser} component. |
|
45 |
* |
|
46 |
* @params uimanager {@link ScriptingUIManager} that identificates the image. |
|
47 |
* @params root {@link ScriptingFolder} that identificates the image. |
|
48 |
* @params folderOnly boolean to indicate if only will be shown folders (if it's true) or it will be shown the ScriptingBaseScript files too (false value). By default, false |
|
49 |
* |
|
50 |
* @return a new {@link JScriptingBrowser}. |
|
51 |
* |
|
52 |
* @see JScriptingBrowser |
|
53 |
*/ |
|
54 |
public JScriptingBrowser createBrowser(ScriptingUIManager uimanager, ScriptingFolder root, boolean foldersOnly); |
|
55 |
|
|
56 |
/** |
|
57 |
* Creates a new {@link JScriptingBrowser} component. |
|
58 |
* |
|
59 |
* @params uimanager {@link ScriptingUIManager} that identificates the image. |
|
60 |
* @params root {@link ScriptingFolder} that identificates the image. |
|
61 |
* |
|
62 |
* @return a new {@link JScriptingBrowser}. |
|
63 |
* |
|
64 |
* @see JScriptingBrowser |
|
65 |
*/ |
|
66 |
public JScriptingBrowser createBrowser(ScriptingUIManager uimanager, ScriptingFolder root); |
|
67 |
|
|
68 |
/** |
|
69 |
* Creates a new {@link JScriptingInstaller} component. |
|
70 |
* |
|
71 |
* @return a new {@link JScriptingInstaller}. |
|
72 |
* |
|
73 |
* @see JScriptingInstaller |
|
74 |
*/ |
|
75 |
public JPanel createInstaller(); |
|
76 |
|
|
77 |
/** |
|
78 |
* Creates a new JEditorPane component with syntax highlight. |
|
79 |
* |
|
80 |
* @return a new {@link JEditorPaneSyntaxHighlighting}. |
|
81 |
* |
|
82 |
* @see JEditorPaneSyntaxHighlighting |
|
83 |
*/ |
|
84 |
public JEditorPane createSyntaxHighlightingPanel(); |
|
85 |
|
|
86 |
/** |
|
87 |
* Creates a new {@link JCodeEditor} component. |
|
88 |
* |
|
89 |
* @return a new {@link JCodeEditor}. |
|
90 |
* |
|
91 |
* @see JCodeEditor |
|
92 |
*/ |
|
93 |
public JCodeEditor createJCodeEditor(ScriptingUIManager uimanager, ScriptingScript script); |
|
94 |
|
|
95 |
/** |
|
96 |
* Creates a new {@link JDialogEditor} component. |
|
97 |
* |
|
98 |
* @return a new {@link JDialogEditor}. |
|
99 |
* |
|
100 |
* @see JDialogEditor |
|
101 |
*/ |
|
102 |
public JDialogEditor createJDialogEditor(ScriptingUIManager uimanager, ScriptingDialog script); |
|
103 |
|
|
104 |
/** |
|
105 |
* Creates a new {@link JThinlet} component. |
|
106 |
* |
|
107 |
* @return a new {@link JThinlet}. |
|
108 |
* |
|
109 |
* @see JThinlet |
|
110 |
*/ |
|
111 |
public JThinlet createJThinlet(); |
|
112 |
|
|
113 |
/** |
|
114 |
* Creates a new {@link JThinG} component. |
|
115 |
* |
|
116 |
* @return a new {@link JThinG}. |
|
117 |
* |
|
118 |
* @see JThinG |
|
119 |
*/ |
|
120 |
public JThinG createJThinG(); |
|
121 |
|
|
122 |
/** |
|
123 |
* Returns a ImageIcon associated with the name. |
|
124 |
* |
|
125 |
* @params name String that identificates the image. |
|
126 |
* |
|
127 |
* @return the ImageIcon identified by the String name. |
|
128 |
*/ |
|
129 |
public ImageIcon getIcon(String name); |
|
130 |
|
|
131 |
/** |
|
132 |
* Returns a ImageIcon associated with the name. |
|
133 |
* |
|
134 |
* @params name String that identificates the image. |
|
135 |
* @params size String to specify if the size of the icon would be "small", "medium" or "big" (default value: "small"). |
|
136 |
* |
|
137 |
* @return the ImageIcon identified by the String name. |
|
138 |
*/ |
|
139 |
public ImageIcon getIcon(String name, String size); |
|
140 |
|
|
141 |
/** |
|
142 |
* Returns the {@link ScriptingManager} of the ScriptingFramework. |
|
143 |
* |
|
144 |
* @return {@link ScriptingManager} |
|
145 |
*/ |
|
146 |
public ScriptingManager getManager(); |
|
147 |
|
|
148 |
/** |
|
149 |
* Returns the {@link AboutManager} to provide services of the 'About Us' information of the ScriptingFramework. |
|
150 |
* |
|
151 |
* @return the {@link AboutManager} |
|
152 |
* |
|
153 |
* @see AboutManager |
|
154 |
*/ |
|
155 |
public AboutManager getAboutManager(); |
|
156 |
|
|
157 |
/** |
|
158 |
* Returns a help panel. |
|
159 |
* |
|
160 |
* @return a JPanel with the JavaDocs registered in the application |
|
161 |
*/ |
|
162 |
public JPanel getHelp(); |
|
163 |
|
|
164 |
/** |
|
165 |
* Shows a JPanel in a dialog window with it's own characteristics |
|
166 |
* |
|
167 |
* @params panel JPanel included in the dialog's content |
|
168 |
* @params title String with the dialog's title |
|
169 |
* |
|
170 |
*/ |
|
171 |
public void showDialog(JPanel panel, String title); |
|
172 |
|
|
173 |
/** |
|
174 |
* Shows a JPanel in a window with it's own characteristics |
|
175 |
* |
|
176 |
* @params panel JPanel included in the window's content |
|
177 |
* @params title String with the window's title |
|
178 |
* |
|
179 |
*/ |
|
180 |
public void showWindow(JPanel panel, String title); |
|
181 |
|
|
182 |
/** |
|
183 |
* Shows a JPanel in a tool window with it's own characteristics |
|
184 |
* |
|
185 |
* @params panel JPanel included in the tool's content |
|
186 |
* @params title String with the tool's title |
|
187 |
* |
|
188 |
*/ |
|
189 |
public void showTool(JPanel panel, String title); |
|
190 |
|
|
191 |
/** |
|
192 |
* Registers a new instance of a WindowManager which provides services to the management of the application windows |
|
193 |
* |
|
194 |
* @params manager {@link WindowManager} to register in the ScriptingUIManager. |
|
195 |
* |
|
196 |
* @see WindowManager |
|
197 |
*/ |
|
198 |
public void registerWindowManager(WindowManager manager); |
|
199 |
|
|
200 |
} |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/main/java/org/gvsig/scripting/swing/api/JScriptingLauncher.java | ||
---|---|---|
1 |
package org.gvsig.scripting.swing.api; |
|
2 |
|
|
3 |
import javax.swing.JPanel; |
|
4 |
import javax.swing.JTabbedPane; |
|
5 |
|
|
6 |
/** |
|
7 |
* <code>JScriptingLauncher</code> is a component that contains {@link JScriptingBrowser}s |
|
8 |
* to navigate for the User's Folder and for System's Folder. It has a tab for each |
|
9 |
* {@link JScriptingBrowser}. |
|
10 |
* It catches the exceptions throws by {@link JScriptingBrowser} and it do the associated |
|
11 |
* action or throw a new exception to the {@link JScriptingComposer} (if it's included on it) |
|
12 |
* |
|
13 |
* @see JScriptingBrowser |
|
14 |
* @see JScriptingComposer |
|
15 |
* |
|
16 |
*/ |
|
17 |
|
|
18 |
public abstract class JScriptingLauncher extends JPanel { |
|
19 |
|
|
20 |
public static final int DEFAULT_ACTION = 1; |
|
21 |
public static final int SELECTION_ACTION = 2; |
|
22 |
public static final int DROPDOWN_ACTION = 3; |
|
23 |
|
|
24 |
/** |
|
25 |
* Reloads the content of the {@link JScriptingBrowser}s |
|
26 |
* |
|
27 |
*/ |
|
28 |
public abstract void refresh(); |
|
29 |
|
|
30 |
public abstract JTabbedPane getTabbedPane(); |
|
31 |
} |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/main/java/org/gvsig/scripting/swing/api/ScriptingSwingLocator.java | ||
---|---|---|
1 |
package org.gvsig.scripting.swing.api; |
|
2 |
|
|
3 |
import org.gvsig.tools.locator.BaseLocator; |
|
4 |
|
|
5 |
public class ScriptingSwingLocator extends BaseLocator { |
|
6 |
|
|
7 |
private static final String LOCATOR_NAME = "ScriptingSwingLocator"; |
|
8 |
|
|
9 |
public static final String UIMANAGER_NAME = "scriptingswinglocator.uimanager"; |
|
10 |
|
|
11 |
public static final String UIMANAGER_DESCRIPTION = "Scripting UIManager"; |
|
12 |
|
|
13 |
/** |
|
14 |
* Unique instance. |
|
15 |
*/ |
|
16 |
private static final ScriptingSwingLocator instance = new ScriptingSwingLocator(); |
|
17 |
|
|
18 |
/** |
|
19 |
* Return the singleton instance. |
|
20 |
* |
|
21 |
* @return the singleton instance |
|
22 |
*/ |
|
23 |
public static ScriptingSwingLocator getInstance() { |
|
24 |
return instance; |
|
25 |
} |
|
26 |
|
|
27 |
/** |
|
28 |
* Return the Locator's name |
|
29 |
* |
|
30 |
* @return a String with the Locator's name |
|
31 |
*/ |
|
32 |
public String getLocatorName() { |
|
33 |
return LOCATOR_NAME; |
|
34 |
} |
|
35 |
|
|
36 |
/** |
|
37 |
* Registers the Class implementing the PersistenceManager interface. |
|
38 |
* |
|
39 |
* @param clazz |
|
40 |
* implementing the PersistenceManager interface |
|
41 |
*/ |
|
42 |
public static void registerUIManager(Class clazz) { |
|
43 |
getInstance().register(UIMANAGER_NAME, UIMANAGER_DESCRIPTION, clazz); |
|
44 |
} |
|
45 |
|
|
46 |
/** |
|
47 |
* Gets the instance of the {@link ScriptingUIManager} registered. |
|
48 |
* |
|
49 |
* @return {@link ScriptingUIManager} |
|
50 |
*/ |
|
51 |
public static ScriptingUIManager getUIManager() { |
|
52 |
return (ScriptingUIManager) getInstance().get(UIMANAGER_NAME); |
|
53 |
} |
|
54 |
|
|
55 |
} |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/main/java/org/gvsig/scripting/swing/api/JDialogEditor.java | ||
---|---|---|
1 |
package org.gvsig.scripting.swing.api; |
|
2 |
|
|
3 |
import org.gvsig.scripting.ScriptingDialog; |
|
4 |
|
|
5 |
/** |
|
6 |
* <code>JDialogEditor</code> is a component that support edition to a {@link ScriptingDialog). |
|
7 |
* |
|
8 |
* @see AbstractJEditor |
|
9 |
* @see JCodeEditor |
|
10 |
* |
|
11 |
*/ |
|
12 |
public abstract class JDialogEditor extends AbstractJEditor { |
|
13 |
|
|
14 |
/** |
|
15 |
* Gets the {@link ScriptingDialog} associated with this JDialogEditor |
|
16 |
* |
|
17 |
* @return {@link ScriptingDialog} |
|
18 |
*/ |
|
19 |
public abstract ScriptingDialog getDialog(); |
|
20 |
|
|
21 |
} |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/main/java/org/gvsig/scripting/swing/api/JScriptingBrowser.java | ||
---|---|---|
1 |
package org.gvsig.scripting.swing.api; |
|
2 |
|
|
3 |
import java.awt.LayoutManager; |
|
4 |
|
|
5 |
import javax.swing.JPanel; |
|
6 |
|
|
7 |
import org.gvsig.scripting.ScriptingFolder; |
|
8 |
import org.gvsig.scripting.ScriptingManager; |
|
9 |
import org.gvsig.scripting.ScriptingUnit; |
|
10 |
|
|
11 |
/** |
|
12 |
* <code>JScriptingBrowser</code> is a component that shows hierachically a system folder. |
|
13 |
* It launch events on selection or double.clic of each {@link ScriptingUnit}. |
|
14 |
* In case of {@link ScriptingFolder} a selection will load the content lazily, and |
|
15 |
* double-clic will expand it. |
|
16 |
* In case of {@link ScriptingBaseScript} will throw a exception to the {@link JScriptingLauncher} |
|
17 |
* |
|
18 |
* @see JScriptingLauncher |
|
19 |
* |
|
20 |
*/ |
|
21 |
|
|
22 |
public abstract class JScriptingBrowser extends JPanel{ |
|
23 |
|
|
24 |
public JScriptingBrowser(LayoutManager layout) { |
|
25 |
super(layout); |
|
26 |
} |
|
27 |
|
|
28 |
public static final int DEFAULT_ACTION = 1; |
|
29 |
public static final int SELECTION_ACTION = 2; |
|
30 |
public static final int DROPDOWN_ACTION = 3; |
|
31 |
|
|
32 |
|
|
33 |
public abstract ScriptingManager getManager(); |
|
34 |
public abstract ScriptingFolder getRoot(); |
|
35 |
public abstract ScriptingUnit getSelectedNode(); |
|
36 |
|
|
37 |
|
|
38 |
} |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.api/src/main/java/org/gvsig/scripting/swing/api/JThinlet.java | ||
---|---|---|
1 |
package org.gvsig.scripting.swing.api; |
|
2 |
|
|
3 |
import java.awt.Dimension; |
|
4 |
import java.awt.event.ActionListener; |
|
5 |
import java.io.File; |
|
6 |
|
|
7 |
import javax.swing.JPanel; |
|
8 |
import javax.swing.event.AncestorEvent; |
|
9 |
|
|
10 |
import thinlet.Thinlet; |
|
11 |
|
|
12 |
public abstract class JThinlet extends JPanel { |
|
13 |
|
|
14 |
public abstract void load(File file); |
|
15 |
|
|
16 |
public abstract Thinlet getThinlet(); |
|
17 |
|
|
18 |
public abstract void invoke(String name); |
|
19 |
|
|
20 |
public abstract Dimension getPreferredSize(); |
|
21 |
|
|
22 |
public abstract void ancestorAdded(AncestorEvent event); |
|
23 |
|
|
24 |
public abstract void ancestorMoved(AncestorEvent event); |
|
25 |
|
|
26 |
public abstract void ancestorRemoved(AncestorEvent event); |
|
27 |
|
|
28 |
public abstract void addActionListener(ActionListener actionlistener); |
|
29 |
} |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
3 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 |
|
4 |
http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
5 |
|
|
6 |
<modelVersion>4.0.0</modelVersion> |
|
7 |
<groupId>org.gvsig</groupId> |
|
8 |
<artifactId>org.gvsig.scripting.swing</artifactId> |
|
9 |
<packaging>pom</packaging> |
|
10 |
<version>1.0-SNAPSHOT</version> |
|
11 |
<name>org.gvsig.scripting.swing</name> |
|
12 |
<description>[PUT LIBRARY DESCRIPTION HERE]</description> |
|
13 |
<url>http://www.gvsig.org</url> |
|
14 |
<parent> |
|
15 |
<groupId>org.gvsig</groupId> |
|
16 |
<artifactId>org.gvsig.scripting</artifactId> |
|
17 |
<version>1.0-SNAPSHOT</version> |
|
18 |
</parent> |
|
19 |
<scm> |
|
20 |
<connection>scm:svn:http://subversion.gvsig.org/gvSIG/branches/v2_0_0_prep/libraries/org.gvsig.scripting</connection> |
|
21 |
<developerConnection>scm:svn:https://gvsig.org/svn/gvSIG/branches/v2_0_0_prep/libraries/org.gvsig.scripting</developerConnection> |
|
22 |
<url>http://subversion.gvsig.org/viewvc/?root=gvSIG</url> |
|
23 |
<tag>HEAD</tag> |
|
24 |
</scm> |
|
25 |
<properties> |
|
26 |
<build-dir>${basedir}/../../build</build-dir> |
|
27 |
</properties> |
|
28 |
<developers> |
|
29 |
<developer> |
|
30 |
<id>developer1</id> |
|
31 |
<name>Name Surname</name> |
|
32 |
<email>name@domain</email> |
|
33 |
<roles> |
|
34 |
<role>Architect</role> |
|
35 |
<role>Developer</role> |
|
36 |
</roles> |
|
37 |
</developer> |
|
38 |
<developer> |
|
39 |
<id>developer2</id> |
|
40 |
<name>Name2 Surname</name> |
|
41 |
<email>name2@domain</email> |
|
42 |
<roles> |
|
43 |
<role>Developer</role> |
|
44 |
</roles> |
|
45 |
</developer> |
|
46 |
</developers> |
|
47 |
<dependencyManagement> |
|
48 |
<dependencies> |
|
49 |
<dependency> |
|
50 |
<groupId>org.gvsig</groupId> |
|
51 |
<artifactId>org.gvsig.scripting.thing</artifactId> |
|
52 |
<version>1.0-SNAPSHOT</version> |
|
53 |
</dependency> |
|
54 |
<dependency> |
|
55 |
<groupId>org.gvsig</groupId> |
|
56 |
<artifactId>org.gvsig.about.api</artifactId> |
|
57 |
<version>1.0-SNAPSHOT</version> |
|
58 |
</dependency> |
|
59 |
<dependency> |
|
60 |
<groupId>org.gvsig</groupId> |
|
61 |
<artifactId>org.gvsig.gvsig.lib.api</artifactId> |
|
62 |
<version>1.0-SNAPSHOT</version> |
|
63 |
</dependency> |
|
64 |
<dependency> |
|
65 |
<groupId>org.gvsig</groupId> |
|
66 |
<artifactId>org.gvsig.tools</artifactId> |
|
67 |
<version>2.0-SNAPSHOT</version> |
|
68 |
</dependency> |
|
69 |
<dependency> |
|
70 |
<groupId>org.gvsig.legacy</groupId> |
|
71 |
<artifactId>jhall</artifactId> |
|
72 |
<version>2.0.05</version> |
|
73 |
</dependency> |
|
74 |
<dependency> |
|
75 |
<groupId>org.gvsig</groupId> |
|
76 |
<artifactId>org.gvsig.i18n</artifactId> |
|
77 |
<version>2.0-SNAPSHOT</version> |
|
78 |
</dependency> |
|
79 |
<dependency> |
|
80 |
<groupId>com.jgoodies</groupId> |
|
81 |
<artifactId>looks</artifactId> |
|
82 |
<version>2.2.2</version> |
|
83 |
</dependency> |
|
84 |
<dependency> |
|
85 |
<groupId>bsh</groupId> |
|
86 |
<artifactId>bsh</artifactId> |
|
87 |
<version>2.0b1</version> |
|
88 |
</dependency> |
|
89 |
<dependency> |
|
90 |
<groupId>groovy</groupId> |
|
91 |
<artifactId>groovy-all</artifactId> |
|
92 |
<version>1.1-rc-1</version> |
|
93 |
</dependency> |
|
94 |
<dependency> |
|
95 |
<groupId>org.apache.bsf</groupId> |
|
96 |
<artifactId>bsf-all</artifactId> |
|
97 |
<version>3.0-beta3</version> |
|
98 |
</dependency> |
|
99 |
<dependency> |
|
100 |
<groupId>org.ini4j</groupId> |
|
101 |
<artifactId>ini4j</artifactId> |
|
102 |
<version>0.5.1</version> |
|
103 |
</dependency> |
|
104 |
<dependency> |
|
105 |
<groupId>commons-logging</groupId> |
|
106 |
<artifactId>commons-logging</artifactId> |
|
107 |
<version>1.1.1</version> |
|
108 |
</dependency> |
|
109 |
<dependency> |
|
110 |
<groupId>commons-logging</groupId> |
|
111 |
<artifactId>commons-logging</artifactId> |
|
112 |
<version>1.1.1</version> |
|
113 |
<classifier>api</classifier> |
|
114 |
</dependency> |
|
115 |
<dependency> |
|
116 |
<groupId>thinlet</groupId> |
|
117 |
<artifactId>thinlet</artifactId> |
|
118 |
<version>20050328</version> |
|
119 |
</dependency> |
|
120 |
<dependency> |
|
121 |
<groupId>org.python</groupId> |
|
122 |
<artifactId>jython</artifactId> |
|
123 |
<version>2.2.1</version> |
|
124 |
</dependency> |
|
125 |
</dependencies> |
|
126 |
</dependencyManagement> |
|
127 |
<modules> |
|
128 |
<module>org.gvsig.scripting.swing.api</module> |
|
129 |
<module>org.gvsig.scripting.swing.impl</module> |
|
130 |
</modules> |
|
131 |
|
|
132 |
</project> |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.impl/README.txt | ||
---|---|---|
1 |
The project structure of this project is the following: |
|
2 |
|
|
3 |
Project |
|
4 |
|-pom.xml: Maven 2 configuration file. |
|
5 |
`-src |
|
6 |
|-main: Project source code, resources and configuration |
|
7 |
| |-java: Java source code |
|
8 |
| |-resources: Resources needed by the code (resource bundles, images, etc.) |
|
9 |
|`-javadoc: Javadoc common resources |
|
10 |
`-test: Unit tests source code, resources and configuration |
|
11 |
|-java: Unit tests java source code |
|
12 |
`-resources: Resources needed by the test code (resource bundles, images, etc.) |
|
13 |
|
|
14 |
Look at the main folders for a README.txt file with more information on the |
|
15 |
contents of each folder. |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.impl/src/main/javadoc/overview.html | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
|
2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
3 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
4 |
<head> |
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|
6 |
<title>org.gvsig.scripting package documentation</title> |
|
7 |
</head> |
|
8 |
<body> |
|
9 |
|
|
10 |
<p>TODO: Example library overview.</p> |
|
11 |
|
|
12 |
<p>See the <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#overviewcomment">Javadoc Tool documentation about the overview file</a></p> |
|
13 |
|
|
14 |
</body> |
|
15 |
</html> |
trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.scripting.swing.impl.ScriptingSwingDefaultSwingLibrary |
Also available in: Unified diff