Revision 2041

View differences:

org.gvsig.tools/library/tags/org.gvsig.tools-3.0.202/org.gvsig.tools.main/pom.xml
1
<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/maven-v4_0_0.xsd">
2
    <modelVersion>4.0.0</modelVersion>
3
    <artifactId>org.gvsig.tools.main</artifactId>
4
    <packaging>jar</packaging>
5
    <name>org.gvsig.tools.main</name>
6
    <parent>
7
        <groupId>org.gvsig</groupId>
8
        <artifactId>org.gvsig.tools</artifactId>
9
        <version>3.0.202</version>
10
    </parent>
11
    <dependencies>
12
        <dependency>
13
            <groupId>org.gvsig</groupId>
14
            <artifactId>org.gvsig.tools.lib</artifactId>
15
        </dependency>
16
        <dependency>
17
            <groupId>org.gvsig</groupId>
18
            <artifactId>org.gvsig.tools.swing.api</artifactId>
19
        </dependency>
20
       <dependency>
21
            <groupId>org.gvsig</groupId>
22
            <artifactId>org.gvsig.tools.swing.impl</artifactId>
23
            <scope>runtime</scope>
24
        </dependency>
25
   </dependencies>
26
</project>
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.202/org.gvsig.tools.main/src/main/java/org/gvsig/tools/main/MainAction.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
/*
25
 * AUTHORS (In addition to CIT):
26
 * 2010 {}  {{Task}}
27
 */
28
package org.gvsig.tools.main;
29

  
30
import java.awt.event.ActionEvent;
31

  
32
import javax.swing.AbstractAction;
33
import javax.swing.Icon;
34
import javax.swing.JComponent;
35
import javax.swing.JTabbedPane;
36

  
37
/**
38
 * @author 2010- C?sar Ordi?ana - gvSIG team
39
 */
40
public abstract class MainAction extends AbstractAction {
41

  
42
    private static final long serialVersionUID = 7286136693329716214L;
43
    private final JTabbedPane tabbedPane;
44

  
45
    /**
46
     * @see AbstractAction#AbstractAction()
47
     */
48
    public MainAction(JTabbedPane tabbedPane) {
49
        super(); 
50
        this.tabbedPane = tabbedPane;
51
    }
52

  
53
    /**
54
     * @see AbstractAction#AbstractAction(String)
55
     */
56
    public MainAction(String name, JTabbedPane tabbedPane) {
57
        super(name);
58
        this.tabbedPane = tabbedPane;
59
    }
60

  
61
    /**
62
     * @see AbstractAction#AbstractAction(String, Icon)
63
     */
64
    public MainAction(String name, Icon icon, JTabbedPane tabbedPane) {
65
        super(name, icon);
66
        this.tabbedPane = tabbedPane;
67
    }
68

  
69
    public void actionPerformed(ActionEvent e) {
70
        String title = getComponentTitle();
71
        int index = tabbedPane.indexOfTab(title);
72
        if (index <= -1) {
73
            tabbedPane.addTab(title, createComponent());
74
            index = tabbedPane.indexOfTab(title);
75
        }
76
        tabbedPane.setSelectedIndex(index);
77
    }
78

  
79
    protected abstract JComponent createComponent();
80

  
81
    protected abstract String getComponentTitle();
82

  
83
}
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.202/org.gvsig.tools.main/src/main/java/org/gvsig/tools/main/Main.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.tools.main;
25

  
26
import java.awt.BorderLayout;
27
import java.awt.Dimension;
28
import java.awt.event.ActionEvent;
29
import java.awt.event.ActionListener;
30

  
31
import javax.swing.JButton;
32
import javax.swing.JFrame;
33
import javax.swing.JMenu;
34
import javax.swing.JMenuBar;
35
import javax.swing.JMenuItem;
36
import javax.swing.JTabbedPane;
37
import javax.swing.JToolBar;
38
import javax.swing.WindowConstants;
39

  
40
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
41
import org.gvsig.tools.main.taskstatus.JTaskStatusAction;
42
import org.gvsig.tools.main.usability.UsabilityAction;
43
import org.gvsig.tools.main.window.ModalAction;
44

  
45
/**
46
 * @author 2010- C?sar Ordi?ana - gvSIG team
47
 */
