Revision 3083
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.373/org.gvsig.tools.util/org.gvsig.tools.util.impl/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/xsd/maven-4.0.0.xsd"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<parent> |
|
4 |
<groupId>org.gvsig</groupId> |
|
5 |
<artifactId>org.gvsig.tools.util</artifactId> |
|
6 |
<version>3.0.373</version> |
|
7 |
</parent> |
|
8 |
<groupId>org.gvsig</groupId> |
|
9 |
<artifactId>org.gvsig.tools.util.impl</artifactId> |
|
10 |
<name>org.gvsig.tools.util.impl</name> |
|
11 |
<dependencies> |
|
12 |
<dependency> |
|
13 |
<groupId>org.apache.commons</groupId> |
|
14 |
<artifactId>commons-lang3</artifactId> |
|
15 |
</dependency> |
|
16 |
|
|
17 |
<dependency> |
|
18 |
<groupId>org.apache.commons</groupId> |
|
19 |
<artifactId>commons-collections4</artifactId> |
|
20 |
</dependency> |
|
21 |
|
|
22 |
<dependency> |
|
23 |
<groupId>org.gvsig</groupId> |
|
24 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
25 |
</dependency> |
|
26 |
<dependency> |
|
27 |
<groupId>org.gvsig</groupId> |
|
28 |
<artifactId>org.gvsig.tools.util.api</artifactId> |
|
29 |
<scope>compile</scope> |
|
30 |
</dependency> |
|
31 |
<dependency> |
|
32 |
<groupId>com.github.fracpete</groupId> |
|
33 |
<artifactId>vfsjfilechooser2</artifactId> |
|
34 |
<scope>compile</scope> |
|
35 |
</dependency> |
|
36 |
<dependency> |
|
37 |
<groupId>org.apache.httpcomponents</groupId> |
|
38 |
<artifactId>httpcore-nio</artifactId> |
|
39 |
<scope>compile</scope> |
|
40 |
</dependency> |
|
41 |
<dependency> |
|
42 |
<groupId>org.apache.httpcomponents</groupId> |
|
43 |
<artifactId>httpcore</artifactId> |
|
44 |
<scope>compile</scope> |
|
45 |
</dependency> |
|
46 |
<dependency> |
|
47 |
<groupId>com.jgoodies</groupId> |
|
48 |
<artifactId>jgoodies-forms</artifactId> |
|
49 |
<scope>compile</scope> |
|
50 |
</dependency> |
|
51 |
<dependency> |
|
52 |
<groupId>com.jayway.jsonpath</groupId> |
|
53 |
<artifactId>json-path</artifactId> |
|
54 |
<version>2.4.0</version> |
|
55 |
<scope>compile</scope> |
|
56 |
</dependency> |
|
57 |
<!-- <dependency> |
|
58 |
<groupId>net.sf.cssbox</groupId> |
|
59 |
<artifactId>swingbox</artifactId> |
|
60 |
<version>1.1</version> |
|
61 |
<type>jar</type> |
|
62 |
</dependency>--> |
|
63 |
<dependency> |
|
64 |
<groupId>org.apache.httpcomponents</groupId> |
|
65 |
<artifactId>httpclient</artifactId> |
|
66 |
<scope>compile</scope> |
|
67 |
</dependency> |
|
68 |
<dependency> |
|
69 |
<groupId>org.apache.commons</groupId> |
|
70 |
<artifactId>commons-collections4</artifactId> |
|
71 |
<scope>compile</scope> |
|
72 |
</dependency> |
|
73 |
<dependency> |
|
74 |
<groupId>net.sf.cssbox</groupId> |
|
75 |
<artifactId>swingbox</artifactId> |
|
76 |
<version>1.1</version> |
|
77 |
<scope>compile</scope> |
|
78 |
</dependency> |
|
79 |
</dependencies> |
|
80 |
</project> |
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.373/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.373/org.gvsig.tools.util/org.gvsig.tools.util.impl/src/main/java/org/gvsig/configurableactions/ActionsControllerImpl.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.ArrayList; |
|
9 |
import java.util.Collection; |
|
10 |
import javax.swing.AbstractAction; |
|
11 |
import javax.swing.AbstractButton; |
|
12 |
import javax.swing.Action; |
|
13 |
import javax.swing.ImageIcon; |
|
14 |
import javax.swing.JComponent; |
|
15 |
import javax.swing.JLabel; |
|
16 |
import javax.swing.JMenuItem; |
|
17 |
import javax.swing.JPopupMenu; |
|
18 |
import org.apache.commons.collections4.CollectionUtils; |
|
19 |
import org.gvsig.configurableactions.ConfigurableActionsMamager.ActionsController; |
|
20 |
import org.gvsig.tools.ToolsLocator; |
|
21 |
import org.gvsig.tools.i18n.I18nManager; |
|
22 |
import org.gvsig.tools.swing.api.SupportIsEnable; |
|
23 |
import org.gvsig.tools.swing.api.SupportIsVisible; |
|
24 |
|
|
25 |
|
|
26 |
public class ActionsControllerImpl implements ActionsController { |
|
27 |
|
|
28 |
private final JComponent component; |
|
29 |
private final Object source; |
|
30 |
private Collection<Action> actions; |
|
31 |
|
|
32 |
|
|
33 |
private class ActionListenerAdapter extends AbstractAction { |
|
34 |
|
|
35 |
private final Action action; |
|
36 |
|
|
37 |
public ActionListenerAdapter(Action action) { |
|
38 |
this.action = action; |
|
39 |
} |
|
40 |
|
|
41 |
@Override |
|
42 |
public void actionPerformed(ActionEvent e) { |
|
43 |
e.setSource(source); |
|
44 |
action.actionPerformed(e); |
|
45 |
} |
|
46 |
|
|
47 |
@Override |
|
48 |
public Object getValue(String key) { |
|
49 |
return action.getValue(key); |
|
50 |
} |
|
51 |
|
|
52 |
@Override |
|
53 |
public void putValue(String key, Object newValue) { |
|
54 |
action.putValue(key, newValue); |
|
55 |
} |
|
56 |
|
|
57 |
@Override |
|
58 |
public boolean isEnabled() { |
|
59 |
return action.isEnabled(); |
|
60 |
} |
|
61 |
|
|
62 |
@Override |
|
63 |
public void setEnabled(boolean newValue) { |
|
64 |
action.setEnabled(newValue); |
|
65 |
} |
|
66 |
} |
|
67 |
|
|
68 |
@SuppressWarnings("OverridableMethodCallInConstructor") |
|
69 |
public ActionsControllerImpl(Collection<Action> actions, Object source, JComponent component) { |
|
70 |
this.component = component; |
|
71 |
this.source = source; |
|
72 |
this.update(actions); |
|
73 |
this.initComponent(); |
|
74 |
} |
|
75 |
|
|
76 |
private void initComponent() { |
|
77 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
78 |
this.component.setToolTipText(i18n.getTranslation("_Click_to_see_more_action_in_this_panel")); |
|
79 |
URL url = this.getClass().getResource("/org/gvsig/configurableactions/images/configurableactions.png"); |
|
80 |
if( component instanceof AbstractButton ) { |
|
81 |
AbstractButton comp = (AbstractButton) this.component; |
|
82 |
if( comp.getText().equals("...") ) { |
|
83 |
comp.setText(""); |
|
84 |
} |
|
85 |
comp.setIcon(new ImageIcon(url)); |
|
86 |
} else if( component instanceof JLabel ) { |
|
87 |
JLabel comp = (JLabel) this.component; |
|
88 |
if( comp.getText().equals("...") ) { |
|
89 |
comp.setText(""); |
|
90 |
} |
|
91 |
comp.setIcon(new ImageIcon(url)); |
|
92 |
} |
|
93 |
this.component.setBorder(null); |
|
94 |
this.component.addMouseListener(new MouseAdapter() { |
|
95 |
@Override |
|
96 |
public void mouseClicked(MouseEvent e) { |
|
97 |
if( e.getClickCount()==1 && e.getButton()==MouseEvent.BUTTON1 ) { |
|
98 |
doShowMenu(); |
|
99 |
} |
|
100 |
} |
|
101 |
}); |
|
102 |
// this.addActionListener(new ActionListener() { |
|
103 |
// @Override |
|
104 |
// public void actionPerformed(ActionEvent e) { |
|
105 |
// doShowMenu(); |
|
106 |
// } |
|
107 |
// }); |
|
108 |
} |
|
109 |
|
|
110 |
@Override |
|
111 |
public void update(Collection<Action> actions) { |
|
112 |
this.actions = actions; |
|
113 |
if( actions==null || actions.isEmpty() ) { |
|
114 |
this.component.setVisible(false); |
|
115 |
} else { |
|
116 |
this.component.setVisible(true); |
|
117 |
} |
|
118 |
} |
|
119 |
|
|
120 |
@Override |
|
121 |
public Collection<Action> getActions() { |
|
122 |
return this.actions; |
|
123 |
} |
|
124 |
|
|
125 |
@Override |
|
126 |
public JComponent getComponent() { |
|
127 |
return component; |
|
128 |
} |
|
129 |
|
|
130 |
@Override |
|
131 |
public Object getSource() { |
|
132 |
return source; |
|
133 |
} |
|
134 |
|
|
135 |
@Override |
|
136 |
public void addAction(Action action) { |
|
137 |
Collection<Action> theActions = new ArrayList<>(); |
|
138 |
if( CollectionUtils.isNotEmpty(this.actions) ) { |
|
139 |
theActions.addAll(this.actions); |
|
140 |
} |
|
141 |
theActions.add(action); |
|
142 |
this.actions = theActions; |
|
143 |
} |
|
144 |
|
|
145 |
private void doShowMenu() { |
|
146 |
JPopupMenu menu = new JPopupMenu(); |
|
147 |
SupportIsVisible visible = null; |
|
148 |
if( this.source instanceof SupportIsVisible ) { |
|
149 |
visible = (SupportIsVisible) this.source; |
|
150 |
} |
|
151 |
SupportIsEnable enabled = null; |
|
152 |
if( this.source instanceof SupportIsEnable ) { |
|
153 |
enabled = (SupportIsEnable) this.source; |
|
154 |
} |
|
155 |
for (Action action : actions) { |
|
156 |
if( visible==null || visible.isVisible(action) ) { |
|
157 |
JMenuItem item = new JMenuItem(new ActionListenerAdapter(action)); |
|
158 |
if( enabled!=null && !enabled.isEnabled(action)) { |
|
159 |
item.setEnabled(false); |
|
160 |
} |
|
161 |
menu.add(item); |
|
162 |
} |
|
163 |
} |
|
164 |
menu.show(this.component, 0,this.component.getHeight()); |
|
165 |
} |
|
166 |
} |
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.373/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 javax.swing.JLabel; |
|
13 |
import org.apache.commons.lang3.StringUtils; |
|
14 |
|
|
15 |
|
|
16 |
public class DefaultConfigurableActionsMamager implements ConfigurableActionsMamager { |
|
17 |
|
|
18 |
private class PanelActions { |
|
19 |
List<Action> actions; |
|
20 |
WeakReference<ActionsControllerImpl> controller; |
|
21 |
private final String panelid; |
|
22 |
|
|
23 |
public PanelActions(String panelid) { |
|
24 |
this.panelid = panelid; |
|
25 |
this.actions = new ArrayList<>(); |
|
26 |
} |
|
27 |
|
|
28 |
public void setController(ActionsControllerImpl controller) { |
|
29 |
this.controller = new WeakReference<>(controller); |
|
30 |
} |
|
31 |
|
|
32 |
public ActionsControllerImpl getController() { |
|
33 |
if( this.controller == null ) { |
|
34 |
return null; |
|
35 |
} |
|
36 |
ActionsControllerImpl theController = this.controller.get(); |
|
37 |
return theController; |
|
38 |
} |
|
39 |
|
|
40 |
public void updateComponent() { |
|
41 |
ActionsControllerImpl theController = this.getController(); |
|
42 |
if( theController == null ) { |
|
43 |
return; |
|
44 |
} |
|
45 |
theController.update(actions); |
|
46 |
} |
|
47 |
|
|
48 |
public int size() { |
|
49 |
return this.actions.size(); |
|
50 |
} |
|
51 |
|
|
52 |
public Action get(int i) { |
|
53 |
return this.actions.get(i); |
|
54 |
} |
|
55 |
|
|
56 |
public void set(int i, Action action) { |
|
57 |
this.actions.set(i, action); |
|
58 |
this.updateComponent(); |
|
59 |
} |
|
60 |
|
|
61 |
public void add(Action action) { |
|
62 |
this.actions.add(action); |
|
63 |
this.updateComponent(); |
|
64 |
} |
|
65 |
|
|
66 |
public void remove(int i) { |
|
67 |
this.actions.remove(i); |
|
68 |
this.updateComponent(); |
|
69 |
} |
|
70 |
|
|
71 |
public Collection<Action> getActions() { |
|
72 |
return this.actions; |
|
73 |
} |
|
74 |
|
|
75 |
private void removeAll() { |
|
76 |
this.actions.clear(); |
|
77 |
this.updateComponent(); |
|
78 |
} |
|
79 |
|
|
80 |
} |
|
81 |
|
|
82 |
private final Map<String,PanelActions> panelsActions; |
|
83 |
|
|
84 |
|
|
85 |
public DefaultConfigurableActionsMamager() { |
|
86 |
this.panelsActions = new HashMap<>(); |
|
87 |
} |
|
88 |
|
|
89 |
@Override |
|
90 |
public void addConfigurableAction(String panelid, Action action) { |
|
91 |
PanelActions panelActions = this.panelsActions.get(panelid); |
|
92 |
if( panelActions==null ) { |
|
93 |
panelActions = new PanelActions(panelid); |
|
94 |
this.panelsActions.put(panelid, panelActions); |
|
95 |
} |
|
96 |
for( int i=0; i<panelActions.size(); i++ ) { |
|
97 |
Action currentAction = panelActions.get(i); |
|
98 |
if( StringUtils.equalsIgnoreCase( |
|
99 |
(String)currentAction.getValue(Action.ACTION_COMMAND_KEY), |
|
100 |
(String)action.getValue(Action.ACTION_COMMAND_KEY) ) ) { |
|
101 |
panelActions.set(i, action); |
|
102 |
return; |
|
103 |
} |
|
104 |
} |
|
105 |
panelActions.add(action); |
|
106 |
} |
|
107 |
|
|
108 |
@Override |
|
109 |
public void removeConfigurableAction(String panelid, String actionName) { |
|
110 |
PanelActions panelActions = this.panelsActions.get(panelid); |
|
111 |
if( panelActions==null ) { |
|
112 |
return; |
|
113 |
} |
|
114 |
for( int i=0; i<panelActions.size(); i++ ) { |
|
115 |
Action currentAction = panelActions.get(i); |
|
116 |
if( StringUtils.equalsIgnoreCase( |
|
117 |
(String)currentAction.getValue(Action.ACTION_COMMAND_KEY), |
|
118 |
actionName ) ) { |
|
119 |
panelActions.remove(i); |
|
120 |
return; |
|
121 |
} |
|
122 |
} |
|
123 |
} |
|
124 |
|
|
125 |
@Override |
|
126 |
public void removeAllConfigurableActions(String panelid) { |
|
127 |
PanelActions panelActions = this.panelsActions.get(panelid); |
|
128 |
if( panelActions==null ) { |
|
129 |
return; |
|
130 |
} |
|
131 |
panelActions.removeAll(); |
|
132 |
} |
|
133 |
|
|
134 |
@Override |
|
135 |
public Collection<Action> getConfigurableActions(String panelid) { |
|
136 |
PanelActions panelActions = this.panelsActions.get(panelid); |
|
137 |
if( panelActions==null ) { |
|
138 |
panelActions = new PanelActions(panelid); |
|
139 |
this.panelsActions.put(panelid, panelActions); |
|
140 |
} |
|
141 |
return panelActions.getActions(); |
|
142 |
} |
|
143 |
|
|
144 |
@Override |
|
145 |
public JComponent getConfigurableActionsComponent(String panelid, Object source) { |
|
146 |
PanelActions panelActions = this.panelsActions.get(panelid); |
|
147 |
if( panelActions==null ) { |
|
148 |
panelActions = new PanelActions(panelid); |
|
149 |
this.panelsActions.put(panelid, panelActions); |
|
150 |
} |
|
151 |
JComponent component = new JLabel(); |
|
152 |
ActionsControllerImpl controller = new ActionsControllerImpl(panelActions.getActions(), source, component); |
|
153 |
panelActions.setController(controller); |
|
154 |
return component; |
|
155 |
} |
|
156 |
|
|
157 |
@Override |
|
158 |
public ActionsController getConfigurableActionsController(String panelid) { |
|
159 |
PanelActions panelActions = this.panelsActions.get(panelid); |
|
160 |
if( panelActions==null ) { |
|
161 |
return null; |
|
162 |
} |
|
163 |
return panelActions.getController(); |
|
164 |
} |
|
165 |
|
|
166 |
@Override |
|
167 |
public void addConfigurableActions(String panelid, Object source, JComponent component) { |
|
168 |
PanelActions panelActions = this.panelsActions.get(panelid); |
|
169 |
if( panelActions==null ) { |
|
170 |
panelActions = new PanelActions(panelid); |
|
171 |
this.panelsActions.put(panelid, panelActions); |
|
172 |
} |
|
173 |
ActionsControllerImpl controller = new ActionsControllerImpl(panelActions.getActions(), source, component); |
|
174 |
panelActions.setController(controller); |
|
175 |
} |
|
176 |
} |
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.373/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.373/org.gvsig.tools.util/org.gvsig.tools.util.impl/src/main/java/org/gvsig/webbrowser/cssbox/CSSBoxWebBrowserManager.java | ||
---|---|---|
1 |
package org.gvsig.webbrowser.cssbox; |
|
2 |
|
|
3 |
import org.gvsig.webbrowser.WebBrowserManager; |
|
4 |
import org.gvsig.webbrowser.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 |
} |
|
16 |
|
|
17 |
|
|
18 |
} |
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.373/org.gvsig.tools.util/org.gvsig.tools.util.impl/src/main/java/org/gvsig/webbrowser/cssbox/CSSBoxWebBrowserPanel.java | ||
---|---|---|
1 |
package org.gvsig.webbrowser.cssbox; |
|
2 |
|
|
3 |
import java.io.IOException; |
|
4 |
import java.net.URL; |
|
5 |
import javax.swing.JComponent; |
|
6 |
import javax.swing.JEditorPane; |
|
7 |
import javax.swing.text.EditorKit; |
|
8 |
import org.fit.cssbox.swingbox.BrowserPane; |
|
9 |
import org.fit.cssbox.swingbox.SwingBoxEditorKit; |
|
10 |
import org.fit.cssbox.swingbox.util.CSSBoxAnalyzer; |
|
11 |
import org.gvsig.webbrowser.WebBrowserPanel; |
|
12 |
import org.gvsig.webbrowser.impl.DefaultWebBrowserPanel; |
|
13 |
import org.gvsig.webbrowser.impl.WebBrowserHistoryImpl; |
|
14 |
|
|
15 |
public class CSSBoxWebBrowserPanel extends DefaultWebBrowserPanel implements WebBrowserPanel { |
|
16 |
|
|
17 |
public CSSBoxWebBrowserPanel() { |
|
18 |
|
|
19 |
} |
|
20 |
|
|
21 |
protected WebBrowserPanel.WebBrowser createBrowserPanel() { |
|
22 |
return new WebBrowserPanel.WebBrowser() { |
|
23 |
private BrowserPane panel = new BrowserPane(); |
|
24 |
private WebBrowserHistoryImpl history = new WebBrowserHistoryImpl(); |
|
25 |
@Override |
|
26 |
public void setPage(URL url) throws IOException { |
|
27 |
this.history.go(url); |
|
28 |
this.panel.setPage(url); |
|
29 |
} |
|
30 |
|
|
31 |
@Override |
|
32 |
public String getPage() { |
|
33 |
URL url = this.history.get(); |
|
34 |
return url.toString(); |
|
35 |
} |
|
36 |
|
|
37 |
@Override |
|
38 |
public String getTitle() { |
|
39 |
EditorKit kit = panel.getEditorKit(); |
|
40 |
CSSBoxAnalyzer cssanalyzer = ((SwingBoxEditorKit) kit).getCSSBoxAnalyzer(); |
|
41 |
return cssanalyzer.getDocumentTitle(); |
|
42 |
} |
|
43 |
|
|
44 |
@Override |
|
45 |
public void goPrevious() { |
|
46 |
this.history.previous(); |
|
47 |
} |
|
48 |
|
|
49 |
@Override |
|
50 |
public void goNext() { |
|
51 |
this.history.next(); |
|
52 |
} |
|
53 |
|
|
54 |
@Override |
|
55 |
public void find(String text, boolean backwards) { |
|
56 |
} |
|
57 |
|
|
58 |
@Override |
|
59 |
public void setContent(String content, String contentType) { |
|
60 |
this.panel.setText(content); |
|
61 |
} |
|
62 |
|
|
63 |
@Override |
|
64 |
public JComponent asJComponent() { |
|
65 |
return this.panel; |
|
66 |
} |
|
67 |
}; |
|
68 |
} |
|
69 |
|
|
70 |
} |
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.373/org.gvsig.tools.util/org.gvsig.tools.util.impl/src/main/java/org/gvsig/webbrowser/impl/WebBrowserHistoryImpl.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.webbrowser.impl; |
|
7 |
|
|
8 |
import java.net.URL; |
|
9 |
import java.util.ArrayList; |
|
10 |
import java.util.List; |
|
11 |
|
|
12 |
/** |
|
13 |
* |
|
14 |
* @author jjdelcerro |
|
15 |
*/ |
|
16 |
public class WebBrowserHistoryImpl { |
|
17 |
|
|
18 |
private final List<URL> history; |
|
19 |
private int pos; |
|
20 |
private URL current; |
|
21 |
|
|
22 |
public WebBrowserHistoryImpl() { |
|
23 |
this.history = new ArrayList<>(); |
|
24 |
this.pos = 0; |
|
25 |
} |
|
26 |
|
|
27 |
public void previous() { |
|
28 |
if (pos > 1) { |
|
29 |
pos--; |
|
30 |
current = history.get(pos - 1); |
|
31 |
} |
|
32 |
} |
|
33 |
|
|
34 |
public void next() { |
|
35 |
} |
|
36 |
|
|
37 |
public void go(URL url) { |
|
38 |
while (pos < history.size()) { |
|
39 |
history.remove(history.size() - 1); |
|
40 |
} |
|
41 |
history.add(url); |
|
42 |
pos++; |
|
43 |
current = url; |
|
44 |
} |
|
45 |
|
|
46 |
public URL get() { |
|
47 |
return this.current; |
|
48 |
} |
|
49 |
|
|
50 |
} |
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.373/org.gvsig.tools.util/org.gvsig.tools.util.impl/src/main/java/org/gvsig/webbrowser/impl/DefaultWebBrowserPanel.java | ||
---|---|---|
1 |
package org.gvsig.webbrowser.impl; |
|
2 |
|
|
3 |
import java.awt.BorderLayout; |
|
4 |
import java.awt.Dimension; |
|
5 |
import java.awt.event.ActionEvent; |
|
6 |
import java.awt.event.KeyAdapter; |
|
7 |
import java.awt.event.KeyEvent; |
|
8 |
import java.io.IOException; |
|
9 |
import java.net.MalformedURLException; |
|
10 |
import java.net.URL; |
|
11 |
import java.util.Objects; |
|
12 |
import org.gvsig.webbrowser.WebBrowserPanel; |
|
13 |
import javax.swing.ImageIcon; |
|
14 |
import javax.swing.JComponent; |
|
15 |
import javax.swing.JEditorPane; |
|
16 |
import javax.swing.JScrollPane; |
|
17 |
import javax.swing.JTextField; |
|
18 |
import javax.swing.SwingUtilities; |
|
19 |
import org.gvsig.tools.swing.api.ToolsSwingUtils; |
|
20 |
import org.slf4j.Logger; |
|
21 |
import org.slf4j.LoggerFactory; |
|
22 |
|
|
23 |
@SuppressWarnings("UseSpecificCatch") |
|
24 |
public class DefaultWebBrowserPanel extends DefaultWebBrowserPanelView implements WebBrowserPanel { |
|
25 |
|
|
26 |
protected static final Logger LOGGER = LoggerFactory.getLogger(DefaultWebBrowserPanel.class); |
|
27 |
|
|
28 |
|
|
29 |
protected WebBrowserPanel.WebBrowser browser; |
|
30 |
|
|
31 |
public DefaultWebBrowserPanel() { |
|
32 |
this.initComponents(); |
|
33 |
} |
|
34 |
|
|
35 |
protected WebBrowserPanel.WebBrowser createBrowserPanel() { |
|
36 |
return new WebBrowserPanel.WebBrowser() { |
|
37 |
private JEditorPane panel = new JEditorPane(); |
|
38 |
private WebBrowserHistoryImpl history = new WebBrowserHistoryImpl(); |
|
39 |
@Override |
|
40 |
public void setPage(URL url) throws IOException { |
|
41 |
this.history.go(url); |
|
42 |
this.panel.setPage(url); |
|
43 |
} |
|
44 |
|
|
45 |
@Override |
|
46 |
public String getPage() { |
|
47 |
URL url = this.history.get(); |
|
48 |
return url.toString(); |
|
49 |
} |
|
50 |
|
|
51 |
@Override |
|
52 |
public String getTitle() { |
|
53 |
return ""; |
|
54 |
} |
|
55 |
|
|
56 |
@Override |
|
57 |
public void goPrevious() { |
|
58 |
this.history.previous(); |
|
59 |
} |
|
60 |
|
|
61 |
@Override |
|
62 |
public void goNext() { |
|
63 |
this.history.next(); |
|
64 |
} |
|
65 |
|
|
66 |
@Override |
|
67 |
public void find(String text, boolean backwards) { |
|
68 |
} |
|
69 |
|
|
70 |
@Override |
|
71 |
public void setContent(String content, String contentType) { |
|
72 |
this.panel.setText(content); |
|
73 |
} |
|
74 |
|
|
75 |
@Override |
|
76 |
public JComponent asJComponent() { |
|
77 |
return this.panel; |
|
78 |
} |
|
79 |
}; |
|
80 |
} |
|
81 |
|
|
82 |
protected WebBrowserPanel.WebBrowser getBrowser() { |
|
83 |
return this.browser; |
|
84 |
} |
|
85 |
|
|
86 |
private void initComponents() { |
|
87 |
this.browser = this.createBrowserPanel(); |
|
88 |
JScrollPane scrollPanel = new JScrollPane( |
|
89 |
this.browser.asJComponent(), |
|
90 |
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, |
|
91 |
JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS |
|
92 |
); |
|
93 |
this.containerBrowser.setLayout(new BorderLayout()); |
|
94 |
this.containerBrowser.add(scrollPanel, BorderLayout.CENTER); |
|
95 |
try { |
|
96 |
this.txtURL.addKeyListener(new KeyAdapter() { |
|
97 |
@Override |
|
98 |
public void keyPressed(KeyEvent keyEvent) { |
|
99 |
if( keyEvent.getKeyChar() == '\n' ) { |
|
100 |
setPage(txtURL.getText()); |
|
101 |
} |
|
102 |
} |
|
103 |
}); |
|
104 |
this.txtSearch.addKeyListener(new KeyAdapter() { |
|
105 |
@Override |
|
106 |
public void keyPressed(KeyEvent event) { |
|
107 |
JTextField jtext = txtSearch; |
|
108 |
if( event.getKeyChar() == 0x1b ) { // ESC |
|
109 |
jtext.setText(""); |
|
110 |
find("", true); |
|
111 |
} else if( event.getKeyChar() == '\n' ) { |
|
112 |
find(jtext.getText(), true); |
|
113 |
} |
|
114 |
} |
|
115 |
}); |
|
116 |
this.btnSearchPrevious.addActionListener((ActionEvent e) -> { |
|
117 |
find(txtSearch.getText(),false); |
|
118 |
}); |
|
119 |
this.btnSearchNext.addActionListener((ActionEvent e) -> { |
|
120 |
find(txtSearch.getText(),true); |
|
121 |
}); |
|
122 |
this.btnPrevious.addActionListener((ActionEvent e) -> { |
|
123 |
this.browser.goPrevious(); |
|
124 |
}); |
|
125 |
this.btnNext.addActionListener((ActionEvent e) -> { |
|
126 |
this.browser.goNext(); |
|
127 |
}); |
|
128 |
this.setPreferredSize(new Dimension(600, 500)); |
|
129 |
} catch(Exception ex) { |
|
130 |
LOGGER.warn("Can't initialize browser panel", ex); |
|
131 |
} |
|
132 |
} |
|
133 |
|
|
134 |
public void find(String text, boolean forward) { |
|
135 |
|
|
136 |
} |
|
137 |
|
|
138 |
@Override |
|
139 |
public void setPage(String url) { |
|
140 |
try { |
|
141 |
this.setPage(new URL(url)); |
|
142 |
} catch (MalformedURLException ex) { |
|
143 |
throw new RuntimeException(ex); |
|
144 |
} |
|
145 |
} |
|
146 |
|
|
147 |
@Override |
|
148 |
public void setPage(URL url) { |
|
149 |
this.txtURL.setText(url.toString()); |
|
150 |
SwingUtilities.invokeLater(() -> { |
|
151 |
try { |
|
152 |
this.getBrowser().setPage(url); |
|
153 |
} catch (Exception ex) { |
|
154 |
LOGGER.warn("Can't load page from url '"+url+"'.", ex); |
|
155 |
} |
|
156 |
}); |
|
157 |
} |
|
158 |
|
|
159 |
@Override |
|
160 |
public String getPage() { |
|
161 |
return this.getBrowser().getPage(); |
|
162 |
} |
|
163 |
|
|
164 |
@Override |
|
165 |
public void setContent(final String content, final String contentType) { |
|
166 |
this.getBrowser().setContent(content,contentType); |
|
167 |
} |
|
168 |
|
|
169 |
@Override |
|
170 |
public String getTitle() { |
|
171 |
return this.getBrowser().getTitle(); |
|
172 |
} |
|
173 |
|
|
174 |
@Override |
|
175 |
public JComponent asJComponent() { |
|
176 |
return this; |
|
177 |
} |
|
178 |
|
|
179 |
@Override |
|
180 |
public ImageIcon loadImage(String imageName) { |
|
181 |
return ToolsSwingUtils.loadImage(this, imageName); |
|
182 |
} |
|
183 |
|
|
184 |
|
|
185 |
@Override |
|
186 |
public void setStatus(String msg) { |
|
187 |
this.lblStatus.setText(msg); |
|
188 |
} |
|
189 |
|
|
190 |
@Override |
|
191 |
public void setURLText(String url) { |
|
192 |
this.txtURL.setText(url); |
|
193 |
} |
|
194 |
|
|
195 |
public static final void selfRegister() { |
|
196 |
ToolsSwingUtils.registerIcons( |
|
197 |
DefaultWebBrowserPanel.class, |
|
198 |
"images", |
|
199 |
"webbrowser", |
|
200 |
new String[] { "webbrowser", "webbrowser-config" }, |
|
201 |
new String[] { "webbrowser", "webbrowser-next" }, |
|
202 |
new String[] { "webbrowser", "webbrowser-previous" }, |
|
203 |
new String[] { "webbrowser", "webbrowser-refresh" }, |
|
204 |
new String[] { "webbrowser", "webbrowser-search" }, |
|
205 |
new String[] { "webbrowser", "webbrowser-search-next" }, |
|
206 |
new String[] { "webbrowser", "webbrowser-search-previous" } |
|
207 |
); |
|
208 |
} |
|
209 |
|
|
210 |
} |
org.gvsig.tools/library/tags/org.gvsig.tools-3.0.373/org.gvsig.tools.util/org.gvsig.tools.util.impl/src/main/java/org/gvsig/webbrowser/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/datos/devel/org.gvsig.tools/org.gvsig.tools.util/org.gvsig.tools.util.impl/src/main/java/org/gvsig/webbrowser2/impl/DefaultWebBrowserPanelView.xml</at> |
|
28 |
<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> |
|
29 |
<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> |
|
30 |
<at name="components"> |
|
31 |
<object classname="java.util.LinkedList"> |
|
32 |
<item > |
|
33 |
<at name="value"> |
|
34 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
35 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
36 |
<at name="cellconstraints"> |
|
37 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
38 |
<at name="column">8</at> |
|
39 |
<at name="row">2</at> |
|
40 |
<at name="colspan">1</at> |
|
41 |
<at name="rowspan">1</at> |
|
42 |
<at name="halign">default</at> |
|
43 |
<at name="valign">default</at> |
|
44 |
<at name="insets" object="insets">0,0,0,0</at> |
|
45 |
</object> |
|
46 |
</at> |
|
47 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
48 |
</super> |
|
49 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
50 |
<at name="beanclass">javax.swing.JTextField</at> |
|
51 |
<at name="beanproperties"> |
|
52 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
53 |
<at name="classname">javax.swing.JTextField</at> |
|
54 |
<at name="properties"> |
|
55 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
56 |
<at name="border"> |
|
57 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
58 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
59 |
<at name="name">border</at> |
|
60 |
</super> |
|
61 |
<at name="borders"> |
|
62 |
<object classname="java.util.LinkedList"> |
|
63 |
<item > |
|
64 |
<at name="value"> |
|
65 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
66 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
67 |
<at name="name">border</at> |
|
68 |
</super> |
|
69 |
</object> |
|
70 |
</at> |
|
71 |
</item> |
|
72 |
</object> |
|
73 |
</at> |
|
74 |
</object> |
|
75 |
</at> |
|
76 |
<at name="name">txtURL</at> |
|
77 |
<at name="width">842</at> |
|
78 |
<at name="height">22</at> |
|
79 |
</object> |
|
80 |
</at> |
|
81 |
</object> |
|
82 |
</at> |
|
83 |
</object> |
|
84 |
</at> |
|
85 |
</item> |
|
86 |
<item > |
|
87 |
<at name="value"> |
|
88 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
89 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
90 |
<at name="cellconstraints"> |
|
91 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
92 |
<at name="column">2</at> |
|
93 |
<at name="row">4</at> |
|
94 |
<at name="colspan">9</at> |
|
95 |
<at name="rowspan">1</at> |
|
96 |
<at name="halign">fill</at> |
|
97 |
<at name="valign">fill</at> |
|
98 |
<at name="insets" object="insets">0,0,0,0</at> |
|
99 |
</object> |
|
100 |
</at> |
|
101 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
102 |
</super> |
|
103 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
104 |
<at name="beanclass">javax.swing.JPanel</at> |
|
105 |
<at name="beanproperties"> |
|
106 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
107 |
<at name="classname">javax.swing.JPanel</at> |
|
108 |
<at name="properties"> |
|
109 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
110 |
<at name="name">containerBrowser</at> |
|
111 |
<at name="width">946</at> |
|
112 |
<at name="height">504</at> |
|
113 |
</object> |
|
114 |
</at> |
|
115 |
</object> |
|
116 |
</at> |
|
117 |
</object> |
|
118 |
</at> |
|
119 |
</item> |
|
120 |
<item > |
|
121 |
<at name="value"> |
|
122 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
123 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
124 |
<at name="cellconstraints"> |
|
125 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
126 |
<at name="column">2</at> |
|
127 |
<at name="row">6</at> |
|
128 |
<at name="colspan">9</at> |
|
129 |
<at name="rowspan">1</at> |
|
130 |
<at name="halign">default</at> |
|
131 |
<at name="valign">default</at> |
|
132 |
<at name="insets" object="insets">0,0,0,0</at> |
|
133 |
</object> |
|
134 |
</at> |
|
135 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
|
136 |
</super> |
|
137 |
<at name="id">embedded.787949249</at> |
|
138 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
|
139 |
<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> |
|
140 |
<at name="components"> |
|
141 |
<object classname="java.util.LinkedList"> |
|
142 |
<item > |
|
143 |
<at name="value"> |
|
144 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
145 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
146 |
<at name="cellconstraints"> |
|
147 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
148 |
<at name="column">3</at> |
|
149 |
<at name="row">1</at> |
|
150 |
<at name="colspan">1</at> |
|
151 |
<at name="rowspan">1</at> |
|
152 |
<at name="halign">default</at> |
|
153 |
<at name="valign">default</at> |
|
154 |
<at name="insets" object="insets">0,0,0,0</at> |
|
155 |
</object> |
|
156 |
</at> |
|
157 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
158 |
</super> |
|
159 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
160 |
<at name="beanclass">javax.swing.JTextField</at> |
|
161 |
<at name="beanproperties"> |
|
162 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
163 |
<at name="classname">javax.swing.JTextField</at> |
|
164 |
<at name="properties"> |
|
165 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
166 |
<at name="border"> |
|
167 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
168 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
169 |
<at name="name">border</at> |
|
170 |
</super> |
|
171 |
<at name="borders"> |
|
172 |
<object classname="java.util.LinkedList"> |
|
173 |
<item > |
|
174 |
<at name="value"> |
|
175 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
176 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
177 |
<at name="name">border</at> |
|
178 |
</super> |
|
179 |
</object> |
|
180 |
</at> |
|
181 |
</item> |
|
182 |
</object> |
|
183 |
</at> |
|
184 |
</object> |
|
185 |
</at> |
|
186 |
<at name="name">txtSearch</at> |
|
187 |
<at name="width">261</at> |
|
188 |
<at name="height">22</at> |
|
189 |
</object> |
|
190 |
</at> |
|
191 |
</object> |
|
192 |
</at> |
|
193 |
</object> |
|
194 |
</at> |
|
195 |
</item> |
|
196 |
<item > |
|
197 |
<at name="value"> |
|
198 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
199 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
200 |
<at name="cellconstraints"> |
|
201 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
202 |
<at name="column">9</at> |
|
203 |
<at name="row">1</at> |
|
204 |
<at name="colspan">1</at> |
|
205 |
<at name="rowspan">1</at> |
|
206 |
<at name="halign">fill</at> |
|
207 |
<at name="valign">fill</at> |
|
208 |
<at name="insets" object="insets">0,0,0,0</at> |
|
209 |
</object> |
|
210 |
</at> |
|
211 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
212 |
</super> |
|
213 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
214 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
215 |
<at name="beanproperties"> |
|
216 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
217 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
218 |
<at name="properties"> |
|
219 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
220 |
<at name="border"> |
|
221 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
222 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
223 |
<at name="name">border</at> |
|
224 |
</super> |
|
225 |
<at name="borders"> |
|
226 |
<object classname="java.util.LinkedList"> |
|
227 |
<item > |
|
228 |
<at name="value"> |
|
229 |
<object classname="com.jeta.forms.store.properties.LineBorderProperty"> |
|
230 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
231 |
<at name="name">border</at> |
|
232 |
</super> |
|
233 |
<at name="thickness">1</at> |
|
234 |
<at name="color"> |
|
235 |
<object classname="com.jeta.forms.store.properties.ColorProperty"> |
|
236 |
<at name="name">dyncolor</at> |
|
237 |
<at name="colorkey">Button.shadow</at> |
|
238 |
</object> |
|
239 |
</at> |
|
240 |
<at name="curved">false</at> |
|
241 |
</object> |
|
242 |
</at> |
|
243 |
</item> |
|
244 |
<item > |
|
245 |
<at name="value"> |
|
246 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
247 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
248 |
<at name="name">border</at> |
|
249 |
</super> |
|
250 |
</object> |
|
251 |
</at> |
|
252 |
</item> |
|
253 |
</object> |
|
254 |
</at> |
|
255 |
</object> |
|
256 |
</at> |
|
257 |
<at name="name">lblStatus</at> |
|
258 |
<at name="width">592</at> |
|
259 |
<at name="fill"> |
|
260 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
261 |
<at name="name">fill</at> |
|
262 |
</object> |
|
263 |
</at> |
|
264 |
<at name="height">22</at> |
|
265 |
</object> |
|
266 |
</at> |
|
267 |
</object> |
|
268 |
</at> |
|
269 |
</object> |
|
270 |
</at> |
|
271 |
</item> |
|
272 |
<item > |
|
273 |
<at name="value"> |
|
274 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
275 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
276 |
<at name="cellconstraints"> |
|
277 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
278 |
<at name="column">1</at> |
|
279 |
<at name="row">1</at> |
|
280 |
<at name="colspan">1</at> |
|
281 |
<at name="rowspan">1</at> |
|
282 |
<at name="halign">default</at> |
|
283 |
<at name="valign">default</at> |
|
284 |
<at name="insets" object="insets">0,0,0,0</at> |
|
285 |
</object> |
|
286 |
</at> |
|
287 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
288 |
</super> |
|
289 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
290 |
<at name="beanclass">com.jeta.forms.components.image.ImageComponent</at> |
|
291 |
<at name="beanproperties"> |
|
292 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
293 |
<at name="classname">com.jeta.forms.components.image.ImageComponent</at> |
|
294 |
<at name="properties"> |
|
295 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
296 |
<at name="border"> |
|
297 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
298 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
299 |
<at name="name">border</at> |
|
300 |
</super> |
|
301 |
<at name="borders"> |
|
302 |
<object classname="java.util.LinkedList"> |
|
303 |
<item > |
|
304 |
<at name="value"> |
|
305 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
306 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
307 |
<at name="name">border</at> |
|
308 |
</super> |
|
309 |
</object> |
|
310 |
</at> |
|
311 |
</item> |
|
312 |
</object> |
|
313 |
</at> |
|
314 |
</object> |
|
315 |
</at> |
|
316 |
<at name="icon"> |
|
317 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
318 |
<at name="embedded">false</at> |
|
319 |
<at name="path">addons/Catalog/repository/webbrowser-search.png</at> |
|
320 |
<at name="description">webbrowser-search.png</at> |
|
321 |
<at name="width">16</at> |
|
322 |
<at name="height">16</at> |
|
323 |
</object> |
|
324 |
</at> |
|
325 |
<at name="name">imgSearch</at> |
|
326 |
<at name="width">16</at> |
|
327 |
<at name="height">16</at> |
|
328 |
</object> |
|
329 |
</at> |
|
330 |
</object> |
|
331 |
</at> |
|
332 |
</object> |
|
333 |
</at> |
|
334 |
</item> |
|
335 |
<item > |
|
336 |
<at name="value"> |
|
337 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
338 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
339 |
<at name="cellconstraints"> |
|
340 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
341 |
<at name="column">5</at> |
|
342 |
<at name="row">1</at> |
|
343 |
<at name="colspan">1</at> |
|
344 |
<at name="rowspan">1</at> |
|
345 |
<at name="halign">default</at> |
|
346 |
<at name="valign">default</at> |
|
347 |
<at name="insets" object="insets">0,0,0,0</at> |
|
348 |
</object> |
|
349 |
</at> |
|
350 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
351 |
</super> |
|
352 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
353 |
<at name="beanclass">javax.swing.JButton</at> |
|
354 |
<at name="beanproperties"> |
|
355 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
356 |
<at name="classname">javax.swing.JButton</at> |
|
357 |
<at name="properties"> |
|
358 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
359 |
<at name="border"> |
|
360 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
361 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
362 |
<at name="name">border</at> |
|
363 |
</super> |
|
364 |
<at name="borders"> |
|
365 |
<object classname="java.util.LinkedList"> |
|
366 |
<item > |
|
367 |
<at name="value"> |
|
368 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
369 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
370 |
<at name="name">border</at> |
|
371 |
</super> |
|
372 |
<at name="top">0</at> |
|
373 |
<at name="left">0</at> |
|
374 |
<at name="bottom">0</at> |
|
375 |
<at name="right">0</at> |
|
376 |
</object> |
|
377 |
</at> |
|
378 |
</item> |
|
379 |
</object> |
|
380 |
</at> |
|
381 |
</object> |
|
382 |
</at> |
|
383 |
<at name="icon"> |
|
384 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
385 |
<at name="embedded">false</at> |
|
386 |
<at name="path">addons/Catalog/repository/webbrowser-search-next.png</at> |
|
387 |
<at name="description">webbrowser-search-next.png</at> |
|
388 |
<at name="width">16</at> |
|
389 |
<at name="height">16</at> |
|
390 |
</object> |
|
391 |
</at> |
|
392 |
<at name="name">btnSearchNext</at> |
|
393 |
<at name="width">16</at> |
|
394 |
<at name="height">16</at> |
|
395 |
</object> |
|
396 |
</at> |
|
397 |
</object> |
|
398 |
</at> |
|
399 |
</object> |
|
400 |
</at> |
|
401 |
</item> |
|
402 |
<item > |
|
403 |
<at name="value"> |
|
404 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
405 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
406 |
<at name="cellconstraints"> |
|
407 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
408 |
<at name="column">7</at> |
|
409 |
<at name="row">1</at> |
|
410 |
<at name="colspan">1</at> |
|
411 |
<at name="rowspan">1</at> |
|
412 |
<at name="halign">default</at> |
|
413 |
<at name="valign">default</at> |
|
414 |
<at name="insets" object="insets">0,0,0,0</at> |
|
415 |
</object> |
|
416 |
</at> |
|
417 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
418 |
</super> |
|
419 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
420 |
<at name="beanclass">javax.swing.JButton</at> |
|
421 |
<at name="beanproperties"> |
|
422 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
Also available in: Unified diff