Revision 2057
org.gvsig.simpleimageviewer/tags/org.gvsig.simpleimageviewer-1.0.40/org.gvsig.simpleimageviewer.app.mainplugin/buildNumber.properties | ||
---|---|---|
1 |
#Mon Jul 13 14:10:12 CEST 2020 |
|
2 |
buildNumber=43 |
org.gvsig.simpleimageviewer/tags/org.gvsig.simpleimageviewer-1.0.40/org.gvsig.simpleimageviewer.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml | ||
---|---|---|
1 |
<assembly> |
|
2 |
<id>gvsig-plugin-package</id> |
|
3 |
<formats> |
|
4 |
<format>zip</format> |
|
5 |
</formats> |
|
6 |
<baseDirectory>${project.artifactId}</baseDirectory> |
|
7 |
<includeBaseDirectory>true</includeBaseDirectory> |
|
8 |
<files> |
|
9 |
<file> |
|
10 |
<source>target/${project.artifactId}-${project.version}.jar</source> |
|
11 |
<outputDirectory>lib</outputDirectory> |
|
12 |
</file> |
|
13 |
<file> |
|
14 |
<source>target/package.info</source> |
|
15 |
</file> |
|
16 |
</files> |
|
17 |
|
|
18 |
<fileSets> |
|
19 |
<fileSet> |
|
20 |
<directory>src/main/resources-plugin</directory> |
|
21 |
<outputDirectory>.</outputDirectory> |
|
22 |
</fileSet> |
|
23 |
</fileSets> |
|
24 |
|
|
25 |
<dependencySets> |
|
26 |
<dependencySet> |
|
27 |
<useProjectArtifact>false</useProjectArtifact> |
|
28 |
<useTransitiveDependencies>false</useTransitiveDependencies> |
|
29 |
<outputDirectory>lib</outputDirectory> |
|
30 |
<includes> |
|
31 |
<include>org.swinglabs.swingx:swingx-all</include> |
|
32 |
</includes> |
|
33 |
</dependencySet> |
|
34 |
</dependencySets> |
|
35 |
|
|
36 |
</assembly> |
org.gvsig.simpleimageviewer/tags/org.gvsig.simpleimageviewer-1.0.40/org.gvsig.simpleimageviewer.app.mainplugin/src/main/java/org/gvsig/simpleimageviewer/app/mainplugin/SimpleImageViewerManager.java | ||
---|---|---|
1 |
|
|
2 |
package org.gvsig.simpleimageviewer.app.mainplugin; |
|
3 |
|
|
4 |
import org.gvsig.imageviewer.ImageViewer; |
|
5 |
import org.gvsig.imageviewer.ImageViewerManager; |
|
6 |
|
|
7 |
|
|
8 |
public class SimpleImageViewerManager implements ImageViewerManager { |
|
9 |
|
|
10 |
@Override |
|
11 |
public ImageViewer createImageViewer() { |
|
12 |
return new ImageViewerControler(); |
|
13 |
} |
|
14 |
|
|
15 |
} |
org.gvsig.simpleimageviewer/tags/org.gvsig.simpleimageviewer-1.0.40/org.gvsig.simpleimageviewer.app.mainplugin/src/main/java/org/gvsig/simpleimageviewer/app/mainplugin/SimpleImageViewerExtension.java | ||
---|---|---|
1 |
|
|
2 |
package org.gvsig.simpleimageviewer.app.mainplugin; |
|
3 |
|
|
4 |
import org.gvsig.andami.IconThemeHelper; |
|
5 |
import org.gvsig.andami.plugins.Extension; |
|
6 |
import org.gvsig.tools.util.ToolsUtilLocator; |
|
7 |
|
|
8 |
|
|
9 |
public class SimpleImageViewerExtension extends Extension { |
|
10 |
|
|
11 |
@Override |
|
12 |
public void initialize() { |
|
13 |
String[] iconNames = new String[] { |
|
14 |
"imageviewer-rotate-left", |
|
15 |
"imageviewer-rotate-right", |
|
16 |
"imageviewer-zoom-in", |
|
17 |
"imageviewer-zoom-out", |
|
18 |
"imageviewer-zoom-1-1", |
|
19 |
"imageviewer-fit" |
|
20 |
}; |
|
21 |
for (String iconName : iconNames) { |
|
22 |
IconThemeHelper.registerIcon(null, iconName, this); |
|
23 |
} |
|
24 |
ToolsUtilLocator.registerImageViewertManager(SimpleImageViewerManager.class); |
|
25 |
} |
|
26 |
|
|
27 |
@Override |
|
28 |
public void execute(String command) { |
|
29 |
|
|
30 |
} |
|
31 |
|
|
32 |
@Override |
|
33 |
public boolean isEnabled() { |
|
34 |
return false; |
|
35 |
} |
|
36 |
|
|
37 |
@Override |
|
38 |
public boolean isVisible() { |
|
39 |
return false; |
|
40 |
} |
|
41 |
|
|
42 |
} |
org.gvsig.simpleimageviewer/tags/org.gvsig.simpleimageviewer-1.0.40/org.gvsig.simpleimageviewer.app.mainplugin/src/main/java/org/gvsig/simpleimageviewer/app/mainplugin/ImageViewerControler.java | ||
---|---|---|
1 |
|
|
2 |
package org.gvsig.simpleimageviewer.app.mainplugin; |
|
3 |
|
|
4 |
import java.awt.BorderLayout; |
|
5 |
import java.awt.Graphics2D; |
|
6 |
import java.awt.Image; |
|
7 |
import java.awt.event.ActionEvent; |
|
8 |
import java.awt.event.ComponentAdapter; |
|
9 |
import java.awt.event.ComponentEvent; |
|
10 |
import java.awt.event.ContainerEvent; |
|
11 |
import java.awt.event.ContainerListener; |
|
12 |
import java.awt.geom.AffineTransform; |
|
13 |
import java.awt.image.AffineTransformOp; |
|
14 |
import java.awt.image.BufferedImage; |
|
15 |
import java.awt.image.BufferedImageOp; |
|
16 |
import java.beans.PropertyChangeEvent; |
|
17 |
import java.io.File; |
|
18 |
import java.io.IOException; |
|
19 |
import java.net.URL; |
|
20 |
import java.text.NumberFormat; |
|
21 |
import javax.swing.ImageIcon; |
|
22 |
import javax.swing.JComponent; |
|
23 |
import javax.swing.SwingUtilities; |
|
24 |
import javax.swing.event.AncestorEvent; |
|
25 |
import javax.swing.event.AncestorListener; |
|
26 |
import org.apache.commons.io.FilenameUtils; |
|
27 |
import org.gvsig.imageviewer.ImageViewer; |
|
28 |
import org.gvsig.tools.ToolsLocator; |
|
29 |
import org.gvsig.tools.i18n.I18nManager; |
|
30 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
|
31 |
import org.gvsig.tools.swing.api.ToolsSwingManager; |
|
32 |
import org.gvsig.tools.swing.icontheme.IconTheme; |
|
33 |
import org.gvsig.tools.swing.icontheme.IconThemeManager; |
|
34 |
import org.jdesktop.swingx.JXImageView; |
|
35 |
import org.slf4j.Logger; |
|
36 |
import org.slf4j.LoggerFactory; |
|
37 |
|
|
38 |
|
|
39 |
public class ImageViewerControler extends ImageViewerView implements ImageViewer { |
|
40 |
private static final Logger LOGGER = LoggerFactory.getLogger(ImageViewerControler.class); |
|
41 |
|
|
42 |
private static final int ROTATE_RIGHT = 0; |
|
43 |
private static final int ROTATE_LEFT = 1; |
|
44 |
|
|
45 |
private JXImageView imageView; |
|
46 |
private boolean fit = true; |
|
47 |
|
|
48 |
public ImageViewerControler() { |
|
49 |
this.initComponents(); |
|
50 |
} |
|
51 |
|
|
52 |
private void initComponents() { |
|
53 |
ToolsSwingManager toolsSwingManager = ToolsSwingLocator.getToolsSwingManager(); |
|
54 |
|
|
55 |
this.imageView = new JXImageView(); |
|
56 |
this.ImageContainer.setLayout(new BorderLayout()); |
|
57 |
this.ImageContainer.add(this.imageView,BorderLayout.CENTER); |
|
58 |
|
|
59 |
toolsSwingManager.translate(this.btnZoomIn); |
|
60 |
toolsSwingManager.translate(this.btnZoomOut); |
|
61 |
toolsSwingManager.translate(this.btnRotateLeft); |
|
62 |
toolsSwingManager.translate(this.btnRotateRight); |
|
63 |
toolsSwingManager.translate(this.btnFit); |
|
64 |
toolsSwingManager.translate(this.btnZoom1_1); |
|
65 |
|
|
66 |
this.btnRotateLeft.addActionListener((ActionEvent e) -> { |
|
67 |
fit = false; |
|
68 |
rotate(ROTATE_LEFT); |
|
69 |
}); |
|
70 |
|
|
71 |
this.btnRotateRight.addActionListener((ActionEvent e) -> { |
|
72 |
fit = false; |
|
73 |
rotate(ROTATE_RIGHT); |
|
74 |
}); |
|
75 |
|
|
76 |
this.btnFit.addActionListener((ActionEvent e) -> { |
|
77 |
fit = true; |
|
78 |
adjustScale(); |
|
79 |
}); |
|
80 |
|
|
81 |
this.btnZoom1_1.addActionListener((ActionEvent e) -> { |
|
82 |
fit = false; |
|
83 |
imageView.setScale(1.0); |
|
84 |
}); |
|
85 |
|
|
86 |
this.btnZoomIn.addActionListener((ActionEvent e) -> { |
|
87 |
fit = false; |
|
88 |
imageView.setScale(imageView.getScale()*2); |
|
89 |
}); |
|
90 |
|
|
91 |
this.btnZoomOut.addActionListener((ActionEvent e) -> { |
|
92 |
fit = false; |
|
93 |
imageView.setScale(imageView.getScale()*0.5); |
|
94 |
}); |
|
95 |
|
|
96 |
this.imageView.addPropertyChangeListener("scale", (PropertyChangeEvent evt) -> { |
|
97 |
onChangeScale(); |
|
98 |
}); |
|
99 |
this.addComponentListener(new ComponentAdapter() { |
|
100 |
@Override |
|
101 |
public void componentResized(ComponentEvent e) { |
|
102 |
adjustScale(); |
|
103 |
} |
|
104 |
}); |
|
105 |
} |
|
106 |
|
|
107 |
@Override |
|
108 |
public ImageIcon loadImage(String imageName) { |
|
109 |
String iconName = FilenameUtils.getBaseName(imageName); |
|
110 |
IconThemeManager iconThemeManager = ToolsSwingLocator.getIconThemeManager(); |
|
111 |
IconTheme theme = iconThemeManager.getCurrent(); |
|
112 |
if( theme.exists(iconName) ) { |
|
113 |
return theme.get(iconName); |
|
114 |
} |
|
115 |
return super.loadImage(imageName); |
|
116 |
} |
|
117 |
|
|
118 |
|
|
119 |
private void rotate(int mode) { |
|
120 |
double scale = imageView.getScale(); |
|
121 |
Image img = imageView.getImage(); |
|
122 |
BufferedImage src = new BufferedImage( |
|
123 |
img.getWidth(null), |
|
124 |
img.getHeight(null), |
|
125 |
BufferedImage.TYPE_INT_ARGB); |
|
126 |
BufferedImage dst = new BufferedImage( |
|
127 |
img.getHeight(null), |
|
128 |
img.getWidth(null), |
|
129 |
BufferedImage.TYPE_INT_ARGB); |
|
130 |
Graphics2D g = (Graphics2D)src.getGraphics(); |
|
131 |
|
|
132 |
try { |
|
133 |
// smooth scaling |
|
134 |
g.drawImage(img, 0, 0, null); |
|
135 |
} finally { |
|
136 |
g.dispose(); |
|
137 |
} |
|
138 |
|
|
139 |
AffineTransform trans; |
|
140 |
switch(mode) { |
|
141 |
case ROTATE_RIGHT: |
|
142 |
trans = AffineTransform.getRotateInstance(Math.PI/2,0,0); |
|
143 |
trans.translate(0,-src.getHeight()); |
|
144 |
break; |
|
145 |
default: |
|
146 |
case ROTATE_LEFT: |
|
147 |
trans = AffineTransform.getRotateInstance(-Math.PI/2,0,0); |
|
148 |
trans.translate(-src.getWidth(),0); |
|
149 |
break; |
|
150 |
} |
|
151 |
BufferedImageOp op = new AffineTransformOp(trans, AffineTransformOp.TYPE_NEAREST_NEIGHBOR); |
|
152 |
op.filter(src,dst); |
|
153 |
imageView.setImage(dst); |
|
154 |
imageView.setScale(scale); |
|
155 |
} |
|
156 |
|
|
157 |
private void onChangeScale() { |
|
158 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
159 |
NumberFormat nf = NumberFormat.getNumberInstance(); |
|
160 |
nf.setMaximumFractionDigits(3); |
|
161 |
nf.setMinimumFractionDigits(3); |
|
162 |
String scale = nf.format(this.imageView.getScale()); |
|
163 |
this.lblMessages.setText(i18n.getTranslation("_Scale_{0}", new String[] {scale})); |
|
164 |
} |
|
165 |
|
|
166 |
private void adjustScale() { |
|
167 |
if( !fit ) { |
|
168 |
return; |
|
169 |
} |
|
170 |
double sx = 0; |
|
171 |
double sy = 0; |
|
172 |
try { |
|
173 |
double w = (double)this.getWidth(); |
|
174 |
double h = (double)this.getHeight(); |
|
175 |
sx = (w<=0? this.getPreferredSize().getWidth():w)/ this.imageView.getImage().getWidth(null); |
|
176 |
sy = (h<=0? this.getPreferredSize().getHeight():h) / this.imageView.getImage().getHeight(null); |
|
177 |
if( sx > sy ) { |
|
178 |
this.imageView.setScale(sy); |
|
179 |
} else { |
|
180 |
this.imageView.setScale(sx); |
|
181 |
} |
|
182 |
} catch(Exception ex) { |
|
183 |
// Ignore exception, don't crash |
|
184 |
LOGGER.trace("Error setting scale (sx="+sx+", sy="+sy+")."); |
|
185 |
} |
|
186 |
} |
|
187 |
|
|
188 |
@Override |
|
189 |
public void clean() { |
|
190 |
this.imageView.setImage((Image)null); |
|
191 |
} |
|
192 |
|
|
193 |
@Override |
|
194 |
public void setImage(final Image image) { |
|
195 |
imageView.setImage(image); |
|
196 |
onChangeScale(); |
|
197 |
SwingUtilities.invokeLater(this::adjustScale); |
|
198 |
} |
|
199 |
|
|
200 |
@Override |
|
201 |
public void setImage(URL url) { |
|
202 |
try { |
|
203 |
this.imageView.setImage(url); |
|
204 |
} catch (IOException ex) { |
|
205 |
throw new IllegalArgumentException(ex); |
|
206 |
} |
|
207 |
onChangeScale(); |
|
208 |
SwingUtilities.invokeLater(this::adjustScale); |
|
209 |
} |
|
210 |
|
|
211 |
@Override |
|
212 |
public void setImage(File file) { |
|
213 |
try { |
|
214 |
this.imageView.setImage(file); |
|
215 |
} catch (IOException ex) { |
|
216 |
throw new IllegalArgumentException(ex); |
|
217 |
} |
|
218 |
onChangeScale(); |
|
219 |
SwingUtilities.invokeLater(this::adjustScale); |
|
220 |
} |
|
221 |
|
|
222 |
@Override |
|
223 |
public JComponent asJComponent() { |
|
224 |
return this; |
|
225 |
} |
|
226 |
} |
org.gvsig.simpleimageviewer/tags/org.gvsig.simpleimageviewer-1.0.40/org.gvsig.simpleimageviewer.app.mainplugin/src/main/java/org/gvsig/simpleimageviewer/app/mainplugin/ImageViewerView.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.simpleimageviewer/org.gvsig.simpleimageviewer.app.mainplugin/src/main/java/org/gvsig/simpleimageviewer/app/mainplugin/ImageViewerView.xml</at> |
|
28 |
<at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE</at> |
|
29 |
<at name="colspecs">FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),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">2</at> |
|
39 |
<at name="row">4</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.JPanel</at> |
|
51 |
<at name="beanproperties"> |
|
52 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
53 |
<at name="classname">javax.swing.JPanel</at> |
|
54 |
<at name="properties"> |
|
55 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
56 |
<at name="name">ImageContainer</at> |
|
57 |
<at name="width">668</at> |
|
58 |
<at name="height">290</at> |
|
59 |
</object> |
|
60 |
</at> |
|
61 |
</object> |
|
62 |
</at> |
|
63 |
</object> |
|
64 |
</at> |
|
65 |
</item> |
|
66 |
<item > |
|
67 |
<at name="value"> |
|
68 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
69 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
70 |
<at name="cellconstraints"> |
|
71 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
72 |
<at name="column">2</at> |
|
73 |
<at name="row">2</at> |
|
74 |
<at name="colspan">1</at> |
|
75 |
<at name="rowspan">1</at> |
|
76 |
<at name="halign">default</at> |
|
77 |
<at name="valign">default</at> |
|
78 |
<at name="insets" object="insets">0,0,0,0</at> |
|
79 |
</object> |
|
80 |
</at> |
|
81 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
|
82 |
</super> |
|
83 |
<at name="id">embedded.677490763</at> |
|
84 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
|
85 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0)</at> |
|
86 |
<at name="components"> |
|
87 |
<object classname="java.util.LinkedList"> |
|
88 |
<item > |
|
89 |
<at name="value"> |
|
90 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
91 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
92 |
<at name="cellconstraints"> |
|
93 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
94 |
<at name="column">1</at> |
|
95 |
<at name="row">1</at> |
|
96 |
<at name="colspan">1</at> |
|
97 |
<at name="rowspan">1</at> |
|
98 |
<at name="halign">default</at> |
|
99 |
<at name="valign">default</at> |
|
100 |
<at name="insets" object="insets">0,0,0,0</at> |
|
101 |
</object> |
|
102 |
</at> |
|
103 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
104 |
</super> |
|
105 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
106 |
<at name="beanclass">javax.swing.JButton</at> |
|
107 |
<at name="beanproperties"> |
|
108 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
109 |
<at name="classname">javax.swing.JButton</at> |
|
110 |
<at name="properties"> |
|
111 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
112 |
<at name="border"> |
|
113 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
114 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
115 |
<at name="name">border</at> |
|
116 |
</super> |
|
117 |
<at name="borders"> |
|
118 |
<object classname="java.util.LinkedList"> |
|
119 |
<item > |
|
120 |
<at name="value"> |
|
121 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
122 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
123 |
<at name="name">border</at> |
|
124 |
</super> |
|
125 |
<at name="top">2</at> |
|
126 |
<at name="left">2</at> |
|
127 |
<at name="bottom">2</at> |
|
128 |
<at name="right">2</at> |
|
129 |
</object> |
|
130 |
</at> |
|
131 |
</item> |
|
132 |
</object> |
|
133 |
</at> |
|
134 |
</object> |
|
135 |
</at> |
|
136 |
<at name="icon"> |
|
137 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
138 |
<at name="embedded">false</at> |
|
139 |
<at name="path">images/imageviewer-rotate-left.png</at> |
|
140 |
<at name="description">imageviewer-rotate-left.png</at> |
|
141 |
<at name="width">16</at> |
|
142 |
<at name="height">16</at> |
|
143 |
</object> |
|
144 |
</at> |
|
145 |
<at name="name">btnRotateLeft</at> |
|
146 |
<at name="width">20</at> |
|
147 |
<at name="toolTipText">_Rotate_left</at> |
|
148 |
<at name="height">20</at> |
|
149 |
</object> |
|
150 |
</at> |
|
151 |
</object> |
|
152 |
</at> |
|
153 |
</object> |
|
154 |
</at> |
|
155 |
</item> |
|
156 |
<item > |
|
157 |
<at name="value"> |
|
158 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
159 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
160 |
<at name="cellconstraints"> |
|
161 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
162 |
<at name="column">3</at> |
|
163 |
<at name="row">1</at> |
|
164 |
<at name="colspan">1</at> |
|
165 |
<at name="rowspan">1</at> |
|
166 |
<at name="halign">default</at> |
|
167 |
<at name="valign">default</at> |
|
168 |
<at name="insets" object="insets">0,0,0,0</at> |
|
169 |
</object> |
|
170 |
</at> |
|
171 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
172 |
</super> |
|
173 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
174 |
<at name="beanclass">javax.swing.JButton</at> |
|
175 |
<at name="beanproperties"> |
|
176 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
177 |
<at name="classname">javax.swing.JButton</at> |
|
178 |
<at name="properties"> |
|
179 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
180 |
<at name="border"> |
|
181 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
182 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
183 |
<at name="name">border</at> |
|
184 |
</super> |
|
185 |
<at name="borders"> |
|
186 |
<object classname="java.util.LinkedList"> |
|
187 |
<item > |
|
188 |
<at name="value"> |
|
189 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
190 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
191 |
<at name="name">border</at> |
|
192 |
</super> |
|
193 |
<at name="top">2</at> |
|
194 |
<at name="left">2</at> |
|
195 |
<at name="bottom">2</at> |
|
196 |
<at name="right">2</at> |
|
197 |
</object> |
|
198 |
</at> |
|
199 |
</item> |
|
200 |
</object> |
|
201 |
</at> |
|
202 |
</object> |
|
203 |
</at> |
|
204 |
<at name="icon"> |
|
205 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
206 |
<at name="embedded">false</at> |
|
207 |
<at name="path">images/imageviewer-rotate-right.png</at> |
|
208 |
<at name="description">imageviewer-rotate-right.png</at> |
|
209 |
<at name="width">16</at> |
|
210 |
<at name="height">16</at> |
|
211 |
</object> |
|
212 |
</at> |
|
213 |
<at name="name">btnRotateRight</at> |
|
214 |
<at name="width">20</at> |
|
215 |
<at name="toolTipText">_Rotate_right</at> |
|
216 |
<at name="height">20</at> |
|
217 |
</object> |
|
218 |
</at> |
|
219 |
</object> |
|
220 |
</at> |
|
221 |
</object> |
|
222 |
</at> |
|
223 |
</item> |
|
224 |
<item > |
|
225 |
<at name="value"> |
|
226 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
227 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
228 |
<at name="cellconstraints"> |
|
229 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
230 |
<at name="column">9</at> |
|
231 |
<at name="row">1</at> |
|
232 |
<at name="colspan">1</at> |
|
233 |
<at name="rowspan">1</at> |
|
234 |
<at name="halign">default</at> |
|
235 |
<at name="valign">default</at> |
|
236 |
<at name="insets" object="insets">0,0,0,0</at> |
|
237 |
</object> |
|
238 |
</at> |
|
239 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
240 |
</super> |
|
241 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
242 |
<at name="beanclass">javax.swing.JButton</at> |
|
243 |
<at name="beanproperties"> |
|
244 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
245 |
<at name="classname">javax.swing.JButton</at> |
|
246 |
<at name="properties"> |
|
247 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
248 |
<at name="border"> |
|
249 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
250 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
251 |
<at name="name">border</at> |
|
252 |
</super> |
|
253 |
<at name="borders"> |
|
254 |
<object classname="java.util.LinkedList"> |
|
255 |
<item > |
|
256 |
<at name="value"> |
|
257 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
258 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
259 |
<at name="name">border</at> |
|
260 |
</super> |
|
261 |
<at name="top">2</at> |
|
262 |
<at name="left">2</at> |
|
263 |
<at name="bottom">2</at> |
|
264 |
<at name="right">2</at> |
|
265 |
</object> |
|
266 |
</at> |
|
267 |
</item> |
|
268 |
</object> |
|
269 |
</at> |
|
270 |
</object> |
|
271 |
</at> |
|
272 |
<at name="icon"> |
|
273 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
274 |
<at name="embedded">false</at> |
|
275 |
<at name="path">images/imageviewer-zoom-in.png</at> |
|
276 |
<at name="description">imageviewer-zoom-in.png</at> |
|
277 |
<at name="width">16</at> |
|
278 |
<at name="height">16</at> |
|
279 |
</object> |
|
280 |
</at> |
|
281 |
<at name="name">btnZoomIn</at> |
|
282 |
<at name="width">20</at> |
|
283 |
<at name="toolTipText">_Zoom_in</at> |
|
284 |
<at name="height">20</at> |
|
285 |
</object> |
|
286 |
</at> |
|
287 |
</object> |
|
288 |
</at> |
|
289 |
</object> |
|
290 |
</at> |
|
291 |
</item> |
|
292 |
<item > |
|
293 |
<at name="value"> |
|
294 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
295 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
296 |
<at name="cellconstraints"> |
|
297 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
298 |
<at name="column">11</at> |
|
299 |
<at name="row">1</at> |
|
300 |
<at name="colspan">1</at> |
|
301 |
<at name="rowspan">1</at> |
|
302 |
<at name="halign">default</at> |
|
303 |
<at name="valign">default</at> |
|
304 |
<at name="insets" object="insets">0,0,0,0</at> |
|
305 |
</object> |
|
306 |
</at> |
|
307 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
308 |
</super> |
|
309 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
310 |
<at name="beanclass">javax.swing.JButton</at> |
|
311 |
<at name="beanproperties"> |
|
312 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
313 |
<at name="classname">javax.swing.JButton</at> |
|
314 |
<at name="properties"> |
|
315 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
316 |
<at name="border"> |
|
317 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
318 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
319 |
<at name="name">border</at> |
|
320 |
</super> |
|
321 |
<at name="borders"> |
|
322 |
<object classname="java.util.LinkedList"> |
|
323 |
<item > |
|
324 |
<at name="value"> |
|
325 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
326 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
327 |
<at name="name">border</at> |
|
328 |
</super> |
|
329 |
<at name="top">2</at> |
|
330 |
<at name="left">2</at> |
|
331 |
<at name="bottom">2</at> |
|
332 |
<at name="right">2</at> |
|
333 |
</object> |
|
334 |
</at> |
|
335 |
</item> |
|
336 |
</object> |
|
337 |
</at> |
|
338 |
</object> |
|
339 |
</at> |
|
340 |
<at name="icon"> |
|
341 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
342 |
<at name="embedded">false</at> |
|
343 |
<at name="path">images/imageviewer-zoom-out.png</at> |
|
344 |
<at name="description">imageviewer-zoom-out.png</at> |
|
345 |
<at name="width">16</at> |
|
346 |
<at name="height">16</at> |
|
347 |
</object> |
|
348 |
</at> |
|
349 |
<at name="name">btnZoomOut</at> |
|
350 |
<at name="width">20</at> |
|
351 |
<at name="toolTipText">_Zoom_out</at> |
|
352 |
<at name="height">20</at> |
|
353 |
</object> |
|
354 |
</at> |
|
355 |
</object> |
|
356 |
</at> |
|
357 |
</object> |
|
358 |
</at> |
|
359 |
</item> |
|
360 |
<item > |
|
361 |
<at name="value"> |
|
362 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
363 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
364 |
<at name="cellconstraints"> |
|
365 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
366 |
<at name="column">5</at> |
|
367 |
<at name="row">1</at> |
|
368 |
<at name="colspan">1</at> |
|
369 |
<at name="rowspan">1</at> |
|
370 |
<at name="halign">default</at> |
|
371 |
<at name="valign">default</at> |
|
372 |
<at name="insets" object="insets">0,0,0,0</at> |
|
373 |
</object> |
|
374 |
</at> |
|
375 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
376 |
</super> |
|
377 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
378 |
<at name="beanclass">javax.swing.JButton</at> |
|
379 |
<at name="beanproperties"> |
|
380 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
381 |
<at name="classname">javax.swing.JButton</at> |
|
382 |
<at name="properties"> |
|
383 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
384 |
<at name="border"> |
|
385 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
386 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
387 |
<at name="name">border</at> |
|
388 |
</super> |
|
389 |
<at name="borders"> |
|
390 |
<object classname="java.util.LinkedList"> |
|
391 |
<item > |
|
392 |
<at name="value"> |
|
393 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
394 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
395 |
<at name="name">border</at> |
|
396 |
</super> |
|
397 |
<at name="top">2</at> |
|
398 |
<at name="left">2</at> |
|
399 |
<at name="bottom">2</at> |
|
400 |
<at name="right">2</at> |
|
401 |
</object> |
|
402 |
</at> |
|
403 |
</item> |
|
404 |
</object> |
|
405 |
</at> |
|
406 |
</object> |
|
407 |
</at> |
|
408 |
<at name="icon"> |
|
409 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
410 |
<at name="embedded">false</at> |
|
411 |
<at name="path">images/imageviewer-zoom-1-1.png</at> |
|
412 |
<at name="description">imageviewer-zoom-1-1.png</at> |
|
413 |
<at name="width">16</at> |
|
414 |
<at name="height">16</at> |
|
415 |
</object> |
|
416 |
</at> |
|
417 |
<at name="name">btnZoom1_1</at> |
|
418 |
<at name="width">20</at> |
|
419 |
<at name="toolTipText">_Zoom_1_1</at> |
|
420 |
<at name="height">20</at> |
|
421 |
</object> |
|
422 |
</at> |
|
423 |
</object> |
|
424 |
</at> |
|
425 |
</object> |
|
426 |
</at> |
|
427 |
</item> |
|
428 |
<item > |
|
429 |
<at name="value"> |
|
430 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
431 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
432 |
<at name="cellconstraints"> |
|
433 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
434 |
<at name="column">7</at> |
|
435 |
<at name="row">1</at> |
|
436 |
<at name="colspan">1</at> |
|
437 |
<at name="rowspan">1</at> |
|
438 |
<at name="halign">default</at> |
|
439 |
<at name="valign">default</at> |
|
440 |
<at name="insets" object="insets">0,0,0,0</at> |
|
441 |
</object> |
|
442 |
</at> |
|
443 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
444 |
</super> |
|
445 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
446 |
<at name="beanclass">javax.swing.JButton</at> |
|
447 |
<at name="beanproperties"> |
|
448 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
449 |
<at name="classname">javax.swing.JButton</at> |
|
450 |
<at name="properties"> |
|
451 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
452 |
<at name="border"> |
|
453 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
454 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
455 |
<at name="name">border</at> |
|
456 |
</super> |
|
457 |
<at name="borders"> |
|
458 |
<object classname="java.util.LinkedList"> |
|
459 |
<item > |
|
460 |
<at name="value"> |
|
461 |
<object classname="com.jeta.forms.store.properties.EmptyBorderProperty"> |
|
462 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
463 |
<at name="name">border</at> |
|
464 |
</super> |
|
465 |
<at name="top">2</at> |
|
466 |
<at name="left">2</at> |
|
467 |
<at name="bottom">2</at> |
|
468 |
<at name="right">2</at> |
|
469 |
</object> |
|
470 |
</at> |
|
471 |
</item> |
|
472 |
</object> |
|
473 |
</at> |
|
474 |
</object> |
|
475 |
</at> |
|
476 |
<at name="icon"> |
|
477 |
<object classname="com.jeta.forms.store.properties.IconProperty"> |
|
478 |
<at name="embedded">false</at> |
|
479 |
<at name="path">images/imageviewer-fit.png</at> |
|
480 |
<at name="description">imageviewer-fit.png</at> |
|
481 |
<at name="width">16</at> |
|
482 |
<at name="height">16</at> |
|
483 |
</object> |
|
484 |
</at> |
|
485 |
<at name="name">btnFit</at> |
|
486 |
<at name="width">20</at> |
|
487 |
<at name="toolTipText">_Fit_to_window</at> |
|
488 |
<at name="height">20</at> |
|
489 |
</object> |
|
490 |
</at> |
|
491 |
</object> |
|
492 |
</at> |
|
493 |
</object> |
|
494 |
</at> |
|
495 |
</item> |
|
496 |
</object> |
|
497 |
</at> |
|
498 |
<at name="properties"> |
|
499 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
500 |
<at name="classname">com.jeta.forms.gui.form.GridView</at> |
|
501 |
<at name="properties"> |
|
502 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
503 |
<at name="border"> |
|
504 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
505 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
506 |
<at name="name">border</at> |
|
507 |
</super> |
|
508 |
<at name="borders"> |
|
509 |
<object classname="java.util.LinkedList"/> |
|
510 |
</at> |
|
511 |
</object> |
|
512 |
</at> |
|
513 |
<at name="name"/> |
|
514 |
<at name="fill"> |
|
515 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
516 |
<at name="name">fill</at> |
|
517 |
</object> |
|
518 |
</at> |
|
519 |
<at name="scollBars"> |
|
520 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
521 |
<at name="name">scollBars</at> |
|
522 |
<at name="verticalpolicy">21</at> |
|
523 |
<at name="horizontalpolicy">31</at> |
|
524 |
<at name="border"> |
|
525 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
526 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
527 |
<at name="name">border</at> |
|
528 |
</super> |
|
529 |
<at name="borders"> |
|
530 |
<object classname="java.util.LinkedList"> |
|
531 |
<item > |
|
532 |
<at name="value"> |
|
533 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
534 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
535 |
<at name="name">border</at> |
|
536 |
</super> |
|
537 |
</object> |
|
538 |
</at> |
|
539 |
</item> |
|
540 |
</object> |
|
541 |
</at> |
|
542 |
</object> |
|
543 |
</at> |
|
544 |
</object> |
|
545 |
</at> |
|
546 |
</object> |
|
547 |
</at> |
|
548 |
</object> |
|
549 |
</at> |
|
550 |
<at name="cellpainters"> |
|
551 |
<object classname="com.jeta.forms.store.support.Matrix"> |
|
552 |
<at name="rows"> |
|
553 |
<object classname="[Ljava.lang.Object;" size="1"> |
|
554 |
<at name="item" index="0"> |
|
555 |
<object classname="[Ljava.lang.Object;" size="12"/> |
|
556 |
</at> |
|
557 |
</object> |
|
558 |
</at> |
|
559 |
</object> |
|
560 |
</at> |
|
561 |
<at name="rowgroups"> |
|
562 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
563 |
<at name="groups"> |
|
564 |
<object classname="java.util.HashMap"/> |
|
565 |
</at> |
|
566 |
</object> |
|
567 |
</at> |
|
568 |
<at name="colgroups"> |
|
569 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
570 |
<at name="groups"> |
|
571 |
<object classname="java.util.HashMap"/> |
|
572 |
</at> |
|
573 |
</object> |
|
574 |
</at> |
|
575 |
</object> |
|
576 |
</at> |
|
577 |
</item> |
|
578 |
<item > |
|
579 |
<at name="value"> |
|
580 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
581 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
582 |
<at name="cellconstraints"> |
|
583 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
584 |
<at name="column">2</at> |
|
585 |
<at name="row">6</at> |
|
586 |
<at name="colspan">1</at> |
|
587 |
<at name="rowspan">1</at> |
|
588 |
<at name="halign">default</at> |
|
589 |
<at name="valign">default</at> |
|
590 |
<at name="insets" object="insets">0,0,0,0</at> |
|
591 |
</object> |
|
592 |
</at> |
|
593 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
594 |
</super> |
|
595 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
596 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
597 |
<at name="beanproperties"> |
|
598 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
599 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
600 |
<at name="properties"> |
|
601 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
602 |
<at name="border"> |
|
603 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
604 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
605 |
<at name="name">border</at> |
|
606 |
</super> |
|
607 |
<at name="borders"> |
|
608 |
<object classname="java.util.LinkedList"> |
|
609 |
<item > |
|
610 |
<at name="value"> |
|
611 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
612 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
613 |
<at name="name">border</at> |
|
614 |
</super> |
|
615 |
</object> |
|
616 |
</at> |
|
617 |
</item> |
|
618 |
</object> |
|
619 |
</at> |
|
620 |
</object> |
|
621 |
</at> |
|
622 |
<at name="name">lblMessages</at> |
|
623 |
<at name="width">668</at> |
|
624 |
<at name="fill"> |
|
625 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
626 |
<at name="name">fill</at> |
|
627 |
</object> |
|
628 |
</at> |
|
629 |
<at name="height">12</at> |
|
630 |
</object> |
|
631 |
</at> |
|
632 |
</object> |
|
633 |
</at> |
|
634 |
</object> |
|
635 |
</at> |
|
636 |
</item> |
|
637 |
</object> |
|
638 |
</at> |
|
639 |
<at name="properties"> |
|
640 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
641 |
<at name="classname">com.jeta.forms.gui.form.GridView</at> |
|
642 |
<at name="properties"> |
|
643 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
644 |
<at name="border"> |
|
645 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
646 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
647 |
<at name="name">border</at> |
|
648 |
</super> |
|
649 |
<at name="borders"> |
|
650 |
<object classname="java.util.LinkedList"/> |
|
651 |
</at> |
|
652 |
</object> |
|
653 |
</at> |
|
654 |
<at name="name"/> |
|
655 |
<at name="fill"> |
|
656 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
657 |
<at name="name">fill</at> |
|
658 |
</object> |
|
659 |
</at> |
|
660 |
<at name="scollBars"> |
|
661 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
662 |
<at name="name">scollBars</at> |
|
663 |
<at name="verticalpolicy">21</at> |
|
664 |
<at name="horizontalpolicy">31</at> |
|
665 |
<at name="border"> |
|
666 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
667 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
668 |
<at name="name">border</at> |
|
669 |
</super> |
|
670 |
<at name="borders"> |
|
671 |
<object classname="java.util.LinkedList"> |
|
672 |
<item > |
|
673 |
<at name="value"> |
|
674 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
675 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
676 |
<at name="name">border</at> |
|
677 |
</super> |
|
678 |
</object> |
|
679 |
</at> |
|
680 |
</item> |
|
681 |
</object> |
|
682 |
</at> |
|
683 |
</object> |
|
684 |
</at> |
|
685 |
</object> |
|
686 |
</at> |
|
687 |
</object> |
|
688 |
</at> |
|
689 |
</object> |
|
690 |
</at> |
|
691 |
<at name="cellpainters"> |
|
692 |
<object classname="com.jeta.forms.store.support.Matrix"> |
|
693 |
<at name="rows"> |
|
694 |
<object classname="[Ljava.lang.Object;" size="7"> |
|
695 |
<at name="item" index="0"> |
|
696 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
697 |
</at> |
|
698 |
<at name="item" index="1"> |
|
699 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
700 |
</at> |
|
701 |
<at name="item" index="2"> |
|
702 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
703 |
</at> |
|
704 |
<at name="item" index="3"> |
|
705 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
706 |
</at> |
|
707 |
<at name="item" index="4"> |
|
708 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
709 |
</at> |
|
710 |
<at name="item" index="5"> |
|
711 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
712 |
</at> |
|
713 |
<at name="item" index="6"> |
|
714 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
715 |
</at> |
|
716 |
</object> |
|
717 |
</at> |
|
718 |
</object> |
|
719 |
</at> |
|
720 |
<at name="rowgroups"> |
|
721 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
722 |
<at name="groups"> |
|
723 |
<object classname="java.util.HashMap"/> |
|
724 |
</at> |
|
725 |
</object> |
|
726 |
</at> |
|
727 |
<at name="colgroups"> |
|
728 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
729 |
<at name="groups"> |
|
730 |
<object classname="java.util.HashMap"/> |
|
731 |
</at> |
|
732 |
</object> |
|
733 |
</at> |
|
734 |
</object> |
|
735 |
</at> |
|
736 |
</object> |
org.gvsig.simpleimageviewer/tags/org.gvsig.simpleimageviewer-1.0.40/org.gvsig.simpleimageviewer.app.mainplugin/src/main/java/org/gvsig/simpleimageviewer/app/mainplugin/ImageViewerView.java | ||
---|---|---|
1 |
package org.gvsig.simpleimageviewer.app.mainplugin; |
|
2 |
|
|
3 |
import com.jeta.open.i18n.I18NUtils; |
|
4 |
import com.jgoodies.forms.layout.CellConstraints; |
|
5 |
import com.jgoodies.forms.layout.FormLayout; |
|
6 |
import java.awt.BorderLayout; |
|
7 |
import java.awt.ComponentOrientation; |
|
8 |
import java.awt.Container; |
|
9 |
import java.awt.Dimension; |
|
10 |
import javax.swing.Box; |
|
11 |
import javax.swing.ImageIcon; |
|
12 |
import javax.swing.JButton; |
|
13 |
import javax.swing.JFrame; |
|
14 |
import javax.swing.JLabel; |
|
15 |
import javax.swing.JPanel; |
|
16 |
import javax.swing.border.EmptyBorder; |
|
17 |
|
|
18 |
|
|
19 |
public class ImageViewerView extends JPanel |
|
20 |
{ |
|
21 |
JPanel ImageContainer = new JPanel(); |
|
22 |
JButton btnRotateLeft = new JButton(); |
|
23 |
JButton btnRotateRight = new JButton(); |
|
24 |
JButton btnZoomIn = new JButton(); |
|
25 |
JButton btnZoomOut = new JButton(); |
|
26 |
JButton btnZoom1_1 = new JButton(); |
|
27 |
JButton btnFit = new JButton(); |
|
28 |
JLabel lblMessages = new JLabel(); |
|
29 |
|
|
30 |
/** |
|
31 |
* Default constructor |
|
32 |
*/ |
|
33 |
public ImageViewerView() |
|
34 |
{ |
|
35 |
initializePanel(); |
|
36 |
} |
|
37 |
|
|
38 |
/** |
|
39 |
* Adds fill components to empty cells in the first row and first column of the grid. |
|
40 |
* This ensures that the grid spacing will be the same as shown in the designer. |
|
41 |
* @param cols an array of column indices in the first row where fill components should be added. |
|
42 |
* @param rows an array of row indices in the first column where fill components should be added. |
|
43 |
*/ |
|
44 |
void addFillComponents( Container panel, int[] cols, int[] rows ) |
|
45 |
{ |
|
46 |
Dimension filler = new Dimension(10,10); |
|
47 |
|
|
48 |
boolean filled_cell_11 = false; |
|
49 |
CellConstraints cc = new CellConstraints(); |
|
50 |
if ( cols.length > 0 && rows.length > 0 ) |
|
51 |
{ |
|
52 |
if ( cols[0] == 1 && rows[0] == 1 ) |
|
53 |
{ |
|
54 |
/** add a rigid area */ |
|
55 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,1) ); |
|
56 |
filled_cell_11 = true; |
|
57 |
} |
|
58 |
} |
|
59 |
|
|
60 |
for( int index = 0; index < cols.length; index++ ) |
|
61 |
{ |
|
62 |
if ( cols[index] == 1 && filled_cell_11 ) |
|
63 |
{ |
|
64 |
continue; |
|
65 |
} |
|
66 |
panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) ); |
|
67 |
} |
|
68 |
|
|
69 |
for( int index = 0; index < rows.length; index++ ) |
|
70 |
{ |
|
71 |
if ( rows[index] == 1 && filled_cell_11 ) |
|
72 |
{ |
|
73 |
continue; |
|
74 |
} |
|
75 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) ); |
|
76 |
} |
|
77 |
|
|
78 |
} |
|
79 |
|
|
80 |
/** |
|
81 |
* Helper method to load an image file from the CLASSPATH |
|
82 |
* @param imageName the package and name of the file to load relative to the CLASSPATH |
|
83 |
* @return an ImageIcon instance with the specified image file |
|
84 |
* @throws IllegalArgumentException if the image resource cannot be loaded. |
|
85 |
*/ |
|
86 |
public ImageIcon loadImage( String imageName ) |
|
87 |
{ |
|
88 |
try |
|
89 |
{ |
|
90 |
ClassLoader classloader = getClass().getClassLoader(); |
|
91 |
java.net.URL url = classloader.getResource( imageName ); |
|
92 |
if ( url != null ) |
|
93 |
{ |
|
94 |
ImageIcon icon = new ImageIcon( url ); |
|
95 |
return icon; |
|
96 |
} |
|
97 |
} |
|
98 |
catch( Exception e ) |
|
99 |
{ |
|
100 |
e.printStackTrace(); |
|
101 |
} |
|
102 |
throw new IllegalArgumentException( "Unable to load image: " + imageName ); |
|
103 |
} |
|
104 |
|
|
105 |
/** |
|
106 |
* Method for recalculating the component orientation for |
|
107 |
* right-to-left Locales. |
|
108 |
* @param orientation the component orientation to be applied |
|
109 |
*/ |
|
110 |
public void applyComponentOrientation( ComponentOrientation orientation ) |
|
111 |
{ |
|
112 |
// Not yet implemented... |
|
113 |
// I18NUtils.applyComponentOrientation(this, orientation); |
|
114 |
super.applyComponentOrientation(orientation); |
|
115 |
} |
|
116 |
|
|
117 |
public JPanel createPanel() |
|
118 |
{ |
|
119 |
JPanel jpanel1 = new JPanel(); |
|
120 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); |
|
121 |
CellConstraints cc = new CellConstraints(); |
|
122 |
jpanel1.setLayout(formlayout1); |
|
123 |
|
|
124 |
ImageContainer.setName("ImageContainer"); |
|
125 |
jpanel1.add(ImageContainer,cc.xy(2,4)); |
|
126 |
|
|
127 |
jpanel1.add(createPanel1(),cc.xy(2,2)); |
|
128 |
lblMessages.setName("lblMessages"); |
|
129 |
jpanel1.add(lblMessages,cc.xy(2,6)); |
|
130 |
|
|
131 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5,6,7 }); |
|
132 |
return jpanel1; |
|
133 |
} |
|
134 |
|
|
135 |
public JPanel createPanel1() |
|
136 |
{ |
|
137 |
JPanel jpanel1 = new JPanel(); |
|
138 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0)","CENTER:DEFAULT:NONE"); |
|
139 |
CellConstraints cc = new CellConstraints(); |
|
140 |
jpanel1.setLayout(formlayout1); |
|
141 |
|
|
142 |
btnRotateLeft.setIcon(loadImage("images/imageviewer-rotate-left.png")); |
|
143 |
btnRotateLeft.setName("btnRotateLeft"); |
|
144 |
btnRotateLeft.setToolTipText("_Rotate_left"); |
|
145 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
|
146 |
btnRotateLeft.setBorder(emptyborder1); |
|
147 |
jpanel1.add(btnRotateLeft,cc.xy(1,1)); |
|
148 |
|
|
149 |
btnRotateRight.setIcon(loadImage("images/imageviewer-rotate-right.png")); |
|
150 |
btnRotateRight.setName("btnRotateRight"); |
|
151 |
btnRotateRight.setToolTipText("_Rotate_right"); |
|
152 |
EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2); |
|
153 |
btnRotateRight.setBorder(emptyborder2); |
|
154 |
jpanel1.add(btnRotateRight,cc.xy(3,1)); |
|
155 |
|
|
156 |
btnZoomIn.setIcon(loadImage("images/imageviewer-zoom-in.png")); |
|
157 |
btnZoomIn.setName("btnZoomIn"); |
|
158 |
btnZoomIn.setToolTipText("_Zoom_in"); |
|
159 |
EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2); |
|
160 |
btnZoomIn.setBorder(emptyborder3); |
|
161 |
jpanel1.add(btnZoomIn,cc.xy(9,1)); |
|
162 |
|
|
163 |
btnZoomOut.setIcon(loadImage("images/imageviewer-zoom-out.png")); |
|
164 |
btnZoomOut.setName("btnZoomOut"); |
|
165 |
btnZoomOut.setToolTipText("_Zoom_out"); |
|
166 |
EmptyBorder emptyborder4 = new EmptyBorder(2,2,2,2); |
|
167 |
btnZoomOut.setBorder(emptyborder4); |
|
168 |
jpanel1.add(btnZoomOut,cc.xy(11,1)); |
|
169 |
|
|
170 |
btnZoom1_1.setIcon(loadImage("images/imageviewer-zoom-1-1.png")); |
|
171 |
btnZoom1_1.setName("btnZoom1_1"); |
|
172 |
btnZoom1_1.setToolTipText("_Zoom_1_1"); |
|
173 |
EmptyBorder emptyborder5 = new EmptyBorder(2,2,2,2); |
|
174 |
btnZoom1_1.setBorder(emptyborder5); |
|
175 |
jpanel1.add(btnZoom1_1,cc.xy(5,1)); |
|
176 |
|
|
177 |
btnFit.setIcon(loadImage("images/imageviewer-fit.png")); |
|
178 |
btnFit.setName("btnFit"); |
|
179 |
btnFit.setToolTipText("_Fit_to_window"); |
|
180 |
EmptyBorder emptyborder6 = new EmptyBorder(2,2,2,2); |
|
181 |
btnFit.setBorder(emptyborder6); |
|
182 |
jpanel1.add(btnFit,cc.xy(7,1)); |
|
183 |
|
|
184 |
addFillComponents(jpanel1,new int[]{ 2,4,6,8,10,12 },new int[0]); |
|
185 |
return jpanel1; |
|
186 |
} |
|
187 |
|
|
188 |
/** |
|
189 |
* Initializer |
|
190 |
*/ |
|
191 |
protected void initializePanel() |
|
192 |
{ |
|
193 |
setLayout(new BorderLayout()); |
|
194 |
add(createPanel(), BorderLayout.CENTER); |
|
195 |
} |
|
196 |
|
|
197 |
|
|
198 |
} |
org.gvsig.simpleimageviewer/tags/org.gvsig.simpleimageviewer-1.0.40/org.gvsig.simpleimageviewer.app.mainplugin/src/main/resources-plugin/i18n/text.properties | ||
---|---|---|
1 |
_Rotate_left=Rotar a la izquierda |
|
2 |
_Rotate_right=Rotar a la derecha |
|
3 |
_Zoom_1_1=Zoom 1:1 |
|
4 |
_Fit_to_window=Ajustar a la ventana |
|
5 |
_Zoom_in=Zoom mas |
|
6 |
_Zoom_out=Zoom menos |
|
7 |
_Scale_{0}=Escala: {0} |
org.gvsig.simpleimageviewer/tags/org.gvsig.simpleimageviewer-1.0.40/org.gvsig.simpleimageviewer.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties | ||
---|---|---|
1 |
_Rotate_left=Rotate left |
|
2 |
_Rotate_right=Rotate right |
|
3 |
_Zoom_1_1=Zoom 1:1 |
|
4 |
_Fit_to_window=Fit to window |
|
5 |
_Zoom_in=Zoom in |
|
6 |
_Zoom_out=Zoom out |
|
7 |
_Scale_{0}=Scale: {0} |
org.gvsig.simpleimageviewer/tags/org.gvsig.simpleimageviewer-1.0.40/org.gvsig.simpleimageviewer.app.mainplugin/src/main/resources-plugin/config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugin-config> |
|
3 |
<resourceBundle name="text"/> |
|
4 |
<libraries library-dir="lib"/> |
|
5 |
<extensions> |
|
6 |
<extension class-name="org.gvsig.simpleimageviewer.app.mainplugin.SimpleImageViewerExtension" |
|
7 |
description="" |
|
8 |
active="true" |
|
9 |
priority="1"> |
|
10 |
|
|
11 |
</extension> |
|
12 |
</extensions> |
|
13 |
</plugin-config> |
org.gvsig.simpleimageviewer/tags/org.gvsig.simpleimageviewer-1.0.40/org.gvsig.simpleimageviewer.app.mainplugin/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
3 |
<modelVersion>4.0.0</modelVersion> |
|
4 |
<packaging>jar</packaging> |
|
5 |
<artifactId>org.gvsig.simpleimageviewer.app.mainplugin</artifactId> |
|
6 |
<name>${project.artifactId}</name> |
|
7 |
<description> |
|
8 |
Simple image viewer for gvSIG based on JXImageViewer component |
|
9 |
</description> |
|
10 |
<parent> |
|
11 |
<groupId>org.gvsig</groupId> |
|
12 |
<artifactId>org.gvsig.simpleimageviewer</artifactId> |
|
13 |
<version>1.0.40</version> |
|
14 |
</parent> |
|
15 |
<dependencies> |
|
16 |
<dependency> |
|
17 |
<groupId>org.gvsig</groupId> |
|
18 |
<artifactId>org.gvsig.app.mainplugin</artifactId> |
|
19 |
<scope>compile</scope> |
|
20 |
</dependency> |
|
21 |
<dependency> |
|
22 |
<groupId>org.gvsig</groupId> |
|
23 |
<artifactId>org.gvsig.tools.util.api</artifactId> |
|
24 |
<scope>compile</scope> |
|
25 |
</dependency> |
|
26 |
<dependency> |
|
27 |
<groupId>org.swinglabs.swingx</groupId> |
|
28 |
<artifactId>swingx-all</artifactId> |
|
29 |
<version>1.6.4</version> |
|
30 |
<scope>compile</scope> |
|
31 |
</dependency> |
|
32 |
|
|
33 |
</dependencies> |
|
34 |
|
|
35 |
|
|
36 |
<properties> |
|
37 |
<!-- Package info property values --> |
|
38 |
<!-- Default values in org.gvsig.desktop --> |
|
39 |
<gvsig.package.info.state>testing</gvsig.package.info.state> |
|
40 |
<gvsig.package.info.official>true</gvsig.package.info.official> |
|
41 |
<gvsig.package.info.name>Simple image viewer</gvsig.package.info.name> |
|
42 |
<gvsig.package.info.poolURL>https://devel.gvsig.org/download/projects/gvsig-pool/pool/</gvsig.package.info.poolURL> |
|
43 |
</properties> |
|
44 |
|
|
45 |
</project> |
|
0 | 46 |
org.gvsig.simpleimageviewer/tags/org.gvsig.simpleimageviewer-1.0.40/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<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"> |
|
3 |
<modelVersion>4.0.0</modelVersion> |
|
4 |
<artifactId>org.gvsig.simpleimageviewer</artifactId> |
|
5 |
<packaging>pom</packaging> |
|
6 |
<version>1.0.40</version> |
|
7 |
<name>${project.artifactId}</name> |
|
8 |
<description>Simple image viewer</description> |
|
9 |
<parent> |
|
10 |
<groupId>org.gvsig</groupId> |
|
11 |
<artifactId>org.gvsig.desktop</artifactId> |
|
12 |
<version>2.0.286</version> |
|
13 |
</parent> |
|
14 |
<url>https://devel.gvsig.org/svn/gvsig-projects-pool/${project.artifactId}/trunk/${project.artifactId}</url> |
|
15 |
<scm> |
|
16 |
<connection>scm:svn:https://devel.gvsig.org/svn/gvsig-projects-pool/org.gvsig.simpleimageviewer/tags/org.gvsig.simpleimageviewer-1.0.40</connection> |
|
17 |
<developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-projects-pool/org.gvsig.simpleimageviewer/tags/org.gvsig.simpleimageviewer-1.0.40</developerConnection> |
|
18 |
<url>https://devel.gvsig.org/svn/gvsig-projects-pool/org.gvsig.simpleimageviewer/tags/org.gvsig.simpleimageviewer-1.0.40</url> |
|
19 |
</scm> |
|
20 |
|
|
21 |
<developers> |
|
22 |
<developer> |
|
23 |
<id>jjdelcerro</id> |
|
24 |
<name>Joaqu?n Jose del Cerro</name> |
|
25 |
<email>jjdelcerro@gvsig.org</email> |
|
26 |
<roles> |
|
27 |
<role>Architect</role> |
|
28 |
<role>Developer</role> |
|
29 |
</roles> |
|
30 |
</developer> |
|
31 |
</developers> |
|
32 |
<distributionManagement> |
|
33 |
<site> |
|
34 |
<id>gvsig-repository</id> |
|
35 |
<url>dav:https://devel.gvsig.org/sites/${project.artifactId}/${project.version}</url> |
|
36 |
</site> |
Also available in: Unified diff