48
public class Main {
49

  
50
    private JTabbedPane tabbedPane;
51
    private JMenuBar menuBar;
52
    private JToolBar toolBar; 
53

  
54
    public static void main(String args[]) {
55
        new DefaultLibrariesInitializer().fullInitialize();
56
        Main main = new Main();
57
        main.show();
58
    }
59

  
60
    public void show() {
61

  
62
        final JFrame frame = new JFrame("Tools swing components test app");
63
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
64

  
65
        // Add a tabbed pane as a content pane
66
        tabbedPane = new JTabbedPane();
67
        tabbedPane.setTabPlacement(JTabbedPane.BOTTOM);
68
        frame.getContentPane().add(tabbedPane);
69

  
70
        // Create application actions
71
        MainAction[] actions = createActions();
72

  
73
        // Create the menu bar.
74
        menuBar = new JMenuBar();
75

  
76
        // Build the menu.
77
        JMenu menuFile = new JMenu("File");
78
        JMenuItem menuItemExit = new JMenuItem("Exit");
79
        menuItemExit.addActionListener(new ActionListener() {
80

  
81
            public void actionPerformed(ActionEvent e) {
82
                frame.dispose();
83
                System.exit(0);
84
            }
85
        });
86
        menuFile.add(menuItemExit);
87
        menuBar.add(menuFile);
88

  
89
        // Add all actions to the menu bar
90
        JMenu menuDemo = new JMenu("Tools components");
91
        for (int i = 0; i < actions.length; i++) {
92
            menuDemo.add(new JMenuItem(actions[i]));
93
        }
94
        menuBar.add(menuDemo);
95

  
96
        // Build the toolbar
97
        toolBar = new JToolBar("Main toolbar");
98

  
99
        // Add all actions to the toolbar
100
        for (int i = 0; i < actions.length; i++) {
101
            toolBar.add(new JButton(actions[i]));
102
        }
103

  
104
        frame.setPreferredSize(new Dimension(800, 600));
105

  
106
        frame.setJMenuBar(menuBar);
107
        frame.add(toolBar, BorderLayout.PAGE_START);
108

  
109
        // Display the window.
110
        frame.pack();
111
        frame.setVisible(true);
112
    }
113

  
114
    private MainAction[] createActions() {
115
        return new MainAction[] { 
116
            new UsabilityAction(tabbedPane),
117
            new JTaskStatusAction(tabbedPane),
118
            new ModalAction(tabbedPane)
119
        };
120
    }
121

  
122
}
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.202/org.gvsig.tools.main/src/main/java/org/gvsig/tools/main/usability/UsabilityAction.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
/*
25
 * AUTHORS (In addition to CIT):
26
 * 2010 {}  {{Task}}
27
 */
28
package org.gvsig.tools.main.usability;
29

  
30
import java.awt.Component;
31

  
32
import javax.swing.BoxLayout;
33
import javax.swing.JButton;
34
import javax.swing.JComponent;
35
import javax.swing.JPanel;
36
import javax.swing.JSpinner;
37
import javax.swing.JTabbedPane;
38
import javax.swing.JTextArea;
39

  
40
import org.gvsig.tools.dataTypes.DataTypes;
41
import org.gvsig.tools.main.MainAction;
42
import org.gvsig.tools.swing.api.ToolsSwingLocator;
43
import org.gvsig.tools.swing.api.usability.UsabilitySwingManager;
44

  
45
/**
46
 * Shows the panel of usability components.
47
 * 
48
 * @author 2010- C?sar Ordi?ana - gvSIG team 
49
 */
