Revision 2300
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.247/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 |
The first time you checkout the current project to a new workspace, |
|
26 |
you have to prepare it to be able to work easily with maven from |
|
27 |
eclipse itself. |
|
28 |
|
|
29 |
Perform the following steps: |
|
30 |
|
|
31 |
1.- Launch the *prepare-workspace.xml* ant build file. |
|
32 |
You can do it by loading the file into the ant view, |
|
33 |
and running the default task, or right-clicking the |
|
34 |
file from the package explorer or the navigator and |
|
35 |
select the option: *Run as > Ant build*. |
|
36 |
|
|
37 |
2.- Restart eclipse. |
|
38 |
|
|
39 |
3.- Import the subprojects of the project you have just checked out. |
|
40 |
|
|
41 |
Those steps are only needed once per workspace. |
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.247/org.gvsig.tools.util/org.gvsig.tools.util.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.tools.util.impl.ToolsUtilLibraryImpl |
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.247/org.gvsig.tools.util/org.gvsig.tools.util.impl/src/main/java/org/gvsig/configurableactions/DefaultConfigurableActionsMamager.java | ||
---|---|---|
1 |
|
|
2 |
package org.gvsig.configurableactions; |
|
3 |
|
|
4 |
import java.lang.ref.WeakReference; |
|
5 |
import java.util.ArrayList; |
|
6 |
import java.util.Collection; |
|
7 |
import java.util.HashMap; |
|
8 |
import java.util.List; |
|
9 |
import java.util.Map; |
|
10 |
import javax.swing.Action; |
|
11 |
import javax.swing.JComponent; |
|
12 |
import org.apache.commons.lang3.StringUtils; |
|
13 |
|
|
14 |
|
|
15 |
public class DefaultConfigurableActionsMamager implements ConfigurableActionsMamager { |
|
16 |
|
|
17 |
private class PanelActions { |
|
18 |
List<Action> actions; |
|
19 |
WeakReference<ActionsComponent> component; |
|
20 |
private final String panelid; |
|
21 |
|
|
22 |
public PanelActions(String panelid) { |
|
23 |
this.panelid = panelid; |
|
24 |
this.actions = new ArrayList<>(); |
|
25 |
} |
|
26 |
|
|
27 |
public void setComponent(ActionsComponent component) { |
|
28 |
this.component = new WeakReference<>(component); |
|
29 |
} |
|
30 |
|
|
31 |
public ActionsComponent getComponent() { |
|
32 |
if( this.component == null ) { |
|
33 |
return null; |
|
34 |
} |
|
35 |
ActionsComponent component = this.component.get(); |
|
36 |
return component; |
|
37 |
} |
|
38 |
|
|
39 |
public void updateComponent() { |
|
40 |
ActionsComponent component = this.getComponent(); |
|
41 |
if( component == null ) { |
|
42 |
return; |
|
43 |
} |
|
44 |
component.update(actions); |
|
45 |
} |
|
46 |
|
|
47 |
public int size() { |
|
48 |
return this.actions.size(); |
|
49 |
} |
|
50 |
|
|
51 |
public Action get(int i) { |
|
52 |
return this.actions.get(i); |
|
53 |
} |
|
54 |
|
|
55 |
public void set(int i, Action action) { |
|
56 |
this.actions.set(i, action); |
|
57 |
this.updateComponent(); |
|
58 |
} |
|
59 |
|
|
60 |
public void add(Action action) { |
|
61 |
this.actions.add(action); |
|
62 |
this.updateComponent(); |
|
63 |
} |
|
64 |
|
|
65 |
public void remove(int i) { |
|
66 |
this.actions.remove(i); |
|
67 |
this.updateComponent(); |
|
68 |
} |
|
69 |
|
|
70 |
public Collection<Action> getActions() { |
|
71 |
return this.actions; |
|
72 |
} |
|
73 |
|
|
74 |
private void removeAll() { |
|
75 |
this.actions.clear(); |
|
76 |
this.updateComponent(); |
|
77 |
} |
|
78 |
|
|
79 |
} |
|
80 |
|
|
81 |
private Map<String,PanelActions> panelsActions; |
|
82 |
|
|
83 |
|
|
84 |
public DefaultConfigurableActionsMamager() { |
|
85 |
this.panelsActions = new HashMap<>(); |
|
86 |
} |
|
87 |
|
|
88 |
@Override |
|
89 |
public void addConfigurableAction(String panelid, Action action) { |
|
90 |
PanelActions panelActions = this.panelsActions.get(panelid); |
|
91 |
if( panelActions==null ) { |
|
92 |
panelActions = new PanelActions(panelid); |
|
93 |
this.panelsActions.put(panelid, panelActions); |
|
94 |
} |
|
95 |
for( int i=0; i<panelActions.size(); i++ ) { |
|
96 |
Action currentAction = panelActions.get(i); |
|
97 |
if( StringUtils.equalsIgnoreCase( |
|
98 |
(String)currentAction.getValue(Action.ACTION_COMMAND_KEY), |
|
99 |
(String)action.getValue(Action.ACTION_COMMAND_KEY) ) ) { |
|
100 |
panelActions.set(i, action); |
|
101 |
return; |
|
102 |
} |
|
103 |
} |
|
104 |
panelActions.add(action); |
|
105 |
} |
|
106 |
|
|
107 |
@Override |
|
108 |
public void removeConfigurableAction(String panelid, String actionName) { |
|
109 |
PanelActions panelActions = this.panelsActions.get(panelid); |
|
110 |
if( panelActions==null ) { |
|
111 |
return; |
|
112 |
} |
|
113 |
for( int i=0; i<panelActions.size(); i++ ) { |
|
114 |
Action currentAction = panelActions.get(i); |
|
115 |
if( StringUtils.equalsIgnoreCase( |
|
116 |
(String)currentAction.getValue(Action.ACTION_COMMAND_KEY), |
|
117 |
actionName ) ) { |
|
118 |
panelActions.remove(i); |
|
119 |
return; |
|
120 |
} |
|
121 |
} |
|
122 |
} |
|
123 |
|
|
124 |
@Override |
|
125 |
public void removeAllConfigurableActions(String panelid) { |
|
126 |
PanelActions panelActions = this.panelsActions.get(panelid); |
|
127 |
if( panelActions==null ) { |
|
128 |
return; |
|
129 |
} |
|
130 |
panelActions.removeAll(); |
|
131 |
} |
|
132 |
|
|
133 |
@Override |
|
134 |
public Collection<Action> getConfigurableActions(String panelid) { |
|
135 |
PanelActions panelActions = this.panelsActions.get(panelid); |
|
136 |
if( panelActions==null ) { |
|
137 |
panelActions = new PanelActions(panelid); |
|
138 |
this.panelsActions.put(panelid, panelActions); |
|
139 |
} |
|
140 |
return panelActions.getActions(); |
|
141 |
} |
|
142 |
|
|
143 |
@Override |
|
144 |
public JComponent getConfigurableActionsComponent(String panelid, Object source) { |
|
145 |
PanelActions panelActions = this.panelsActions.get(panelid); |
|
146 |
if( panelActions==null ) { |
|
147 |
panelActions = new PanelActions(panelid); |
|
148 |
this.panelsActions.put(panelid, panelActions); |
|
149 |
} |
|
150 |
ActionsComponent component = new ActionsComponent(panelActions.getActions(), source); |
|
151 |
panelActions.setComponent(component); |
|
152 |
return component; |
|
153 |
} |
|
154 |
|
|
155 |
} |
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.247/org.gvsig.tools.util/org.gvsig.tools.util.impl/src/main/java/org/gvsig/configurableactions/ActionsComponent.java | ||
---|---|---|
1 |
|
|
2 |
package org.gvsig.configurableactions; |
|
3 |
|
|
4 |
import java.awt.event.ActionEvent; |
|
5 |
import java.awt.event.MouseAdapter; |
|
6 |
import java.awt.event.MouseEvent; |
|
7 |
import java.net.URL; |
|
8 |
import java.util.Collection; |
|
9 |
import javax.swing.AbstractAction; |
|
10 |
import javax.swing.Action; |
|
11 |
import javax.swing.ImageIcon; |
|
12 |
import javax.swing.JLabel; |
|
13 |
import javax.swing.JMenuItem; |
|
14 |
import javax.swing.JPopupMenu; |
|
15 |
import org.gvsig.tools.ToolsLocator; |
|
16 |
import org.gvsig.tools.i18n.I18nManager; |
|
17 |
|
|
18 |
|
|
19 |
public class ActionsComponent extends JLabel { |
|
20 |
|
|
21 |
private final Object source; |
|
22 |
private Collection<Action> actions; |
|
23 |
|
|
24 |
private class ActionListenerAdapter extends AbstractAction { |
|
25 |
|
|
26 |
private final Action action; |
|
27 |
|
|
28 |
public ActionListenerAdapter(Action action) { |
|
29 |
this.action = action; |
|
30 |
} |
|
31 |
|
|
32 |
@Override |
|
33 |
public void actionPerformed(ActionEvent e) { |
|
34 |
e.setSource(source); |
|
35 |
action.actionPerformed(e); |
|
36 |
} |
|
37 |
|
|
38 |
@Override |
|
39 |
public Object getValue(String key) { |
|
40 |
return action.getValue(key); |
|
41 |
} |
|
42 |
|
|
43 |
@Override |
|
44 |
public void putValue(String key, Object newValue) { |
|
45 |
action.putValue(key, newValue); |
|
46 |
} |
|
47 |
|
|
48 |
@Override |
|
49 |
public boolean isEnabled() { |
|
50 |
return action.isEnabled(); |
|
51 |
} |
|
52 |
|
|
53 |
@Override |
|
54 |
public void setEnabled(boolean newValue) { |
|
55 |
action.setEnabled(newValue); |
|
56 |
} |
|
57 |
} |
|
58 |
|
|
59 |
@SuppressWarnings("OverridableMethodCallInConstructor") |
|
60 |
public ActionsComponent(Collection<Action> actions, Object source) { |
|
61 |
this.source = source; |
|
62 |
this.update(actions); |
|
63 |
this.initComponent(); |
|
64 |
} |
|
65 |
|
|
66 |
private void initComponent() { |
|
67 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
68 |
this.setToolTipText(i18n.getTranslation("_Click_to_see_more_action_in_this_panel")); |
|
69 |
URL url = this.getClass().getResource("/org/gvsig/configurableactions/images/configurableactions.png"); |
|
70 |
this.setIcon(new ImageIcon(url)); |
|
71 |
this.setBorder(null); |
|
72 |
this.addMouseListener(new MouseAdapter() { |
|
73 |
@Override |
|
74 |
public void mouseClicked(MouseEvent e) { |
|
75 |
if( e.getClickCount()==1 && e.getButton()==MouseEvent.BUTTON1 ) { |
|
76 |
doShowMenu(); |
|
77 |
} |
|
78 |
} |
|
79 |
}); |
|
80 |
// this.addActionListener(new ActionListener() { |
|
81 |
// @Override |
|
82 |
// public void actionPerformed(ActionEvent e) { |
|
83 |
// doShowMenu(); |
|
84 |
// } |
|
85 |
// }); |
|
86 |
} |
|
87 |
|
|
88 |
public void update(Collection<Action> actions) { |
|
89 |
this.actions = actions; |
|
90 |
if( actions==null || actions.isEmpty() ) { |
|
91 |
this.setVisible(false); |
|
92 |
} else { |
|
93 |
this.setVisible(true); |
|
94 |
} |
|
95 |
} |
|
96 |
|
|
97 |
private void doShowMenu() { |
|
98 |
JPopupMenu menu = new JPopupMenu(); |
|
99 |
for (Action action : actions) { |
|
100 |
JMenuItem item = new JMenuItem(new ActionListenerAdapter(action)); |
|
101 |
menu.add(item); |
|
102 |
} |
|
103 |
menu.show(this, 0,this.getHeight()); |
|
104 |
} |
|
105 |
} |
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.247/org.gvsig.tools.util/org.gvsig.tools.util.impl/src/main/java/org/gvsig/propertypage/impl/DefaultPropertiesPageManager.java | ||
---|---|---|
1 |
package org.gvsig.propertypage.impl; |
|
2 |
|
|
3 |
import java.awt.event.ActionEvent; |
|
4 |
import java.lang.reflect.InvocationTargetException; |
|
5 |
import java.lang.reflect.Method; |
|
6 |
import java.util.ArrayList; |
|
7 |
import java.util.Collection; |
|
8 |
import java.util.Collections; |
|
9 |
import java.util.Comparator; |
|
10 |
import java.util.HashMap; |
|
11 |
import java.util.List; |
|
12 |
import java.util.Map; |
|
13 |
import org.apache.commons.lang3.StringUtils; |
|
14 |
import org.gvsig.propertypage.PropertiesPage; |
|
15 |
import org.gvsig.propertypage.PropertiesPage.SetPageEnabledEvent; |
|
16 |
import org.gvsig.propertypage.PropertiesPageFactory; |
|
17 |
import org.gvsig.propertypage.PropertiesPageManager; |
|
18 |
import org.gvsig.tools.ToolsLocator; |
|
19 |
import org.gvsig.tools.identitymanagement.SimpleIdentity; |
|
20 |
import org.gvsig.tools.identitymanagement.SimpleIdentityManager; |
|
21 |
import org.gvsig.tools.util.Invocable; |
|
22 |
import org.slf4j.Logger; |
|
23 |
import org.slf4j.LoggerFactory; |
|
24 |
|
|
25 |
public class DefaultPropertiesPageManager implements PropertiesPageManager { |
|
26 |
|
|
27 |
private static class DefaultSetPageEnabledEvent extends ActionEvent { |
|
28 |
|
|
29 |
private Invocable filter; |
|
30 |
private boolean enabled; |
|
31 |
|
|
32 |
public DefaultSetPageEnabledEvent(Object source, Invocable filter, boolean enabled ) { |
|
33 |
super(source, SetPageEnabledEvent.ID, SetPageEnabledEvent.ACTION_COMMAND); |
|
34 |
this.filter = filter; |
|
35 |
this.enabled = enabled; |
|
36 |
} |
|
37 |
|
|
38 |
public Invocable getFilter() { |
|
39 |
return filter; |
|
40 |
} |
|
41 |
|
|
42 |
public boolean isEnabled() { |
|
43 |
return enabled; |
|
44 |
} |
|
45 |
|
|
46 |
} |
|
47 |
|
|
48 |
public static final String ACCESS_PAGE_AUTHORIZATION = "propertypage-access"; |
|
49 |
|
|
50 |
private static final Logger logger = LoggerFactory.getLogger(DefaultPropertiesPageManager.class); |
|
51 |
|
|
52 |
private final Map<String, Map<String, PropertiesPageFactory>> groups = new HashMap<>(); |
|
53 |
|
|
54 |
public DefaultPropertiesPageManager() { |
|
55 |
|
|
56 |
} |
|
57 |
|
|
58 |
private String getFactoryName(PropertiesPageFactory factory) { |
|
59 |
String factoryName = factory.getClass().getName(); |
|
60 |
try { |
|
61 |
factoryName = factory.getName(); |
|
62 |
} catch(Throwable ex) { |
|
63 |
|
|
64 |
} |
|
65 |
return factoryName; |
|
66 |
} |
|
67 |
|
|
68 |
@Override |
|
69 |
public void registerFactory(PropertiesPageFactory factory) { |
|
70 |
logger.info("Register PropertisPageFactory " + factory.getClass().getName() + " , groupID=" + factory.getGroupID() + " (" + factory.toString() + ")."); |
|
71 |
Map<String, PropertiesPageFactory> group = this.getFactories(factory.getGroupID()); |
|
72 |
group.put(getFactoryName(factory), factory); |
|
73 |
} |
|
74 |
|
|
75 |
private Map<String, PropertiesPageFactory> getFactories(String groupID) { |
|
76 |
logger.info("get propeties page factories for groupID '" + groupID + "'"); |
|
77 |
Map<String,PropertiesPageFactory> group = this.groups.get(groupID); |
|
78 |
if (group == null) { |
|
79 |
group = new HashMap<>(); |
|
80 |
this.groups.put(groupID, group); |
|
81 |
} |
|
82 |
return group; |
|
83 |
} |
|
84 |
|
|
85 |
@Override |
|
86 |
public List<PropertiesPage> getPages(String groupID, Object container, Object data) { |
|
87 |
logger.info("get propeties page for groupID '" + groupID + "', and object '" + ((data==null)?"null":data.toString()) + "'."); |
|
88 |
List<PropertiesPage> pages = new ArrayList<>(); |
|
89 |
SimpleIdentityManager identityManager = ToolsLocator.getIdentityManager(); |
|
90 |
SimpleIdentity currentUser = identityManager.getCurrentIdentity(); |
|
91 |
if (!currentUser.isAuthorized(ACCESS_PAGE_AUTHORIZATION,null,groupID ) ) { |
|
92 |
return pages; // Empty list, no access to pages authoriced |
|
93 |
} |
|
94 |
|
|
95 |
Collection<PropertiesPageFactory> factories = this.getFactories(groupID).values(); |
|
96 |
String authorizationId = ACCESS_PAGE_AUTHORIZATION+"-"+groupID; |
|
97 |
for (PropertiesPageFactory factory : factories) { |
|
98 |
String factoryName = getFactoryName(factory); |
|
99 |
try { |
|
100 |
if (factory.isVisible(data)) { |
|
101 |
PropertiesPage page = createPage(factory, container, data); |
|
102 |
if (currentUser.isAuthorized(authorizationId,page, page.getTitle()) ) { |
|
103 |
pages.add(page); |
|
104 |
} |
|
105 |
} |
|
106 |
} catch(Throwable ex) { |
|
107 |
logger.warn("Can't get properties page from factory '"+factoryName+"'.",ex); |
|
108 |
} |
|
109 |
} |
|
110 |
Collections.sort(pages, new Comparator<PropertiesPage>() { |
|
111 |
@Override |
|
112 |
public int compare(PropertiesPage f1, PropertiesPage f2) { |
|
113 |
int n = f2.getPriority() - f1.getPriority(); |
|
114 |
if (n != 0) { |
|
115 |
return n; |
|
116 |
} |
|
117 |
return StringUtils.compareIgnoreCase(f1.getTitle(), f2.getTitle()); |
|
118 |
} |
|
119 |
}); |
|
120 |
return pages; |
|
121 |
} |
|
122 |
|
|
123 |
private PropertiesPage createPage(PropertiesPageFactory factory, Object container, Object data) |
|
124 |
throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException |
|
125 |
{ |
|
126 |
PropertiesPage page; |
|
127 |
try { |
|
128 |
page = factory.create(container, data); |
|
129 |
return page; |
|
130 |
} catch(AbstractMethodError ex) { |
|
131 |
} |
|
132 |
// Antes factory.create llevaba solo un argumento, data. Probamos |
|
133 |
// invocando a ese create. |
|
134 |
Method method = factory.getClass().getMethod("create", Object.class); |
|
135 |
page = (PropertiesPage) method.invoke(factory, data); |
|
136 |
return page; |
|
137 |
} |
|
138 |
|
|
139 |
@Override |
|
140 |
public ActionEvent createSetPageEnableEvent(PropertiesPage source, Invocable filter, boolean enabled) { |
|
141 |
return new DefaultSetPageEnabledEvent(source, filter, enabled); |
|
142 |
} |
|
143 |
|
|
144 |
@Override |
|
145 |
public ActionEvent createSetPageEnableEvent(final PropertiesPage source, final Class filterClass, final boolean enabled) { |
|
146 |
return new DefaultSetPageEnabledEvent( |
|
147 |
source, |
|
148 |
new Invocable() { |
|
149 |
@Override |
|
150 |
public Object call(Object... propertiesPages) { |
|
151 |
return filterClass.isInstance(propertiesPages[0]); |
|
152 |
} |
|
153 |
}, |
|
154 |
enabled |
|
155 |
); |
|
156 |
} |
|
157 |
|
|
158 |
} |
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.247/org.gvsig.tools.util/org.gvsig.tools.util.impl/src/main/java/org/gvsig/filedialogchooser/impl/DefaultFileDialogChooserManager.java | ||
---|---|---|
1 |
|
|
2 |
package org.gvsig.filedialogchooser.impl; |
|
3 |
|
|
4 |
import java.io.File; |
|
5 |
import java.util.HashMap; |
|
6 |
import java.util.Map; |
|
7 |
import org.gvsig.filedialogchooser.FileDialogChooser; |
|
8 |
import org.gvsig.filedialogchooser.FileDialogChooserManager; |
|
9 |
import org.gvsig.tools.ToolsLocator; |
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
public class DefaultFileDialogChooserManager implements FileDialogChooserManager { |
|
14 |
|
|
15 |
private Map<String,File> lastPaths; |
|
16 |
private boolean useNativeFileChooser = true; |
|
17 |
|
|
18 |
public DefaultFileDialogChooserManager() { |
|
19 |
this.lastPaths = new HashMap<>(); |
|
20 |
} |
|
21 |
|
|
22 |
@Override |
|
23 |
public void setUseNativeFileChooser(boolean b) { |
|
24 |
useNativeFileChooser = b; |
|
25 |
} |
|
26 |
|
|
27 |
@Override |
|
28 |
public boolean useNativeFileChooser() { |
|
29 |
return useNativeFileChooser; |
|
30 |
} |
|
31 |
|
|
32 |
@Override |
|
33 |
public FileDialogChooser create(String fileChooserID) { |
|
34 |
if( useNativeFileChooser ) { |
|
35 |
return new JFileChooserBased(fileChooserID); |
|
36 |
} |
|
37 |
return new VFSJFileChooserBased(fileChooserID); |
|
38 |
} |
|
39 |
|
|
40 |
@Override |
|
41 |
public FileDialogChooser create() { |
|
42 |
String fileChooserID = "DEFAULT_ID"; |
|
43 |
if( useNativeFileChooser ) { |
|
44 |
return new JFileChooserBased(fileChooserID); |
|
45 |
} |
|
46 |
return new VFSJFileChooserBased(fileChooserID); |
|
47 |
} |
|
48 |
|
|
49 |
@Override |
|
50 |
public File getLastPath(String fileChooserID, File defaultDirectory) { |
|
51 |
return ToolsLocator.getFoldersManager().getLastPath(fileChooserID, defaultDirectory); |
|
52 |
} |
|
53 |
|
|
54 |
@Override |
|
55 |
public void setLastPath(String fileChooserID, File path) { |
|
56 |
ToolsLocator.getFoldersManager().setLastPath(fileChooserID, path); |
|
57 |
} |
|
58 |
|
|
59 |
|
|
60 |
} |
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.247/org.gvsig.tools.util/org.gvsig.tools.util.impl/src/main/java/org/gvsig/filedialogchooser/impl/VFSJFileChooserBased.java | ||
---|---|---|
1 |
/* |
|
2 |
* To change this license header, choose License Headers in Project Properties. |
|
3 |
* To change this template file, choose Tools | Templates |
|
4 |
* and open the template in the editor. |
|
5 |
*/ |
|
6 |
package org.gvsig.filedialogchooser.impl; |
|
7 |
|
|
8 |
import com.googlecode.vfsjfilechooser2.VFSJFileChooser; |
|
9 |
import com.googlecode.vfsjfilechooser2.filechooser.AbstractVFSFileFilter; |
|
10 |
import java.awt.Component; |
|
11 |
import java.beans.PropertyChangeListener; |
|
12 |
import java.io.File; |
|
13 |
import javax.swing.JComponent; |
|
14 |
import javax.swing.filechooser.FileFilter; |
|
15 |
import org.apache.commons.vfs2.FileObject; |
|
16 |
import org.apache.commons.vfs2.provider.local.LocalFile; |
|
17 |
import org.gvsig.filedialogchooser.FileDialogChooser; |
|
18 |
import org.gvsig.filedialogchooser.FileDialogChooserManager; |
|
19 |
import org.gvsig.tools.util.ToolsUtilLocator; |
|
20 |
|
|
21 |
|
|
22 |
public class VFSJFileChooserBased implements FileDialogChooser { |
|
23 |
|
|
24 |
private static class FileFilterAdapter extends AbstractVFSFileFilter { |
|
25 |
|
|
26 |
private final FileFilter filter; |
|
27 |
|
|
28 |
FileFilterAdapter(FileFilter filter) { |
|
29 |
this.filter = filter; |
|
30 |
} |
|
31 |
|
|
32 |
@Override |
|
33 |
public boolean accept(FileObject f) { |
|
34 |
if( f instanceof LocalFile ) { |
|
35 |
return this.filter.accept( new File(f.getName().getPath())); |
|
36 |
} |
|
37 |
return false; |
|
38 |
} |
|
39 |
|
|
40 |
@Override |
|
41 |
public String getDescription() { |
|
42 |
return this.filter.getDescription(); |
|
43 |
} |
|
44 |
|
|
45 |
public FileFilter getFilter() { |
|
46 |
return this.filter; |
|
47 |
} |
|
48 |
} |
|
49 |
|
|
50 |
private final VFSJFileChooser jfc; |
|
51 |
private final String fileChooserID; |
|
52 |
|
|
53 |
public VFSJFileChooserBased(String fileChooserID) { |
|
54 |
super(); |
|
55 |
this.jfc = new VFSJFileChooser(); |
|
56 |
this.fileChooserID = fileChooserID; |
|
57 |
} |
|
58 |
|
|
59 |
@Override |
|
60 |
public void setCurrentDirectory(File dir) { |
|
61 |
if( dir == null ) { |
|
62 |
dir = new File(System.getProperty("user.home")); |
|
63 |
} |
|
64 |
this.jfc.setCurrentDirectory(dir); |
|
65 |
} |
|
66 |
|
|
67 |
@Override |
|
68 |
public File getCurrentDirectory() { |
|
69 |
return this.jfc.getCurrentDirectory(); |
|
70 |
} |
|
71 |
|
|
72 |
@Override |
|
73 |
public void setDialogTitle(String dialogTitle) { |
|
74 |
this.jfc.setDialogTitle(dialogTitle); |
|
75 |
} |
|
76 |
|
|
77 |
@Override |
|
78 |
public void setDialogType(int dialogType) { |
|
79 |
switch(dialogType) { |
|
80 |
default: |
|
81 |
case OPEN_DIALOG: |
|
82 |
this.jfc.setDialogType(VFSJFileChooser.DIALOG_TYPE.OPEN); |
|
83 |
break; |
|
84 |
case SAVE_DIALOG: |
|
85 |
this.jfc.setDialogType(VFSJFileChooser.DIALOG_TYPE.SAVE); |
|
86 |
break; |
|
87 |
} |
|
88 |
} |
|
89 |
|
|
90 |
@Override |
|
91 |
public void setDragEnabled(boolean b) { |
|
92 |
this.jfc.setDragEnabled(b); |
|
93 |
} |
|
94 |
|
|
95 |
@Override |
|
96 |
public void setFileFilter(FileFilter filter) { |
|
97 |
if( filter == null ) { |
|
98 |
this.jfc.setFileFilter(null); |
|
99 |
} else { |
|
100 |
this.jfc.setFileFilter(new FileFilterAdapter(filter)); |
|
101 |
} |
|
102 |
} |
|
103 |
|
|
104 |
@Override |
|
105 |
public FileFilter getFileFilter() { |
|
106 |
FileFilterAdapter f = (FileFilterAdapter) this.jfc.getFileFilter(); |
|
107 |
return f.getFilter(); |
|
108 |
} |
|
109 |
|
|
110 |
@Override |
|
111 |
public void setFileSelectionMode(int mode) { |
|
112 |
switch(mode) { |
|
113 |
case FILES_ONLY: |
|
114 |
this.jfc.setFileSelectionMode(VFSJFileChooser.SELECTION_MODE.FILES_ONLY); |
|
115 |
break; |
|
116 |
case DIRECTORIES_ONLY: |
|
117 |
this.jfc.setFileSelectionMode(VFSJFileChooser.SELECTION_MODE.DIRECTORIES_ONLY); |
|
118 |
break; |
|
119 |
default: |
|
120 |
case FILES_AND_DIRECTORIES: |
|
121 |
this.jfc.setFileSelectionMode(VFSJFileChooser.SELECTION_MODE.FILES_AND_DIRECTORIES); |
|
122 |
break; |
|
123 |
} |
|
124 |
} |
|
125 |
|
|
126 |
@Override |
|
127 |
public File getSelectedFile() { |
|
128 |
return this.jfc.getSelectedFile(); |
|
129 |
} |
|
130 |
|
|
131 |
@Override |
|
132 |
public File[] getSelectedFiles() { |
|
133 |
return this.jfc.getSelectedFiles(); |
|
134 |
} |
|
135 |
|
|
136 |
@Override |
|
137 |
public void setFileHidingEnabled(boolean b) { |
|
138 |
this.jfc.setFileHidingEnabled(b); |
|
139 |
} |
|
140 |
|
|
141 |
@Override |
|
142 |
public void setMultiSelectionEnabled(boolean b) { |
|
143 |
this.jfc.setMultiSelectionEnabled(b); |
|
144 |
} |
|
145 |
|
|
146 |
@Override |
|
147 |
public boolean isMultiSelectionEnabled() { |
|
148 |
return this.jfc.isMultiSelectionEnabled(); |
|
149 |
} |
|
150 |
|
|
151 |
@Override |
|
152 |
public int showOpenDialog(Component parent) { |
|
153 |
FileDialogChooserManager manager = ToolsUtilLocator.getFileDialogChooserManager(); |
|
154 |
File f = this.getCurrentDirectory(); |
|
155 |
if( f==null ) { |
|
156 |
f = manager.getLastPath(fileChooserID, null); |
|
157 |
this.jfc.setCurrentDirectory(f); |
|
158 |
} |
|
159 |
VFSJFileChooser.RETURN_TYPE r = this.jfc.showOpenDialog(parent); |
|
160 |
if( r == VFSJFileChooser.RETURN_TYPE.CANCEL ) { |
|
161 |
return CANCEL_OPTION; |
|
162 |
} |
|
163 |
if( r == VFSJFileChooser.RETURN_TYPE.APPROVE ) { |
|
164 |
manager.setLastPath(fileChooserID, this.getCurrentDirectory()); |
|
165 |
return APPROVE_OPTION; |
|
166 |
} |
|
167 |
if( r == VFSJFileChooser.RETURN_TYPE.ERROR ) { |
|
168 |
return ERROR_OPTION; |
|
169 |
} |
|
170 |
return ERROR_OPTION; |
|
171 |
} |
|
172 |
|
|
173 |
@Override |
|
174 |
public int showSaveDialog(Component parent) { |
|
175 |
FileDialogChooserManager manager = ToolsUtilLocator.getFileDialogChooserManager(); |
|
176 |
File f = manager.getLastPath(fileChooserID, this.getCurrentDirectory()); |
|
177 |
this.jfc.setCurrentDirectory(f); |
|
178 |
VFSJFileChooser.RETURN_TYPE r = this.jfc.showSaveDialog(parent); |
|
179 |
if( r == VFSJFileChooser.RETURN_TYPE.CANCEL ) { |
|
180 |
return CANCEL_OPTION; |
|
181 |
} |
|
182 |
if( r == VFSJFileChooser.RETURN_TYPE.APPROVE ) { |
|
183 |
manager.setLastPath(fileChooserID, this.getCurrentDirectory()); |
|
184 |
return APPROVE_OPTION; |
|
185 |
} |
|
186 |
if( r == VFSJFileChooser.RETURN_TYPE.ERROR ) { |
|
187 |
return ERROR_OPTION; |
|
188 |
} |
|
189 |
return ERROR_OPTION; |
|
190 |
} |
|
191 |
|
|
192 |
@Override |
|
193 |
public void setAcceptAllFileFilterUsed(boolean b) { |
|
194 |
this.jfc.setAcceptAllFileFilterUsed(b); |
|
195 |
} |
|
196 |
|
|
197 |
@Override |
|
198 |
public void addChoosableFileFilter(FileFilter next) { |
|
199 |
this.jfc.addChoosableFileFilter(new FileFilterAdapter(next)); |
|
200 |
} |
|
201 |
|
|
202 |
@Override |
|
203 |
public void addPropertyChangeListener(PropertyChangeListener listener) { |
|
204 |
this.jfc.addPropertyChangeListener(listener); |
|
205 |
} |
|
206 |
|
|
207 |
@Override |
|
208 |
public void setAccessory(JComponent newAccessory) { |
|
209 |
this.jfc.setAccessory(newAccessory); |
|
210 |
} |
|
211 |
|
|
212 |
} |
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.247/org.gvsig.tools.util/org.gvsig.tools.util.impl/src/main/java/org/gvsig/filedialogchooser/impl/JFileChooserBased.java | ||
---|---|---|
1 |
/* |
|
2 |
* To change this license header, choose License Headers in Project Properties. |
|
3 |
* To change this template file, choose Tools | Templates |
|
4 |
* and open the template in the editor. |
|
5 |
*/ |
|
6 |
package org.gvsig.filedialogchooser.impl; |
|
7 |
|
|
8 |
import java.awt.Component; |
|
9 |
import java.awt.HeadlessException; |
|
10 |
import java.io.File; |
|
11 |
import javax.swing.JFileChooser; |
|
12 |
import org.gvsig.filedialogchooser.FileDialogChooser; |
|
13 |
import org.gvsig.filedialogchooser.FileDialogChooserManager; |
|
14 |
import org.gvsig.tools.util.ToolsUtilLocator; |
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
public class JFileChooserBased extends JFileChooser implements FileDialogChooser { |
|
20 |
|
|
21 |
private static final long serialVersionUID = 2825200958209418322L; |
|
22 |
private final String fileChooserID; |
|
23 |
|
|
24 |
public JFileChooserBased(String fileChooserID) { |
|
25 |
super(); |
|
26 |
this.fileChooserID = fileChooserID; |
|
27 |
} |
|
28 |
|
|
29 |
@Override |
|
30 |
public int showOpenDialog(Component parent) throws HeadlessException { |
|
31 |
FileDialogChooserManager manager = ToolsUtilLocator.getFileDialogChooserManager(); |
|
32 |
File f = this.getCurrentDirectory(); |
|
33 |
if( f==null ) { |
|
34 |
f = manager.getLastPath(fileChooserID, null); |
|
35 |
super.setCurrentDirectory(f); |
|
36 |
} |
|
37 |
int r = super.showOpenDialog(parent); |
|
38 |
if( r == JFileChooser.APPROVE_OPTION ) { |
|
39 |
manager.setLastPath(fileChooserID, this.getCurrentDirectory()); |
|
40 |
} |
|
41 |
return r; |
|
42 |
} |
|
43 |
|
|
44 |
@Override |
|
45 |
public int showSaveDialog(Component parent) throws HeadlessException { |
|
46 |
FileDialogChooserManager manager = ToolsUtilLocator.getFileDialogChooserManager(); |
|
47 |
File f = manager.getLastPath(fileChooserID, this.getCurrentDirectory()); |
|
48 |
super.setCurrentDirectory(f); int r = super.showSaveDialog(parent); |
|
49 |
if( r == JFileChooser.APPROVE_OPTION ) { |
|
50 |
manager.setLastPath(fileChooserID, this.getCurrentDirectory()); |
|
51 |
} |
|
52 |
return r; |
|
53 |
} |
|
54 |
} |
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.247/org.gvsig.tools.util/org.gvsig.tools.util.impl/src/main/java/org/gvsig/webbrowser2/cssbox/CSSBoxWebBrowserManager.java | ||
---|---|---|
1 |
package org.gvsig.webbrowser2.cssbox; |
|
2 |
|
|
3 |
import org.gvsig.webbrowser2.WebBrowserManager; |
|
4 |
import org.gvsig.webbrowser2.WebBrowserPanel; |
|
5 |
|
|
6 |
/** |
|
7 |
* |
|
8 |
* @author gvSIG Team |
|
9 |
*/ |
|
10 |
public class CSSBoxWebBrowserManager implements WebBrowserManager { |
|
11 |
|
|
12 |
@Override |
|
13 |
public WebBrowserPanel createWebBrowserPanel() { |
|
14 |
// return new CSSBoxWebBrowserPanel(); |
|
15 |
return null; |
|
16 |
} |
|
17 |
|
|
18 |
|
|
19 |
} |
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.247/org.gvsig.tools.util/org.gvsig.tools.util.impl/src/main/java/org/gvsig/webbrowser2/cssbox/CSSBoxWebBrowserPanel.java | ||
---|---|---|
1 |
package org.gvsig.webbrowser2.cssbox; |
|
2 |
|
|
3 |
import javax.swing.JComponent; |
|
4 |
//import org.fit.cssbox.swingbox.BrowserPane; |
|
5 |
import org.gvsig.webbrowser2.WebBrowserPanel; |
|
6 |
import org.gvsig.webbrowser2.impl.DefaultWebBrowserPanel; |
|
7 |
|
|
8 |
public class CSSBoxWebBrowserPanel extends DefaultWebBrowserPanel implements WebBrowserPanel { |
|
9 |
|
|
10 |
public CSSBoxWebBrowserPanel() { |
|
11 |
|
|
12 |
} |
|
13 |
|
|
14 |
@Override |
|
15 |
protected JComponent createBrowserPanel() { |
|
16 |
// return new BrowserPane(); |
|
17 |
return null; |
|
18 |
} |
|
19 |
// |
|
20 |
// @Override |
|
21 |
// protected BrowserPane getBrowser() { |
|
22 |
// return (BrowserPane) super.getBrowser(); |
|
23 |
// } |
|
24 |
|
|
25 |
} |
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.247/org.gvsig.tools.util/org.gvsig.tools.util.impl/src/main/java/org/gvsig/webbrowser2/impl/DefaultWebBrowserPanelView.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<object classname="com.jeta.forms.store.memento.FormPackage"> |
|
4 |
<at name="fileversion"> |
|
5 |
<object classname="com.jeta.forms.store.memento.FormsVersion2"> |
|
6 |
<at name="major">2</at> |
|
7 |
<at name="minor">0</at> |
|
8 |
<at name="sub">0</at> |
|
9 |
</object> |
|
10 |
</at> |
|
11 |
<at name="form"> |
|
12 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
13 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
14 |
<at name="cellconstraints"> |
|
15 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
16 |
<at name="column">1</at> |
|
17 |
<at name="row">1</at> |
|
18 |
<at name="colspan">1</at> |
|
19 |
<at name="rowspan">1</at> |
|
20 |
<at name="halign">default</at> |
|
21 |
<at name="valign">default</at> |
|
22 |
<at name="insets" object="insets">0,0,0,0</at> |
|
23 |
</object> |
|
24 |
</at> |
|
25 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
|
26 |
</super> |
|
27 |
<at name="id">/home/jjdelcerro/gvSIG/plugins/org.gvsig.scripting.app.mainplugin/scripts/addons/ScriptingComposerTools/javadocviewer/webbrowserpanel/browserpanel.xml</at> |
|
28 |
<at name="path">addons/ScriptingComposerTools/javadocviewer/webbrowserpanel/browserpanel.xml</at> |
|
29 |
<at name="rowspecs">CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE</at> |
|
30 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE</at> |
|
31 |
<at name="components"> |
|
32 |
<object classname="java.util.LinkedList"> |
|
33 |
<item > |
|
34 |
<at name="value"> |
|
35 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
36 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
37 |
<at name="cellconstraints"> |
|
38 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
39 |
<at name="column">8</at> |
|
40 |
<at name="row">2</at> |
|
41 |
<at name="colspan">1</at> |
|
42 |
<at name="rowspan">1</at> |
|
43 |
<at name="halign">default</at> |
|
44 |
<at name="valign">default</at> |
|
45 |
<at name="insets" object="insets">0,0,0,0</at> |
|
46 |
</object> |
|
47 |
</at> |
|
48 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
49 |
</super> |
|
50 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
51 |
<at name="beanclass">javax.swing.JTextField</at> |
|
52 |
<at name="beanproperties"> |
|
53 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
54 |
<at name="classname">javax.swing.JTextField</at> |
|
55 |
<at name="properties"> |
|
56 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
57 |
<at name="border"> |
|
58 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
59 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
60 |
<at name="name">border</at> |
|
61 |
</super> |
|
62 |
<at name="borders"> |
|
63 |
<object classname="java.util.LinkedList"> |
|
64 |
<item > |
|
65 |
<at name="value"> |
|
66 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
67 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
68 |
<at name="name">border</at> |
|
69 |
</super> |
|
70 |
</object> |
|
71 |
</at> |
|
72 |
</item> |
|
73 |
</object> |
|
74 |
</at> |
|
75 |
</object> |
|
76 |
</at> |
|
77 |
<at name="name">txtURL</at> |
|
78 |
<at name="width">843</at> |
|
79 |
<at name="height">20</at> |
|
80 |
</object> |
|
81 |
</at> |
|
82 |
</object> |
|
83 |
</at> |
|
84 |
</object> |
|
85 |
</at> |
|
86 |
</item> |
|
87 |
<item > |
|
88 |
<at name="value"> |
|
89 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
90 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
91 |
<at name="cellconstraints"> |
|
92 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
93 |
<at name="column">2</at> |
|
94 |
<at name="row">4</at> |
|
95 |
<at name="colspan">9</at> |
|
96 |
<at name="rowspan">1</at> |
|
97 |
<at name="halign">fill</at> |
|
98 |
<at name="valign">fill</at> |
|
99 |
<at name="insets" object="insets">0,0,0,0</at> |
|
100 |
</object> |
|
101 |
</at> |
|
102 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
103 |
</super> |
|
104 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
105 |
<at name="beanclass">javax.swing.JPanel</at> |
|
106 |
<at name="beanproperties"> |
|
107 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
108 |
<at name="classname">javax.swing.JPanel</at> |
|
109 |
<at name="properties"> |
|
110 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
111 |
<at name="name">containerBrowser</at> |
|
112 |
<at name="width">935</at> |
|
113 |
<at name="height">466</at> |
|
114 |
</object> |
|
115 |
</at> |
|
116 |
</object> |
|
117 |
</at> |
|
118 |
</object> |
|
119 |
</at> |
|
120 |
</item> |
|
121 |
<item > |
|
122 |
<at name="value"> |
|
123 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
124 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
125 |
<at name="cellconstraints"> |
|
126 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
127 |
<at name="column">2</at> |
|
128 |
<at name="row">6</at> |
|
129 |
<at name="colspan">9</at> |
|
130 |
<at name="rowspan">1</at> |
|
131 |
<at name="halign">default</at> |
|
132 |
<at name="valign">default</at> |
|
133 |
<at name="insets" object="insets">0,0,0,0</at> |
|
134 |
</object> |
|
135 |
</at> |
|
136 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
|
137 |
</super> |
|
138 |
<at name="id">embedded.1838006420</at> |
|
139 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
|
140 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MIN(12DLU;DEFAULT):GROW(0.3),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(0.7)</at> |
|
141 |
<at name="components"> |
|
142 |
<object classname="java.util.LinkedList"> |
|
143 |
<item > |
|
144 |
<at name="value"> |
|
145 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
146 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
147 |
<at name="cellconstraints"> |
|
148 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
149 |
<at name="column">3</at> |
|
150 |
<at name="row">1</at> |
|
151 |
<at name="colspan">1</at> |
|
152 |
<at name="rowspan">1</at> |
|
153 |
<at name="halign">default</at> |
|
154 |
<at name="valign">default</at> |
|
155 |
<at name="insets" object="insets">0,0,0,0</at> |
|
156 |
</object> |
|
157 |
</at> |
|
158 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
159 |
</super> |
|
160 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
161 |
<at name="beanclass">javax.swing.JTextField</at> |
|
162 |
<at name="beanproperties"> |
|
163 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
164 |
<at name="classname">javax.swing.JTextField</at> |
|
165 |
<at name="properties"> |
|
166 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
167 |
<at name="border"> |
|
168 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
169 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
170 |
<at name="name">border</at> |
|
171 |
</super> |
|
172 |
<at name="borders"> |
|
173 |
<object classname="java.util.LinkedList"> |
|
174 |
<item > |
|
175 |
<at name="value"> |
|
176 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
177 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
178 |
<at name="name">border</at> |
|
179 |
</super> |
|
180 |
</object> |
|
181 |
</at> |
|
182 |
</item> |
|
183 |
</object> |
|
184 |
</at> |
|
185 |
</object> |
|
186 |
</at> |
|
187 |
<at name="name">txtSearch</at> |
|
188 |
<at name="width">259</at> |
|
189 |
<at name="height">20</at> |
|
190 |
</object> |
|
191 |
</at> |
|
192 |
</object> |
|
193 |
</at> |
|
194 |
</object> |
|
195 |
</at> |
|
196 |
</item> |
|
197 |
<item > |
|
198 |
<at name="value"> |
|
199 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
200 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
201 |
<at name="cellconstraints"> |
|
202 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
203 |
<at name="column">9</at> |
|
204 |
<at name="row">1</at> |
|
205 |
<at name="colspan">1</at> |
|
206 |
<at name="rowspan">1</at> |
|
207 |
<at name="halign">fill</at> |
|
208 |
<at name="valign">fill</at> |
|
209 |
<at name="insets" object="insets">0,0,0,0</at> |
|
210 |
</object> |
|
211 |
</at> |
|
212 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
213 |
</super> |
|
214 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
215 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
216 |
<at name="beanproperties"> |
|
217 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
218 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
219 |
<at name="properties"> |
|
220 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
221 |
<at name="border"> |
|
222 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
223 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
224 |
<at name="name">border</at> |
|
225 |
</super> |
|
226 |
<at name="borders"> |
|
227 |
<object classname="java.util.LinkedList"> |
|
228 |
<item > |
|
229 |
<at name="value"> |
|
230 |
<object classname="com.jeta.forms.store.properties.LineBorderProperty"> |
|
231 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
232 |
<at name="name">border</at> |
|
233 |
</super> |
|
234 |
<at name="thickness">1</at> |
|
235 |
<at name="color"> |
|
236 |
<object classname="com.jeta.forms.store.properties.ColorProperty"> |
|
237 |
<at name="name">dyncolor</at> |
|
238 |
<at name="colorkey">Button.shadow</at> |
|
239 |
</object> |
|
240 |
</at> |
|
241 |
<at name="curved">false</at> |
|
242 |
</object> |
|
243 |
</at> |
|
244 |
</item> |
|
245 |
<item > |
|
246 |
<at name="value"> |
|
247 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
248 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
249 |
<at name="name">border</at> |
|
250 |
</super> |
|
251 |
</object> |
|
252 |
</at> |
|
253 |
</item> |
|
254 |
</object> |
|
255 |
</at> |
|
256 |
</object> |
|
257 |
</at> |
|
258 |
<at name="name">lblStatus</at> |
|
259 |
<at name="width">587</at> |
|
260 |
<at name="fill"> |
|
261 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
262 |
<at name="name">fill</at> |
|
263 |
</object> |
|
264 |
</at> |
|
265 |
<at name="height">20</at> |
|
266 |
</object> |
|
267 |
</at> |
|
268 |
</object> |
|
269 |
</at> |
|
270 |
</object> |
|
271 |
</at> |
|
272 |
</item> |
|
273 |
<item > |
|
274 |
<at name="value"> |
|
275 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
276 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
277 |
<at name="cellconstraints"> |
|
278 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
279 |
<at name="column">1</at> |
|
280 |
<at name="row">1</at> |
|
281 |
<at name="colspan">1</at> |
|
282 |
<at name="rowspan">1</at> |
|
283 |
<at name="halign">default</at> |
|
284 |
<at name="valign">default</at> |
|
285 |
<at name="insets" object="insets">0,0,0,0</at> |
|
286 |
</object> |
|
287 |
</at> |
|
288 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
289 |
</super> |
|
290 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
291 |
<at name="beanclass">com.jeta.forms.components.image.ImageComponent</at> |
|
292 |
<at name="beanproperties"> |
|
293 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
294 |
<at name="classname">com.jeta.forms.components.image.ImageComponent</at> |
|
295 |
<at name="properties"> |
|
296 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
297 |
<at name="border"> |
|
298 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
299 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
300 |
<at name="name">border</at> |
|
301 |
</super> |
|
302 |
<at name="borders"> |
|
303 |
<object classname="java.util.LinkedList"> |
|
304 |
<item > |
|
305 |
<at name="value"> |
|
306 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
307 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
308 |
<at name="name">border</at> |
|
309 |
</super> |
|
310 |
</object> |
|
311 |
</at> |
|
312 |
</item> |
|
313 |
</object> |
|
314 |
</at> |
|
315 |
</object> |
|
316 |
</at> |
|
317 |
<at name="name">imgSearch</at> |
|
318 |
<at name="width">16</at> |
|
319 |
<at name="height">16</at> |
|
320 |
</object> |
|
321 |
</at> |
|
322 |
</object> |
|
323 |
</at> |
|
324 |
</object> |
|
325 |
</at> |
|
326 |
</item> |
|
327 |
<item > |
|
328 |
<at name="value"> |
|
329 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
330 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
331 |
<at name="cellconstraints"> |
|
332 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
333 |
<at name="column">5</at> |
|
334 |
<at name="row">1</at> |
|
335 |
<at name="colspan">1</at> |
|
336 |
<at name="rowspan">1</at> |
|
337 |
<at name="halign">default</at> |
|
338 |
<at name="valign">default</at> |
|
339 |
<at name="insets" object="insets">0,0,0,0</at> |
|
340 |
</object> |
|
341 |
</at> |
|
342 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
343 |
</super> |
|
344 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
345 |
<at name="beanclass">javax.swing.JButton</at> |
|
346 |
<at name="beanproperties"> |
|
347 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
348 |
<at name="classname">javax.swing.JButton</at> |
|
349 |
<at name="properties"> |
|
350 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
351 |
<at name="border"> |
|
352 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
353 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
354 |
<at name="name">border</at> |
|
355 |
</super> |
|
356 |
<at name="borders"> |
|
357 |
<object classname="java.util.LinkedList"> |
|
358 |
<item > |
|
359 |
<at name="value"> |
|
360 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
361 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
362 |
<at name="name">border</at> |
|
363 |
</super> |
|
364 |
<at name="top">0</at> |
|
365 |
<at name="left">0</at> |
|
366 |
<at name="bottom">0</at> |
|
367 |
<at name="right">0</at> |
|
368 |
</object> |
|
369 |
</at> |
|
370 |
</item> |
|
371 |
</object> |
|
372 |
</at> |
|
373 |
</object> |
|
374 |
</at> |
|
375 |
<at name="name">btnSearchNext</at> |
|
376 |
<at name="width">12</at> |
|
377 |
<at name="height">12</at> |
|
378 |
</object> |
|
379 |
</at> |
|
380 |
</object> |
|
381 |
</at> |
|
382 |
</object> |
|
383 |
</at> |
|
384 |
</item> |
|
385 |
<item > |
|
386 |
<at name="value"> |
|
387 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
388 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
389 |
<at name="cellconstraints"> |
|
390 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
391 |
<at name="column">7</at> |
|
392 |
<at name="row">1</at> |
|
393 |
<at name="colspan">1</at> |
|
394 |
<at name="rowspan">1</at> |
|
395 |
<at name="halign">default</at> |
|
396 |
<at name="valign">default</at> |
|
397 |
<at name="insets" object="insets">0,0,0,0</at> |
|
398 |
</object> |
|
399 |
</at> |
|
400 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
401 |
</super> |
|
402 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
403 |
<at name="beanclass">javax.swing.JButton</at> |
|
404 |
<at name="beanproperties"> |
|
405 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
406 |
<at name="classname">javax.swing.JButton</at> |
|
407 |
<at name="properties"> |
|
408 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
409 |
<at name="border"> |
|
410 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
411 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
412 |
<at name="name">border</at> |
|
413 |
</super> |
|
414 |
<at name="borders"> |
|
415 |
<object classname="java.util.LinkedList"> |
|
416 |
<item > |
|
417 |
<at name="value"> |
|
418 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
419 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
420 |
<at name="name">border</at> |
|
421 |
</super> |
|
422 |
<at name="top">0</at> |
|
423 |
<at name="left">0</at> |
|
424 |
<at name="bottom">0</at> |
|
425 |
<at name="right">0</at> |
|
426 |
</object> |
|
427 |
</at> |
|
428 |
</item> |
|
429 |
</object> |
|
430 |
</at> |
|
431 |
</object> |
|
432 |
</at> |
|
433 |
<at name="name">btnSearchPrevious</at> |
|
434 |
<at name="width">12</at> |
|
435 |
<at name="height">12</at> |
|
436 |
</object> |
|
437 |
</at> |
|
438 |
</object> |
|
439 |
</at> |
|
440 |
</object> |
|
441 |
</at> |
|
442 |
</item> |
|
443 |
</object> |
|
444 |
</at> |
|
445 |
<at name="properties"> |
|
446 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
447 |
<at name="classname">com.jeta.forms.gui.form.GridView</at> |
|
448 |
<at name="properties"> |
|
449 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
450 |
<at name="border"> |
|
451 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
452 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
453 |
<at name="name">border</at> |
|
454 |
</super> |
|
455 |
<at name="borders"> |
|
456 |
<object classname="java.util.LinkedList"/> |
|
457 |
</at> |
|
458 |
</object> |
|
459 |
</at> |
|
460 |
<at name="name"/> |
|
461 |
<at name="fill"> |
|
462 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
463 |
<at name="name">fill</at> |
|
464 |
</object> |
|
465 |
</at> |
|
466 |
<at name="scollBars"> |
|
467 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
468 |
<at name="name">scollBars</at> |
|
469 |
<at name="verticalpolicy">21</at> |
|
470 |
<at name="horizontalpolicy">31</at> |
|
471 |
<at name="border"> |
|
472 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
473 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
474 |
<at name="name">border</at> |
|
475 |
</super> |
|
476 |
<at name="borders"> |
|
477 |
<object classname="java.util.LinkedList"> |
|
478 |
<item > |
|
479 |
<at name="value"> |
|
480 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
481 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
482 |
<at name="name">border</at> |
|
483 |
</super> |
|
484 |
</object> |
|
485 |
</at> |
|
486 |
</item> |
|
487 |
</object> |
|
488 |
</at> |
|
489 |
</object> |
|
490 |
</at> |
|
491 |
</object> |
|
492 |
</at> |
|
493 |
</object> |
|
494 |
</at> |
|
495 |
</object> |
|
496 |
</at> |
|
497 |
<at name="cellpainters"> |
|
498 |
<object classname="com.jeta.forms.store.support.Matrix"> |
|
499 |
<at name="rows"> |
|
500 |
<object classname="[Ljava.lang.Object;" size="1"> |
|
501 |
<at name="item" index="0"> |
|
502 |
<object classname="[Ljava.lang.Object;" size="9"/> |
|
503 |
</at> |
|
504 |
</object> |
|
505 |
</at> |
|
506 |
</object> |
|
507 |
</at> |
|
508 |
<at name="rowgroups"> |
|
509 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
510 |
<at name="groups"> |
|
511 |
<object classname="java.util.HashMap"/> |
|
512 |
</at> |
|
513 |
</object> |
|
514 |
</at> |
|
515 |
<at name="colgroups"> |
|
516 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
517 |
<at name="groups"> |
|
518 |
<object classname="java.util.HashMap"/> |
|
519 |
</at> |
|
520 |
</object> |
|
521 |
</at> |
|
522 |
</object> |
|
523 |
</at> |
|
524 |
</item> |
|
525 |
<item > |
|
526 |
<at name="value"> |
|
527 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
528 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
529 |
<at name="cellconstraints"> |
|
530 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
531 |
<at name="column">2</at> |
|
532 |
<at name="row">2</at> |
|
533 |
<at name="colspan">1</at> |
|
534 |
<at name="rowspan">1</at> |
|
535 |
<at name="halign">fill</at> |
|
536 |
<at name="valign">fill</at> |
|
537 |
<at name="insets" object="insets">0,0,0,0</at> |
|
538 |
</object> |
|
539 |
</at> |
|
540 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
541 |
</super> |
|
542 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
543 |
<at name="beanclass">javax.swing.JButton</at> |
|
544 |
<at name="beanproperties"> |
|
545 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
546 |
<at name="classname">javax.swing.JButton</at> |
|
547 |
<at name="properties"> |
|
548 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
549 |
<at name="border"> |
|
550 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
551 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
552 |
<at name="name">border</at> |
|
553 |
</super> |
|
554 |
<at name="borders"> |
|
555 |
<object classname="java.util.LinkedList"> |
|
556 |
<item > |
|
557 |
<at name="value"> |
|
558 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
559 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
560 |
<at name="name">border</at> |
|
561 |
</super> |
|
562 |
<at name="top">0</at> |
|
563 |
<at name="left">0</at> |
|
564 |
<at name="bottom">0</at> |
|
565 |
<at name="right">0</at> |
|
566 |
</object> |
|
567 |
</at> |
|
568 |
</item> |
|
569 |
</object> |
|
570 |
</at> |
|
571 |
</object> |
|
572 |
</at> |
|
573 |
<at name="name">btnPrevious</at> |
|
574 |
<at name="width">12</at> |
|
575 |
<at name="height">20</at> |
|
576 |
</object> |
|
577 |
</at> |
|
578 |
</object> |
|
579 |
</at> |
|
580 |
</object> |
|
581 |
</at> |
|
582 |
</item> |
Also available in: Unified diff