50
public class UsabilityAction extends MainAction {
51

  
52
    private static final long serialVersionUID = 6471916708466720365L;
53

  
54
    private static final UsabilitySwingManager manager =
55
        ToolsSwingLocator.getUsabilitySwingManager();
56

  
57
    /**
58
     * @see MainAction#MainAction(JTabbedPane)
59
     */
60
    public UsabilityAction(JTabbedPane tabbedPane) {
61
        super("Usability", tabbedPane);
62
        putValue(SHORT_DESCRIPTION, "Usability components");
63
    }
64

  
65
    @Override
66
    protected JComponent createComponent() {
67
        JTabbedPane tabbedPane = new JTabbedPane();
68
        tabbedPane.setTabPlacement(JTabbedPane.RIGHT);
69

  
70
        tabbedPane.addTab("JButton", createJButtonComponent());
71
        tabbedPane.addTab("JTextArea", createJTextAreaComponent());
72
        tabbedPane.addTab("JNullSpinner", createJNullSpinnerComponent());
73
        return tabbedPane;
74
    }
75

  
76
    @Override
77
    protected String getComponentTitle() {
78
        return "Usability";
79
    }
80

  
81
    private Component createJButtonComponent() {
82
        // Create the container panel
83
        JPanel panel = new JPanel();
84
        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
85
        // panel.setLayout(new GridLayout(18, 1));
86
        // panel.setLayout(new );
87
        JButton button = manager.createJButton("+");
88
        panel.add(button); 
89
        button = manager.createJButton("-");
90
        panel.add(button);
91
        button = manager.createJToolButton("+");
92
        panel.add(button); 
93
        button = manager.createJToolButton("-");
94
        panel.add(button);
95
        // Create buttons with different sizes
96
        StringBuffer text = new StringBuffer("012");
97
        for (int i = 4; i < 22; i++) {
98
            text.append(String.valueOf(i % 10));
99
            button = manager.createJButton(text.toString());
100
            panel.add(button);
101
        }
102

  
103
        return panel;
104
    }
105

  
106
    private Component createJTextAreaComponent() {
107
        // Create the container panel
108
        JPanel panel = new JPanel();
109
        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
110
        // panel.setLayout(new GridLayout(18, 1));
111
        // panel.setLayout(new );
112
        JTextArea ta = manager.createJTextArea("");       
113
        ta = manager.createJTextArea("test");
114
        panel.add(ta); 
115
        ta = manager.createJTextArea("test longer");
116
        panel.add(ta);
117
        ta = manager.createJTextArea("test much longer");
118
        panel.add(ta); 
119
        ta = manager.createJTextArea("test");
120
        panel.add(ta); 
121
        ta = manager.createJTextArea("test size = 150", 150);
122
        panel.add(ta); 
123
        ta = manager.createJTextArea("test too long", -1);
124
        panel.add(ta);
125
        // Create buttons with different sizes
126
        StringBuffer text = new StringBuffer("012");
127
        for (int i = 4; i < 22; i++) {
128
            text.append(String.valueOf(i % 10));
129
            ta = manager.createJTextArea(text.toString());
130
            panel.add(ta);
131
        }
132
   
133
        
134
        return panel;
135
    }
136

  
137
    private Component createJNullSpinnerComponent() {
138
        // Create the container panel
139
        JPanel panel = new JPanel();
140
        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
141
        // panel.setLayout(new GridLayout(18, 1));
142
        // panel.setLayout(new );
143
        JSpinner spinner = manager.createJNullSpinner(DataTypes.FLOAT, "1.05", -1);
144
        panel.add(spinner);
145
        // Create buttons with different sizes
146
        StringBuffer text = new StringBuffer("01287.");
147
        for (int i = 4; i < 22; i++) {
148
            text.append(String.valueOf(i % 10));
149
            spinner = manager.createJNullSpinner(DataTypes.FLOAT, text.toString(), -1);
150
            panel.add(spinner);
151
        }
152

  
153
        return panel;
154
    }
155

  
156
}
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.202/org.gvsig.tools.main/src/main/java/org/gvsig/tools/main/taskstatus/JTaskStatusAction.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.tools.main.taskstatus;
25

  
26
import java.awt.Color;
27
import java.awt.FlowLayout;
28

  
29
import javax.swing.JComponent;
30
import javax.swing.JPanel;
31
import javax.swing.JTabbedPane;
32

  
33
import org.gvsig.tools.main.MainAction;
34
import org.gvsig.tools.swing.api.ToolsSwingLocator;
35
import org.gvsig.tools.swing.api.task.JTaskStatus;
36
import org.gvsig.tools.swing.api.task.JTasksStatus;
37
import org.gvsig.tools.swing.api.task.TaskStatusSwingManager;
38
import org.gvsig.tools.task.AbstractMonitorableTask;
39

  
40
public class JTaskStatusAction extends MainAction {
41

  
42
	/**
43
	 * 
44
	 */
45
	private static final long serialVersionUID = -5408828606365712614L;
46

  
47
	public JTaskStatusAction(JTabbedPane tabbedPane) {
48
		super("Task status", tabbedPane);
49
        putValue(SHORT_DESCRIPTION, "Task status");
50
	}
51

  
52
	private class MiTask extends AbstractMonitorableTask {
53
		
54
		private int max;
55
		private int sleepInterval;
56
		
57
		public MiTask(String tittle, int max, int sleepInterval) {
58
			super(tittle);
59
			this.max = max;
60
			this.sleepInterval = sleepInterval;
61
		}
62
		public MiTask(String tittle, int max) {
63
			this(tittle, max, 100);
64
		}
65
		public void run() {
66
			this.taskStatus.setRangeOfValues(0, this.max);
67
			for(int i=0; i<this.max; i++ ) {
68
				this.taskStatus.setCurValue(i);
69
				try {
70
					Thread.sleep(sleepInterval);
71
				} catch (InterruptedException e) {
72
					// Ignore
73
				}
74
				if( this.taskStatus.isCancellationRequested() ) {
75
					this.taskStatus.cancel();
76
					break;
77
				}
78
			}
79
			if( this.taskStatus.isRunning() ) {
80
				this.taskStatus.terminate();
81
			}
82
		}
83
	}
84
	
85
	protected JComponent createComponent() {
86
		TaskStatusSwingManager manager = ToolsSwingLocator.getTaskStatusSwingManager();
87
		JPanel panel = new JPanel();
88
		panel.setLayout( new FlowLayout());
89
		JTasksStatus tasks = manager.createJTasksStatus();
90
		tasks.setBackground(Color.BLUE.brighter());
91
		panel.add( tasks );
92
		JTaskStatus taskStatusPanel = manager.createJTaskStatus();
93
		panel.add( taskStatusPanel );
94
		
95
		MiTask task1 = new MiTask("Task1",100);
96
		task1.start();
97
		MiTask task2 = new MiTask("Task2",300);
98
		task2.start();
99
		MiTask task3 = new MiTask("Task3",1000);
100
		task3.start();
101
		MiTask task4 = new MiTask("Task4",50,5000);
102
		task4.start();
103

  
104
		taskStatusPanel.bind(task1.getTaskStatus());
105
		return panel;
106
	}
107

  
108
	protected String getComponentTitle() {
109
		return "Task status";
110
	}
111

  
112
}
0 113

  
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.202/org.gvsig.tools.main/src/main/java/org/gvsig/tools/main/window/ModalAction.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
/*
25
 * AUTHORS (In addition to CIT):
26
 * 2010 {}  {{Task}}
27
 */
28
package org.gvsig.tools.main.window;
29

  
30
import java.awt.Dimension;
31
import java.awt.FlowLayout;
32
import java.awt.event.ActionEvent;
33
import java.beans.PropertyChangeListener;
34

  
35
import javax.swing.Action;
36
import javax.swing.JButton;
37
import javax.swing.JComponent;
38
import javax.swing.JPanel;
39
import javax.swing.JTabbedPane;
40
import javax.swing.JTextArea;
41
import javax.swing.JTextField;
42

  
43
import org.gvsig.tools.main.MainAction;
44
import org.gvsig.tools.swing.api.ToolsSwingLocator;
45
import org.gvsig.tools.swing.api.windowmanager.WindowManager;
46

  
47
/**
48
 * Shows the panel of usability components.
49
 * 
50
 * @author 2010- C?sar Ordi?ana - gvSIG team 
51
 */
52
public class ModalAction extends MainAction {
53

  
54

  
55
    private static final WindowManager manager =
56
        ToolsSwingLocator.getWindowManager();
57

  
58
    /**
59
     * @see MainAction#MainAction(JTabbedPane)
60
     */
61
    public ModalAction(JTabbedPane tabbedPane) {
62
        super("Modal", tabbedPane);
63
        putValue(SHORT_DESCRIPTION, "Modal components");
64
    }
65

  
66
    @Override
67
    protected JComponent createComponent() {
68
        JPanel panel = new JPanel();
69
        panel.setLayout(new FlowLayout());
70
        JButton button = new JButton(new Action() {
71
			
72
			public void actionPerformed(ActionEvent arg0) {
73
				JTextField jtext = new JTextField();
74
				jtext.setPreferredSize(new Dimension(300, 30));
75
				
76
				JPanel auxpanel = new JPanel();
77
				auxpanel.add(jtext);
78
				WindowManager wm = ToolsSwingLocator.getWindowManager();
79
				wm.showWindow(auxpanel, "HOLA", WindowManager.MODE.DIALOG);
80
				System.out.println("Value = "+jtext.getText());
81
			}
82
			
83
			public void setEnabled(boolean b) {
84
				// TODO Auto-generated method stub
85
				
86
			}
87
			
88
			public void removePropertyChangeListener(PropertyChangeListener listener) {
89
				// TODO Auto-generated method stub
90
				
91
			}
92
			
93
			public void putValue(String key, Object value) {
94
				// TODO Auto-generated method stub
95
				
96
			}
97
			
98
			public boolean isEnabled() {
99
				return true;
100
			}
101
			
102
			public Object getValue(String key) {
103
				// TODO Auto-generated method stub
104
				return null;
105
			}
106
			
107
			public void addPropertyChangeListener(PropertyChangeListener listener) {
108
				// TODO Auto-generated method stub
109
				
110
			}
111
		});
112
        button.setText("Show modal window");
113
        panel.add(button);
114

  
115
        return panel;
116
    }
117

  
118
    @Override
119
    protected String getComponentTitle() {
120
        return "Modal";
121
    }
122

  
123
}
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.202/org.gvsig.tools.main/src/main/java/org/gvsig/tools/main/README.txt
1
====
2
    gvSIG. Desktop Geographic Information System.
3

  
4
    Copyright (C) 2007-2013 gvSIG Association.
5

  
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public License
8
    as published by the Free Software Foundation; either version 2
9
    of the License, or (at your option) any later version.
10

  
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
    GNU General Public License for more details.
15

  
16
    You should have received a copy of the GNU General Public License
17
    along with this program; if not, write to the Free Software
18
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
    MA  02110-1301, USA.
20

  
21
    For any additional information, do not hesitate to contact us
22
    at info AT gvsig.com, or visit our website www.gvsig.com.
23
====
24

  
25
To add a new tab to the application, perform the following steps:
26

  
27
- Create a new class extending the MainAction class, implementing the methods:
28

  
29
  - createComponent(): create your demo panel
30
  
31
  - getComponentTitle(): return the name of the panel
32
  
33
- Add your new action class to the list of actions in the Main.createActions()
34
  method. 
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.202/org.gvsig.tools.main/src/main/resources/log4j.xml
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

  
6
    Copyright (C) 2007-2013 gvSIG Association.
7

  
8
    This program is free software; you can redistribute it and/or
9
    modify it under the terms of the GNU General Public License
10
    as published by the Free Software Foundation; either version 2
11
    of the License, or (at your option) any later version.
12

  
13
    This program is distributed in the hope that it will be useful,
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
    GNU General Public License for more details.
17

  
18
    You should have received a copy of the GNU General Public License
19
    along with this program; if not, write to the Free Software
20
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21
    MA  02110-1301, USA.
22

  
23
    For any additional information, do not hesitate to contact us
24
    at info AT gvsig.com, or visit our website www.gvsig.com.
25

  
26
-->
27
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
28

  
29
<!-- 
30
Log4J configuration file for unit tests execution.
31
 -->
32
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
33

  
34
	<!-- Appender configuration to show logging messages through the console -->
35
	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
36
		<layout class="org.apache.log4j.PatternLayout">
37
			<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n  %m%n" />
38
		</layout>
39
	</appender>
40

  
41
	<!-- 
42
	Activate logging messages of DEBUG level of higher only for the
43
	org.gvsig.tools packages.
44
	You can put full classes names or packages instead, to configure
45
	logging for all the classes and subpackages of the package.
46
	-->
47
	<category name="org.gvsig.tools">
48
		<priority value="DEBUG" />
49
	</category>
50

  
51
	<!-- 
52
	By default, show only logging messages of INFO level or higher, 
53
	through the previously configured CONSOLE appender. 
54
	-->
55
	<root>
56
		<priority value="INFO" />
57
		<appender-ref ref="CONSOLE" />
58
	</root>
59
</log4j:configuration>
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.202/org.gvsig.tools.main/src/test/java/org/gvsig/tools/main/AppTest.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.tools.main;
25

  
26
import junit.framework.Test;
27
import junit.framework.TestCase;
28
import junit.framework.TestSuite;
29

  
30
/**
31
 * Unit test for simple App.
32
 */
33
public class AppTest extends TestCase {
34

  
35
    /**
36
     * @return the suite of tests being tested
37
     */
38
    public static Test suite() {
39
        return new TestSuite(AppTest.class);
40
    }
41

  
42
    /**
43
     * Create the test case
44
     * 
45
     * @param testName
46
     *            name of the test case
47
     */
48
    public AppTest(String testName) {
49
        super(testName);
50
    }
51

  
52
    /**
53
     * Rigourous Test :-)
54
     */
55
    public void testApp() {
56
        assertTrue(true);
57
    }
58
}
0 59

  
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.202/org.gvsig.tools.lib/src/main/javadoc/overview.html
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

  
6
    Copyright (C) 2007-2013 gvSIG Association.
7

  
8
    This program is free software; you can redistribute it and/or
9
    modify it under the terms of the GNU General Public License
10
    as published by the Free Software Foundation; either version 2
11
    of the License, or (at your option) any later version.
12

  
13
    This program is distributed in the hope that it will be useful,
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
    GNU General Public License for more details.
17

  
18
    You should have received a copy of the GNU General Public License
19
    along with this program; if not, write to the Free Software
20
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21
    MA  02110-1301, USA.
22

  
23
    For any additional information, do not hesitate to contact us
24
    at info AT gvsig.com, or visit our website www.gvsig.com.
25

  
26
-->
27
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
28
<html xmlns="http://www.w3.org/1999/xhtml">
29
<head>
30
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
31
<title>org.gvsig.tools.lib package documentation</title>
32
</head>
33
<body>
34

  
35
	<p>TODO: Example library overview.</p>
36
	
37
	<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>
38

  
39
</body>
40
</html>
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.202/org.gvsig.tools.lib/src/main/resources/README.txt
1
====
2
    gvSIG. Desktop Geographic Information System.
3

  
4
    Copyright (C) 2007-2013 gvSIG Association.
5

  
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public License
8
    as published by the Free Software Foundation; either version 2
9
    of the License, or (at your option) any later version.
10

  
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
    GNU General Public License for more details.
15

  
16
    You should have received a copy of the GNU General Public License
17
    along with this program; if not, write to the Free Software
18
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
    MA  02110-1301, USA.
20

  
21
    For any additional information, do not hesitate to contact us
22
    at info AT gvsig.com, or visit our website www.gvsig.com.
23
====
24

  
25
Put into this folder the resources needed by your library classes.
26

  
27
This folder is added to the runtime classpath, so you can load any resources 
28
through the ClassLoader.
29

  
30
By default, into this folder you can find some examples of resource bundle 
31
property files that may be used by your library classes.
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.202/org.gvsig.tools.lib/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
1
org.gvsig.tools.ToolsLibrary
2
org.gvsig.tools.persistence.xml.XMLPersistenceLibrary
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.202/org.gvsig.tools.lib/src/main/resources/org/gvsig/tools/persistence/xml/persistentState_base.xsd
1
<?xml version="1.0"?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

  
6
    Copyright (C) 2007-2013 gvSIG Association.
7

  
8
    This program is free software; you can redistribute it and/or
9
    modify it under the terms of the GNU General Public License
10
    as published by the Free Software Foundation; either version 2
11
    of the License, or (at your option) any later version.
12

  
13
    This program is distributed in the hope that it will be useful,
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
    GNU General Public License for more details.
17

  
18
    You should have received a copy of the GNU General Public License
19
    along with this program; if not, write to the Free Software
20
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21
    MA  02110-1301, USA.
22

  
23
    For any additional information, do not hesitate to contact us
24
    at info AT gvsig.com, or visit our website www.gvsig.com.
25

  
26
-->
27

  
28
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
29
	targetNamespace="http://www.gvsig.org/libTools"	
30
	xmlns:tools="http://www.gvsig.org/libTools"
31
	xmlns:xlink="http://www.w3.org/1999/xlink" 
32
    elementFormDefault="unqualified"
33
    attributeFormDefault="unqualified"
34
>
35

  
36
<xs:simpleType name="stateTypeId">
37
    <xs:restriction base="xs:NMTOKEN">
38
      <xs:enumeration value="String"/>
39
      <xs:enumeration value="ObjectReference"/>
40
      <xs:enumeration value="Boolean"/>
41
      <xs:enumeration value="Integer"/>
42
      <xs:enumeration value="List"/>
43
      <xs:enumeration value="Set"/>
44
      <xs:enumeration value="Map"/>
45
      <xs:enumeration value="Double"/>
46
      <xs:enumeration value="Long"/>
47
      <xs:enumeration value="Float"/>
48
      <xs:enumeration value="Date"/>
49
      <xs:enumeration value="null"/>
50
    </xs:restriction>
51
</xs:simpleType>
52

  
53
<xs:simpleType name="stateTypeId_String">
54
    <xs:restriction base="xs:NMTOKEN">
55
      <xs:enumeration value="String"/>
56
      <xs:enumeration value="null"/>
57
    </xs:restriction>
58
</xs:simpleType>
59

  
60
<xs:simpleType name="stateTypeId_ObjectReference">
61
    <xs:restriction base="xs:NMTOKEN">
62
      <xs:enumeration value="ObjectReference"/>
63
      <xs:enumeration value="null"/>
64
    </xs:restriction>
65
</xs:simpleType>
66

  
67
<xs:simpleType name="stateTypeId_Boolean">
68
    <xs:restriction base="xs:NMTOKEN">
69
      <xs:enumeration value="Boolean"/>
70
      <xs:enumeration value="null"/>
71
    </xs:restriction>
72
</xs:simpleType>
73

  
74

  
75
<xs:simpleType name="stateTypeId_Integer">
76
    <xs:restriction base="xs:NMTOKEN">
77
      <xs:enumeration value="Integer"/>
78
      <xs:enumeration value="null"/>
79
    </xs:restriction>
80
</xs:simpleType>
81

  
82

  
83
<xs:simpleType name="stateTypeId_List">
84
    <xs:restriction base="xs:NMTOKEN">
85
      <xs:enumeration value="List"/>
86
      <xs:enumeration value="null"/>
87
    </xs:restriction>
88
</xs:simpleType>
89

  
90
<xs:simpleType name="stateTypeId_Set">
91
    <xs:restriction base="xs:NMTOKEN">
92
      <xs:enumeration value="Set"/>
93
      <xs:enumeration value="null"/>
94
    </xs:restriction>
95
</xs:simpleType>
96

  
97
<xs:simpleType name="stateTypeId_Map">
98
    <xs:restriction base="xs:NMTOKEN">
99
      <xs:enumeration value="Map"/>
100
      <xs:enumeration value="null"/>
101
    </xs:restriction>
102
</xs:simpleType>
103

  
104
<xs:simpleType name="stateTypeId_Double">
105
    <xs:restriction base="xs:NMTOKEN">
106
      <xs:enumeration value="Double"/>
107
      <xs:enumeration value="null"/>
108
    </xs:restriction>
109
</xs:simpleType>
110

  
111
<xs:simpleType name="stateTypeId_Long">
112
    <xs:restriction base="xs:NMTOKEN">
113
      <xs:enumeration value="Long"/>
114
      <xs:enumeration value="null"/>
115
    </xs:restriction>
116
</xs:simpleType>
117

  
118
<xs:simpleType name="stateTypeId_Float">
119
    <xs:restriction base="xs:NMTOKEN">
120
      <xs:enumeration value="Float"/>
121
      <xs:enumeration value="null"/>
122
    </xs:restriction>
123
</xs:simpleType>
124

  
125
<xs:simpleType name="stateTypeId_Date">
126
    <xs:restriction base="xs:NMTOKEN">
127
      <xs:enumeration value="Date"/>
128
      <xs:enumeration value="null"/>
129
    </xs:restriction>
130
</xs:simpleType>
131

  
132

  
133
<xs:simpleType name="xml_persistence_version">
134
    <xs:restriction base="xs:string">
135
      <xs:pattern value="[0-9]*[.][0-9]*[.][0-9]*"/>
136
    </xs:restriction>
137
</xs:simpleType>
138

  
139
<xs:simpleType name="boolean" xmlns="http://www.gvsig.org/libTools">
140
    <xs:restriction base="xs:NMTOKEN">
141
      <xs:enumeration value="true"/>
142
      <xs:enumeration value="false"/>
143
    </xs:restriction>
144
</xs:simpleType>
145

  
146

  
147
<xs:complexType name="state_attribute">	
148
	<xs:attribute name="type" type="tools:stateTypeId"/>
149
</xs:complexType>
150

  
151

  
152
<xs:complexType name="state_attribute_Null" mixed="true">
153
	<xs:attribute name="type" type="tools:stateTypeId" fixed="null"/>
154
</xs:complexType>
155

  
156
<xs:complexType name="state_attribute_Integer">
157
	<xs:simpleContent>
158
		<xs:extension base="xs:integer">
159
			<xs:attribute name="type" type="tools:stateTypeId_Integer" />
160
		</xs:extension>
161
	</xs:simpleContent>
162
</xs:complexType>
163

  
164
<xs:complexType name="state_attribute_Integer_notNull">
165
	<xs:simpleContent>
166
		<xs:extension base="xs:integer">
167
			<xs:attribute name="type" type="tools:stateTypeId_Integer" fixed="Integer"/>
168
		</xs:extension>
169
	</xs:simpleContent>
170
</xs:complexType>
171

  
172

  
173
<xs:complexType name="state_attribute_Long">
174
	<xs:simpleContent>
175
		<xs:extension base="xs:long">
176
			<xs:attribute name="type" type="tools:stateTypeId_Long"/>
177
		</xs:extension>		
178
	</xs:simpleContent>
179
</xs:complexType>
180

  
181
<xs:complexType name="state_attribute_Long_notNull">
182
	<xs:simpleContent>
183
		<xs:extension base="xs:long">
184
			<xs:attribute name="type" type="tools:stateTypeId_Long" fixed="Long"/>
185
		</xs:extension>		
186
	</xs:simpleContent>
187
</xs:complexType>
188

  
189
<xs:complexType name="state_attribute_Date">
190
	<xs:simpleContent>
191
		<xs:extension base="xs:long">
192
			<xs:attribute name="type" type="tools:stateTypeId_Date"/>
193
		</xs:extension>		
194
	</xs:simpleContent>
195
</xs:complexType>
196

  
197
<xs:complexType name="state_attribute_Date_notNull">
198
	<xs:simpleContent>
199
		<xs:extension base="xs:long">
200
			<xs:attribute name="type" type="tools:stateTypeId_Date" fixed="Date"/>
201
		</xs:extension>		
202
	</xs:simpleContent>
203
</xs:complexType>
204

  
205
<xs:complexType name="state_attribute_Float">
206
	<xs:simpleContent>
207
		<xs:extension base="xs:float">
208
			<xs:attribute name="type" type="tools:stateTypeId_Float" />
209
		</xs:extension>		
210
	</xs:simpleContent>
211
</xs:complexType>
212

  
213
<xs:complexType name="state_attribute_Float_notNull">
214
	<xs:simpleContent>
215
		<xs:extension base="xs:float">
216
			<xs:attribute name="type" type="tools:stateTypeId_Float" fixed="Float"/>
217
		</xs:extension>		
218
	</xs:simpleContent>
219
</xs:complexType>
220

  
221

  
222
<xs:complexType name="state_attribute_Double">
223
	<xs:simpleContent>
224
		<xs:extension base="xs:double">
225
			<xs:attribute name="type" type="tools:stateTypeId_Double"/>
226
		</xs:extension>		
227
	</xs:simpleContent>
228
</xs:complexType>
229

  
230

  
231
<xs:complexType name="state_attribute_Double_notNull">
232
	<xs:simpleContent>
233
		<xs:extension base="xs:double">
234
			<xs:attribute name="type" type="tools:stateTypeId_Double" fixed="Double"/>
235
		</xs:extension>		
236
	</xs:simpleContent>
237
</xs:complexType>
238

  
239
<xs:complexType name="state_attribute_Boolean">
240
	<xs:simpleContent>
241
		<xs:extension base="tools:boolean">
242
			<xs:attribute name="type" type="tools:stateTypeId_Boolean"/>
243
		</xs:extension>		
244
	</xs:simpleContent>
245
</xs:complexType>
246

  
247
<xs:complexType name="state_attribute_Boolean_notNull">
248
	<xs:simpleContent>
249
		<xs:extension base="tools:boolean">
250
			<xs:attribute name="type" type="tools:stateTypeId_Boolean" fixed="Boolean"/>
251
		</xs:extension>		
252
	</xs:simpleContent>
253
</xs:complexType>
254

  
255

  
256
<xs:complexType name="state_attribute_String">
257
	<xs:simpleContent>
258
		<xs:extension base="xs:string">
259
			<xs:attribute name="type" type="tools:stateTypeId_String"/>
260
		</xs:extension>		
261
	</xs:simpleContent>
262
</xs:complexType>
263

  
264

  
265
<xs:complexType name="state_attribute_String_notNull">
266
	<xs:simpleContent>
267
		<xs:extension base="xs:string">
268
			<xs:attribute name="type" type="tools:stateTypeId_String" fixed="String"/>
269
		</xs:extension>		
270
	</xs:simpleContent>
271
</xs:complexType>
272

  
273
<xs:complexType name="state_attribute_List">
274
	<xs:sequence>
275
		<xs:element name="listItem" type="tools:state_attribute" maxOccurs="unbounded"/>
276
	</xs:sequence>
277
	<xs:attribute name="type" type="tools:stateTypeId_List"/>
278
</xs:complexType>
279

  
280
<xs:complexType name="state_attribute_List_notNull">
281
	<xs:sequence>
282
		<xs:element name="listItem" type="tools:state_attribute" maxOccurs="unbounded"/>
283
	</xs:sequence>
284
	<xs:attribute name="type" type="tools:stateTypeId_List" fixed="List"/>
285
</xs:complexType>
286

  
287

  
288
<xs:complexType name="state_attribute_Set">
289
	<xs:sequence>
290
		<xs:element name="setItem" type="tools:state_attribute" maxOccurs="unbounded"/>
291
	</xs:sequence>
292
	<xs:attribute name="type" type="tools:stateTypeId_Set"/>
293
</xs:complexType>
294

  
295

  
296
<xs:complexType name="state_attribute_Set_notNull">
297
	<xs:sequence>
298
		<xs:element name="setItem" type="tools:state_attribute" maxOccurs="unbounded"/>
299
	</xs:sequence>
300
	<xs:attribute name="type" type="tools:stateTypeId_Set" fixed="Set"/>
301
</xs:complexType>
302

  
303

  
304
<xs:complexType name="mapItem">
305
	<xs:all>
306
		<xs:element name="key" type="tools:state_attribute"/>
307
		<xs:element name="value" type="tools:state_attribute"/>
308
	</xs:all>
309
</xs:complexType>
310

  
311
<xs:complexType name="state_attribute_Map">
312
	<xs:sequence>		
313
		<xs:element name="mapItem" type="tools:mapItem" maxOccurs="unbounded"/>
314
	</xs:sequence>
315
	<xs:attribute name="type" type="tools:stateTypeId_Map"/>
316
</xs:complexType>
317

  
318
<xs:complexType name="state_attribute_Map_notNull">
319
	<xs:sequence>		
320
		<xs:element name="mapItem" type="tools:mapItem" maxOccurs="unbounded"/>
321
	</xs:sequence>
322
	<xs:attribute name="type" type="tools:stateTypeId_Map" fixed="Map"/>
323
</xs:complexType>
324

  
325
<xs:attributeGroup name="xlink_attributes">
326
	<xs:attribute name="type" xmlns="http://www.w3.org/1999/xlink" type="xs:string" fixed="simple" use="required"/>
327
	<xs:attribute name="href" xmlns="http://www.w3.org/1999/xlink" use="required">
328
		<xs:simpleType>
329
			<xs:restriction base="xs:string">
330
				<xs:pattern value="states[#]id[(]['][0-9]*['][)]"/>
331
			</xs:restriction>
332
		</xs:simpleType>
333
	</xs:attribute>
334
</xs:attributeGroup>
335

  
336
<xs:complexType name="objectReference">
337
	<xs:attribute name="id_state" type="xs:integer"/>
338
	<xs:attributeGroup ref="tools:xlink_attributes"/>
339
</xs:complexType>
340

  
341
<xs:complexType name="state_attribute_ObjectReference">
342
	<xs:all>		
343
		<xs:element name="reference" type="tools:objectReference"/>
344
	</xs:all>
345
	<xs:attribute name="type" type="tools:stateTypeId_ObjectReference"/>
346
</xs:complexType>
347

  
348
<xs:complexType name="state_attribute_ObjectReference_notNull">
349
	<xs:sequence>		
350
		<xs:element name="reference" type="tools:objectReference" maxOccurs="1" minOccurs="1"/>
351
	</xs:sequence>
352
	<xs:attribute name="type" type="tools:stateTypeId_ObjectReference" fixed="ObjectReference"/>
353
</xs:complexType>
354

  
355

  
356
 
357
<xs:attributeGroup name="state_attributes">
358
	<xs:attribute name="id" type="xs:integer" use="required"/>
359
</xs:attributeGroup>
360

  
361
 
362
<xs:element name="XMLPersitence">
363
  <xs:complexType>
364
    <xs:all>
365
    
366
      <xs:element name="persistence_xml_version" type="tools:xml_persistence_version" 
367
      		minOccurs="1" maxOccurs="1"/>
368
      <xs:element name="rootState" minOccurs="1" maxOccurs="1">
369
        <xs:complexType>
370
		  <xs:attribute name="id_state" type="xs:integer" use="required"/>
371
		  <xs:attributeGroup ref="tools:xlink_attributes"/>
372
		</xs:complexType>
373
      </xs:element>
374
      <xs:element name="states">
375
      	<xs:complexType>
376
      		<xs:sequence>
377
      			<xs:any minOccurs="1" maxOccurs="unbounded"/>
378
      		</xs:sequence>
379
      	</xs:complexType>
380
      </xs:element>
381
      
382
      
383
    </xs:all>
384
  </xs:complexType>
385
</xs:element>
386
</xs:schema>
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.202/org.gvsig.tools.lib/src/main/resources/org/gvsig/tools/lib/i18n/text.properties
1
#
2
# gvSIG. Desktop Geographic Information System.
3
#
4
# Copyright (C) 2007-2013 gvSIG Association.
5
#
6
# This program is free software; you can redistribute it and/or
7
# modify it under the terms of the GNU General Public License
8
# as published by the Free Software Foundation; either version 2
9
# of the License, or (at your option) any later version.
10
#
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
# GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with this program; if not, write to the Free Software
18
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
# MA  02110-1301, USA.
20
#
21
# For any additional information, do not hesitate to contact us
22
# at info AT gvsig.com, or visit our website www.gvsig.com.
23
#
24

  
25
# Resource bundle texts for the Spanish language locale (es)
26
Example.returns_value=devuelve el valor
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.202/org.gvsig.tools.lib/src/main/resources/org/gvsig/tools/lib/i18n/text_en.properties
1
#
2
# gvSIG. Desktop Geographic Information System.
3
#
4
# Copyright (C) 2007-2013 gvSIG Association.
5
#
6
# This program is free software; you can redistribute it and/or
7
# modify it under the terms of the GNU General Public License
8
# as published by the Free Software Foundation; either version 2
9
# of the License, or (at your option) any later version.
10
#
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
# GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with this program; if not, write to the Free Software
18
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
# MA  02110-1301, USA.
20
#
21
# For any additional information, do not hesitate to contact us
22
# at info AT gvsig.com, or visit our website www.gvsig.com.
23
#
24

  
25
# Resource bundle texts for the English language locale (en)
26
Example.returns_value=returns value
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.202/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/evaluator/EvaluatorFieldValue.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.tools.evaluator;
25

  
26
public class EvaluatorFieldValue {
27

  
28
	final public static int GENERIC = 0;
29
	final public static int MATCH = 1;
30
	final public static int RANGE = 2;
31
	final public static int NEAREST = 3;
32

  
33
	private int type;
34
	private String fieldName;
35

  
36

  
37
	EvaluatorFieldValue(String fieldName) {
38
		this(fieldName, GENERIC);
39
	}
40

  
41
	EvaluatorFieldValue(String fieldName, int type) {
42
		this.fieldName = fieldName;
43
		this.type = type;
44
	}
45

  
46
	/**
47
	 * Get the type of operation realiced over the field.
48
	 *
49
	 * The posibles values are: MATCH RANGE or NEAREST
50
	 *
51
	 * @return an int with the type of operation
52
	 */
53
	public int getType() {
54
		return this.type;
55
	}
56

  
57
	/**
58
	 * Get the fieldName over the operation is realiced.
59
	 *
60
	 * @return String name of field.
61
	 */
62
	public String getFieldName() {
63
		return this.fieldName;
64
	}
65

  
66
}
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.202/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/evaluator/AndEvaluator.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.tools.evaluator;
25

  
26
import java.util.ArrayList;
27
import java.util.List;
28
import org.gvsig.tools.lang.Cloneable;
29

  
30

  
31
/**
32
 * <p>
33
 * This evaluator is a set of evaluators that are applied used the and
34
 * operator. It means that the evaluate method only returns <code>true</code>
35
 * if all the evaluators return <code>true</code>.  
36
 * </p>
37
 * <p>
38
 * A condition to use this type of evaluators is that the evaluate method
39
 * of all the single evaluators has to return a boolean value.
40
 * </p>
41
 * 
42
 * @author gvSIG Team
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff