Revision 6668
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.app/org.gvsig.raster.app.mainplugin/src/main/java/org/gvsig/raster/app/mainplugin/RangeScaleLayerPropertiesPageFactory.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2017 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.raster.app.mainplugin; |
|
24 |
|
|
25 |
import org.gvsig.app.project.documents.view.ViewDocument; |
|
26 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
27 |
import org.gvsig.propertypage.PropertiesPage; |
|
28 |
import org.gvsig.propertypage.PropertiesPageFactory; |
|
29 |
|
|
30 |
|
|
31 |
/** |
|
32 |
* @author fdiaz |
|
33 |
* |
|
34 |
*/ |
|
35 |
public class RangeScaleLayerPropertiesPageFactory implements PropertiesPageFactory { |
|
36 |
|
|
37 |
@Override |
|
38 |
public String getGroupID() { |
|
39 |
return ViewDocument.LAYER_PROPERTIES_PAGE_GROUP; |
|
40 |
} |
|
41 |
|
|
42 |
@Override |
|
43 |
public boolean isVisible(Object obj) { |
|
44 |
return obj instanceof FLayer; |
|
45 |
} |
|
46 |
|
|
47 |
@Override |
|
48 |
public PropertiesPage create(Object obj) { |
|
49 |
return (PropertiesPage) new RangeScalePropertiesPage((FLayer) obj); |
|
50 |
} |
|
51 |
|
|
52 |
} |
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.app/org.gvsig.raster.app.mainplugin/src/main/java/org/gvsig/raster/app/mainplugin/InformationLayerPropertiesPageFactory.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2017 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.raster.app.mainplugin; |
|
24 |
|
|
25 |
import org.gvsig.app.project.documents.view.ViewDocument; |
|
26 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
27 |
import org.gvsig.fmap.mapcontext.raster.api.RasterLayer; |
|
28 |
import org.gvsig.propertypage.PropertiesPage; |
|
29 |
import org.gvsig.propertypage.PropertiesPageFactory; |
|
30 |
|
|
31 |
|
|
32 |
/** |
|
33 |
* @author fdiaz |
|
34 |
* |
|
35 |
*/ |
|
36 |
public class InformationLayerPropertiesPageFactory implements PropertiesPageFactory { |
|
37 |
|
|
38 |
@Override |
|
39 |
public String getGroupID() { |
|
40 |
return ViewDocument.LAYER_PROPERTIES_PAGE_GROUP; |
|
41 |
} |
|
42 |
|
|
43 |
@Override |
|
44 |
public boolean isVisible(Object obj) { |
|
45 |
return obj instanceof FLayer; |
|
46 |
} |
|
47 |
|
|
48 |
@Override |
|
49 |
public PropertiesPage create(Object obj) { |
|
50 |
return (PropertiesPage) new InformationPropertiesPage((FLayer) obj); |
|
51 |
} |
|
52 |
|
|
53 |
} |
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.app/org.gvsig.raster.app.mainplugin/src/main/java/org/gvsig/raster/app/mainplugin/RangeScalePropertiesPage.java | ||
---|---|---|
1 |
package org.gvsig.raster.app.mainplugin; |
|
2 |
|
|
3 |
import javax.swing.JComponent; |
|
4 |
|
|
5 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
6 |
import org.gvsig.propertypage.PropertiesPage; |
|
7 |
import org.gvsig.raster.swing.api.RangeScalePanel; |
|
8 |
import org.gvsig.raster.swing.api.RasterSwingLocator; |
|
9 |
import org.gvsig.raster.swing.api.RasterSwingManager; |
|
10 |
import org.gvsig.tools.ToolsLocator; |
|
11 |
import org.gvsig.tools.i18n.I18nManager; |
|
12 |
|
|
13 |
|
|
14 |
/** |
|
15 |
* @author fdiaz |
|
16 |
* |
|
17 |
*/ |
|
18 |
public class RangeScalePropertiesPage extends javax.swing.JPanel implements PropertiesPage { |
|
19 |
|
|
20 |
/** |
|
21 |
* |
|
22 |
*/ |
|
23 |
private static final long serialVersionUID = -912777742097628569L; |
|
24 |
private RangeScalePanel panel; |
|
25 |
private FLayer layer; |
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
public RangeScalePropertiesPage(FLayer layer) { |
|
30 |
this.layer = layer; |
|
31 |
} |
|
32 |
|
|
33 |
@Override |
|
34 |
public JComponent asJComponent() { |
|
35 |
if (this.panel == null) { |
|
36 |
RasterSwingManager manager = RasterSwingLocator.getSwingManager(); |
|
37 |
panel = manager.createRangeScalePanel(); |
|
38 |
panel.set(layer); |
|
39 |
} |
|
40 |
return (JComponent) panel; |
|
41 |
} |
|
42 |
|
|
43 |
@Override |
|
44 |
public String getTitle() { |
|
45 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
46 |
return i18nManager.getTranslation("_scale_range"); |
|
47 |
} |
|
48 |
|
|
49 |
@Override |
|
50 |
public int getPriority() { |
|
51 |
return 1000; |
|
52 |
} |
|
53 |
|
|
54 |
@Override |
|
55 |
public boolean whenAccept() { |
|
56 |
this.whenApply(); |
|
57 |
return true; |
|
58 |
} |
|
59 |
|
|
60 |
@Override |
|
61 |
public boolean whenApply() { |
|
62 |
this.panel.fetch(layer); |
|
63 |
return true; |
|
64 |
} |
|
65 |
|
|
66 |
@Override |
|
67 |
public boolean whenCancel() { |
|
68 |
// Do nothing |
|
69 |
return true; |
|
70 |
} |
|
71 |
|
|
72 |
} |
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.app/org.gvsig.raster.app.mainplugin/src/main/java/org/gvsig/raster/app/mainplugin/InformationPropertiesPage.java | ||
---|---|---|
1 |
package org.gvsig.raster.app.mainplugin; |
|
2 |
|
|
3 |
import javax.swing.JComponent; |
|
4 |
|
|
5 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
6 |
import org.gvsig.propertypage.PropertiesPage; |
|
7 |
import org.gvsig.raster.swing.api.InformationPanel; |
|
8 |
import org.gvsig.raster.swing.api.RasterSwingLocator; |
|
9 |
import org.gvsig.raster.swing.api.RasterSwingManager; |
|
10 |
import org.gvsig.tools.ToolsLocator; |
|
11 |
import org.gvsig.tools.i18n.I18nManager; |
|
12 |
|
|
13 |
|
|
14 |
/** |
|
15 |
* @author fdiaz |
|
16 |
* |
|
17 |
*/ |
|
18 |
public class InformationPropertiesPage extends javax.swing.JPanel implements PropertiesPage { |
|
19 |
|
|
20 |
/** |
|
21 |
* |
|
22 |
*/ |
|
23 |
private static final long serialVersionUID = -912777742097628569L; |
|
24 |
private InformationPanel informationPanel; |
|
25 |
private FLayer layer; |
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
public InformationPropertiesPage(FLayer layer) { |
|
30 |
this.layer = layer; |
|
31 |
} |
|
32 |
|
|
33 |
@Override |
|
34 |
public JComponent asJComponent() { |
|
35 |
if (this.informationPanel == null) { |
|
36 |
RasterSwingManager manager = RasterSwingLocator.getSwingManager(); |
|
37 |
informationPanel = manager.createRasterInformationPanel(); |
|
38 |
informationPanel.set(layer); |
|
39 |
} |
|
40 |
return (JComponent) informationPanel; |
|
41 |
} |
|
42 |
|
|
43 |
@Override |
|
44 |
public String getTitle() { |
|
45 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
46 |
return i18nManager.getTranslation("_information"); |
|
47 |
} |
|
48 |
|
|
49 |
@Override |
|
50 |
public int getPriority() { |
|
51 |
return 1000; |
|
52 |
} |
|
53 |
|
|
54 |
@Override |
|
55 |
public boolean whenAccept() { |
|
56 |
this.whenApply(); |
|
57 |
return true; |
|
58 |
} |
|
59 |
|
|
60 |
@Override |
|
61 |
public boolean whenApply() { |
|
62 |
this.informationPanel.fetch(layer); |
|
63 |
return true; |
|
64 |
} |
|
65 |
|
|
66 |
@Override |
|
67 |
public boolean whenCancel() { |
|
68 |
// Do nothing |
|
69 |
return true; |
|
70 |
} |
|
71 |
|
|
72 |
} |
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.app/org.gvsig.raster.app.mainplugin/src/main/java/org/gvsig/raster/app/mainplugin/BandsPropertiesPage.java | ||
---|---|---|
48 | 48 |
|
49 | 49 |
@Override |
50 | 50 |
public int getPriority() { |
51 |
return 1000;
|
|
51 |
return 600;
|
|
52 | 52 |
} |
53 | 53 |
|
54 | 54 |
@Override |
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.app/org.gvsig.raster.app.mainplugin/src/main/java/org/gvsig/raster/app/mainplugin/TransparencyPropertiesPage.java | ||
---|---|---|
48 | 48 |
|
49 | 49 |
@Override |
50 | 50 |
public int getPriority() { |
51 |
return 1000;
|
|
51 |
return 550;
|
|
52 | 52 |
} |
53 | 53 |
|
54 | 54 |
@Override |
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.app/org.gvsig.raster.app.mainplugin/src/main/java/org/gvsig/raster/app/mainplugin/LayerPropertiesExtension.java | ||
---|---|---|
87 | 87 |
} |
88 | 88 |
|
89 | 89 |
public boolean isEnabled() { |
90 |
ApplicationManager application = ApplicationLocator.getManager(); |
|
91 |
|
|
92 |
IView view = (IView) application.getActiveComponent(ViewDocument.class); |
|
93 |
if (view == null) { |
|
94 |
return false; |
|
95 |
} |
|
96 |
ViewDocument document = view.getViewDocument(); |
|
97 |
MapContext mapContext = document.getMapContext(); |
|
98 |
mapContext.getLayers(); |
|
99 |
FLayer[] activeLayers = mapContext.getLayers().getActives(); |
|
100 |
|
|
101 |
return (activeLayers.length>0); |
|
90 |
return false; |
|
91 |
// ApplicationManager application = ApplicationLocator.getManager(); |
|
92 |
// |
|
93 |
// IView view = (IView) application.getActiveComponent(ViewDocument.class); |
|
94 |
// if (view == null) { |
|
95 |
// return false; |
|
96 |
// } |
|
97 |
// ViewDocument document = view.getViewDocument(); |
|
98 |
// MapContext mapContext = document.getMapContext(); |
|
99 |
// mapContext.getLayers(); |
|
100 |
// FLayer[] activeLayers = mapContext.getLayers().getActives(); |
|
101 |
// |
|
102 |
// return (activeLayers.length>0); |
|
102 | 103 |
} |
103 | 104 |
|
104 | 105 |
public boolean isVisible() { |
105 |
ApplicationManager application = ApplicationLocator.getManager();
|
|
106 |
return false;
|
|
106 | 107 |
|
107 |
IView view = (IView) application.getActiveComponent(ViewDocument.class); |
|
108 |
if (view == null) { |
|
109 |
return false; |
|
110 |
} |
|
111 |
ViewDocument document = view.getViewDocument(); |
|
112 |
MapContext mapContext = document.getMapContext(); |
|
113 |
mapContext.getLayers(); |
|
114 |
FLayer[] activeLayers = mapContext.getLayers().getActives(); |
|
115 |
|
|
116 |
return (activeLayers.length>0); |
|
108 |
// ApplicationManager application = ApplicationLocator.getManager(); |
|
109 |
// |
|
110 |
// IView view = (IView) application.getActiveComponent(ViewDocument.class); |
|
111 |
// if (view == null) { |
|
112 |
// return false; |
|
113 |
// } |
|
114 |
// ViewDocument document = view.getViewDocument(); |
|
115 |
// MapContext mapContext = document.getMapContext(); |
|
116 |
// mapContext.getLayers(); |
|
117 |
// FLayer[] activeLayers = mapContext.getLayers().getActives(); |
|
118 |
// |
|
119 |
// return (activeLayers.length>0); |
|
117 | 120 |
} |
118 | 121 |
|
119 | 122 |
} |
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.app/org.gvsig.raster.app.mainplugin/src/main/java/org/gvsig/raster/app/mainplugin/StatisticsPage.java | ||
---|---|---|
51 | 51 |
|
52 | 52 |
@Override |
53 | 53 |
public int getPriority() { |
54 |
return 900;
|
|
54 |
return 500;
|
|
55 | 55 |
} |
56 | 56 |
|
57 | 57 |
@Override |
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.app/org.gvsig.raster.app.mainplugin/src/main/java/org/gvsig/raster/app/mainplugin/RasterExtension.java | ||
---|---|---|
27 | 27 |
@Override |
28 | 28 |
public void postInitialize() { |
29 | 29 |
super.postInitialize(); |
30 |
AddLayer.addWizard(FilesystemExplorerWizardPanel.class); |
|
30 |
// AddLayer.addWizard(FilesystemExplorerWizardPanel.class);
|
|
31 | 31 |
|
32 | 32 |
//Properties pages register |
33 | 33 |
|
34 | 34 |
PropertiesPageManager propertiesPageManager = MapControlLocator.getPropertiesPageManager(); |
35 |
propertiesPageManager.registerFactory(new InformationLayerPropertiesPageFactory()); |
|
36 | 35 |
propertiesPageManager.registerFactory(new StatisticsPageFactory()); |
37 |
propertiesPageManager.registerFactory(new RangeScaleLayerPropertiesPageFactory()); |
|
38 | 36 |
propertiesPageManager.registerFactory(new TransparencyLayerPropertiesPageFactory()); |
39 | 37 |
propertiesPageManager.registerFactory(new BandsLayerPropertiesPageFactory()); |
40 | 38 |
|
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.app/org.gvsig.raster.app.mainplugin/src/main/resources-plugin/config.xml | ||
---|---|---|
8 | 8 |
description="Support to raster" active="true" priority="1"> |
9 | 9 |
</extension> |
10 | 10 |
|
11 |
<extension |
|
12 |
class-name="org.gvsig.raster.app.mainplugin.AddTestRasterLayerExtension" |
|
11 |
<extension class-name="org.gvsig.raster.app.mainplugin.AddTestRasterLayerExtension" |
|
13 | 12 |
description="Add test raster layer extension" active="true" priority="25"> |
14 |
<action |
|
15 |
name="view-test-layer-add" label="Add_test_layer" |
|
16 |
tooltip="Add_test_layer" |
|
17 |
action-command="view-test-layer-add" |
|
18 |
icon="view-test-layer-add" |
|
19 |
position="650300005" |
|
20 |
/> |
|
13 |
<action name="view-test-layer-add" label="Add_test_layer" tooltip="Add_test_layer" |
|
14 |
action-command="view-test-layer-add" icon="view-test-layer-add" |
|
15 |
position="650300005" /> |
|
21 | 16 |
|
22 |
<menu |
|
23 |
name="view-test-layer-add" |
|
24 |
text="View/Add_test_layer" |
|
25 |
/> |
|
17 |
<menu name="view-test-layer-add" text="View/Add_test_layer" /> |
|
26 | 18 |
<tool-bar name="view" position="30015"> |
27 | 19 |
<action-tool name="view-test-layer-add" /> |
28 | 20 |
</tool-bar> |
... | ... | |
30 | 22 |
</extension> |
31 | 23 |
|
32 | 24 |
|
33 |
<extension class-name="org.gvsig.raster.app.mainplugin.LayerPropertiesExtension" |
|
34 |
description="" |
|
35 |
active="true"> |
|
25 |
<!-- <extension class-name="org.gvsig.raster.app.mainplugin.LayerPropertiesExtension" |
|
26 |
description="" active="true"> |
|
36 | 27 |
|
37 |
<action |
|
38 |
name="raster-layer-properties" |
|
39 |
label="propiedades2" |
|
40 |
tooltip="_Layer_properties" |
|
41 |
position="609000000" |
|
42 |
action-command="layer-properties" |
|
43 |
icon="layer-properties" |
|
44 |
accelerator="" |
|
45 |
/> |
|
28 |
<action name="raster-layer-properties" label="propiedades2" |
|
29 |
tooltip="_Layer_properties" position="609000000" action-command="layer-properties" |
|
30 |
icon="layer-properties" accelerator="" /> |
|
46 | 31 |
|
47 |
<menu |
|
48 |
name="raster-layer-properties" |
|
49 |
text="Layer/propiedades2" |
|
50 |
/> |
|
32 |
<menu name="raster-layer-properties" text="Layer/propiedades2" /> |
|
51 | 33 |
|
52 |
</extension>
|
|
34 |
</extension> -->
|
|
53 | 35 |
|
54 | 36 |
|
55 | 37 |
</extensions> |
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.fmap.dal.raster/org.gvsig.fmap.dal.raster.impl/src/main/java/org/gvsig/fmap/dal/raster/impl/DefaultRasterStore.java | ||
---|---|---|
44 | 44 |
import org.gvsig.fmap.dal.DataStore; |
45 | 45 |
import org.gvsig.fmap.dal.DataStoreNotification; |
46 | 46 |
import org.gvsig.fmap.dal.DataStoreParameters; |
47 |
import org.gvsig.fmap.dal.DataStoreProviderFactory; |
|
47 | 48 |
import org.gvsig.fmap.dal.exception.CloneException; |
48 | 49 |
import org.gvsig.fmap.dal.exception.DataException; |
49 | 50 |
import org.gvsig.fmap.dal.exception.InitializeException; |
... | ... | |
984 | 985 |
} |
985 | 986 |
return false; |
986 | 987 |
} |
988 |
|
|
989 |
public DataStoreProviderFactory getFactory() { |
|
990 |
DataStoreProviderFactory factory = dataManager.getStoreProviderFactory(parameters.getDataStoreName()); |
|
991 |
return factory; |
|
992 |
} |
|
987 | 993 |
} |
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.fmap.mapcontext.raster/org.gvsig.fmap.mapcontext.raster.impl/src/main/java/org/gvsig/fmap/mapcontext/raster/impl/DefaultRasterLayer.java | ||
---|---|---|
55 | 55 |
import org.gvsig.fmap.dal.raster.api.RasterSet; |
56 | 56 |
import org.gvsig.fmap.dal.raster.api.RasterStore; |
57 | 57 |
import org.gvsig.fmap.dal.raster.api.RasterStoreNotification; |
58 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemStoreParameters; |
|
58 | 59 |
import org.gvsig.fmap.geom.Geometry.SUBTYPES; |
59 | 60 |
import org.gvsig.fmap.geom.GeometryLocator; |
60 | 61 |
import org.gvsig.fmap.geom.GeometryManager; |
61 | 62 |
import org.gvsig.fmap.geom.exception.CreateEnvelopeException; |
62 | 63 |
import org.gvsig.fmap.geom.primitive.Envelope; |
64 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
|
63 | 65 |
import org.gvsig.fmap.mapcontext.ViewPort; |
64 | 66 |
import org.gvsig.fmap.mapcontext.exceptions.LegendLayerException; |
65 | 67 |
import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException; |
66 | 68 |
import org.gvsig.fmap.mapcontext.layers.FLayerStatus; |
67 | 69 |
import org.gvsig.fmap.mapcontext.layers.FLayers; |
68 | 70 |
import org.gvsig.fmap.mapcontext.layers.FLyrDefault; |
71 |
import org.gvsig.fmap.mapcontext.layers.LayerInformationBuilder; |
|
69 | 72 |
import org.gvsig.fmap.mapcontext.raster.api.RasterLayer; |
70 | 73 |
import org.gvsig.fmap.mapcontext.raster.api.RasterLegendChangedListener; |
71 | 74 |
import org.gvsig.fmap.mapcontext.rendering.legend.ILegend; |
... | ... | |
509 | 512 |
|
510 | 513 |
@Override |
511 | 514 |
public String getInfoString() { |
512 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
513 |
|
|
514 |
StringBuilder builder = new StringBuilder(); |
|
515 |
builder.append("<!DOCTYPE html>\n"); |
|
516 |
builder.append("<html>\n"); |
|
517 |
builder.append("<head>\n"); |
|
518 |
builder.append("<title>Layer information</title>\n"); |
|
519 |
builder.append("</head>\n"); |
|
520 |
builder.append("<body>\n"); |
|
521 |
builder.append("<h1>"+StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("_layer_information"))+"</h1>\n"); |
|
522 |
builder.append("<table>\n"); |
|
523 |
builder.append("<tr>\n"); |
|
524 |
builder.append("<td>"+StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("_name"))+":"+"</td>\n"); |
|
525 |
builder.append("<td>"+StringEscapeUtils.escapeHtml4(this.getName())+"</td>\n"); |
|
526 |
builder.append("</tr>\n"); |
|
527 |
builder.append("<tr>\n"); |
|
528 |
builder.append("<td>"+StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("projection"))+":"+"</td>\n"); |
|
529 |
builder.append("<td>"+StringEscapeUtils.escapeHtml4(this.getProjection().getAbrev())+"</td>\n"); |
|
530 |
builder.append("</tr>\n"); |
|
531 |
builder.append("<tr>\n"); |
|
532 |
builder.append("<td>"+StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("transparency"))+":"+"</td>\n"); |
|
533 |
builder.append("<td>"+this.getTransparency()+"</td>\n"); |
|
534 |
builder.append("</tr>\n"); |
|
535 |
builder.append("</table>\n"); |
|
536 |
|
|
537 | 515 |
RasterStore rasterStore = this.getRasterStore(); |
538 |
builder.append("<h2>"+StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("_store_information"))+"</h2>\n");
|
|
516 |
Envelope envelope = null;
|
|
539 | 517 |
try { |
540 |
Envelope envelope = rasterStore.getEnvelope(); |
|
541 |
builder.append("<h3>"+StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("_envelope"))+"</h3>\n"); |
|
542 |
//FIXME: Decidir c?mo preferimos mostrar el envelope, como una tabla o como una lista de valores |
|
543 |
// builder.append("<table>\n"); |
|
544 |
// |
|
545 |
// envelope.getDimension(); |
|
546 |
// for (int i = 0; i < envelope.getDimension(); i++) { |
|
547 |
// builder.append("<tr>\n"); |
|
548 |
// builder.append("<td>"+StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("dimension"))+"</td>\n"); |
|
549 |
// builder.append("<td>"+i+"</td>"); |
|
550 |
// builder.append("<td>"+StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("min"))+": </td>\n"); |
|
551 |
// builder.append("<td>"+envelope.getMinimum(i)+"</td>\n"); |
|
552 |
// builder.append("</tr>\n"); |
|
553 |
// builder.append("<tr>\n"); |
|
554 |
// builder.append("<td>"+StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("dimension"))+"</td>\n"); |
|
555 |
// builder.append("<td>"+i+"</td>"); |
|
556 |
// builder.append("<td>"+StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("max"))+": </td>\n"); |
|
557 |
// builder.append("<td>"+envelope.getMaximum(i)+"</td>\n"); |
|
558 |
// builder.append("</tr>\n"); |
|
559 |
// } |
|
560 |
// builder.append("</table>\n"); |
|
561 |
|
|
562 |
builder.append("<table>\n"); |
|
563 |
builder.append("<tr>\n"); |
|
564 |
|
|
565 |
builder.append("<th scope=\"col\">"+StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("dimension"))+"</th>\n"); |
|
566 |
builder.append("<th scope=\"col\">"+StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("min"))+"</th>\n"); |
|
567 |
builder.append("<th scope=\"col\">"+StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("max"))+"</th>\n"); |
|
568 |
builder.append("</tr>\n"); |
|
569 |
for (int i = 0; i < envelope.getDimension(); i++) { |
|
570 |
builder.append("<tr>\n"); |
|
571 |
builder.append("<td>"+i+"</td>"); |
|
572 |
builder.append("<td>"+envelope.getMinimum(i)+"</td>\n"); |
|
573 |
builder.append("<td>"+envelope.getMaximum(i)+"</td>\n"); |
|
574 |
builder.append("</tr>\n"); |
|
575 |
} |
|
576 |
|
|
577 |
builder.append("</table>\n"); |
|
578 |
|
|
518 |
envelope = rasterStore.getEnvelope(); |
|
579 | 519 |
} catch (LocatorException | DataException | CreateEnvelopeException e) { |
580 |
logger.warn("Can't get envelope from the store", e); |
|
581 | 520 |
} |
582 |
|
|
583 | 521 |
int bands = rasterStore.getBands(); |
584 |
builder.append("<h4>"+StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("_bands"))+"</h4>\n"); |
|
585 |
for (int i = 0; i < bands; i++) { |
|
586 |
builder.append("<h5>" + StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("_band")) + " " + i + "</h5>\n"); |
|
522 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
523 |
LayerInformationBuilder builder = MapContextLocator.getMapContextManager().createLayerInformationBuilder(); |
|
587 | 524 |
|
588 |
BandDescriptor bandDescriptor = rasterStore.getBandDescriptor(i); |
|
589 |
if (bandDescriptor.size() > 0) { |
|
590 |
builder |
|
591 |
.append("<h6>" + StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("_band_attributes")) + "</h6>\n"); |
|
525 |
builder.title().labelkey("Data_source"); |
|
526 |
builder.property().labelkey("Source_type").value(store.getProviderName()); |
|
527 |
builder.property().labelkey("origen").value(store.getFullName()); |
|
528 |
if( store.getParameters() instanceof FilesystemStoreParameters ) { |
|
529 |
File f = ((FilesystemStoreParameters)(store.getParameters())).getFile(); |
|
530 |
if( f!=null ) { |
|
531 |
builder.property().labelkey("_Size").value("%d bytes", f.length()); |
|
532 |
} |
|
533 |
} |
|
592 | 534 |
|
593 |
builder.append("<table>\n"); |
|
594 |
builder.append("<tr>\n"); |
|
595 |
builder.append("<td>" + StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("_name")) + ":" + "</td>\n"); |
|
596 |
builder.append("<td>" + StringEscapeUtils.escapeHtml4(bandDescriptor.getName()) + "</td>\n"); |
|
597 |
builder.append("</tr>\n"); |
|
535 |
builder.property().labelkey("_bands").value("%d",bands); |
|
536 |
builder.property().labelkey("transparency").value("%d",this.getTransparency()); |
|
598 | 537 |
|
599 |
builder.append("<tr>\n"); |
|
600 |
builder.append("<td>" + StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("_description")) + ":" + "</td>\n"); |
|
601 |
builder.append("<td>" + StringEscapeUtils.escapeHtml4(bandDescriptor.getDescription()) + "</td>\n"); |
|
602 |
builder.append("</tr>\n"); |
|
538 |
builder.title().labelkey("_Coordenadas_geograficas"); |
|
539 |
builder.envelope().value(envelope); |
|
603 | 540 |
|
604 |
builder.append("<tr>\n"); |
|
605 |
builder.append("<td>" + StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("_dataType")) + ":" + "</td>\n"); |
|
606 |
builder.append("<td>" + StringEscapeUtils.escapeHtml4(BufferLocator.getBufferManager().getTypeName(bandDescriptor.getDataType())) + "</td>\n"); |
|
607 |
builder.append("</tr>\n"); |
|
541 |
builder.title().labelkey("_Projection"); |
|
542 |
builder.property().value(this.getProjection()); |
|
543 |
builder.text().asWKT(this.getProjection()); |
|
608 | 544 |
|
609 |
builder.append("<tr>\n");
|
|
610 |
builder.append("<td>" + StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("_noData")) + ":" + "</td>\n");
|
|
545 |
for (int i = 0; i < bands; i++) {
|
|
546 |
builder.title().labelkey(i18nManager.getTranslation("_band")+" "+i);
|
|
611 | 547 |
|
612 |
if (bandDescriptor.getNoData() != null) { |
|
613 |
builder.append("<td>" + StringEscapeUtils.escapeHtml4(bandDescriptor.getNoData().toString()) + "</td>\n"); |
|
614 |
} else { |
|
615 |
builder.append("<td>" + StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("_null")) |
|
616 |
+ "</td>\n"); |
|
617 |
} |
|
548 |
BandDescriptor bandDescriptor = rasterStore.getBandDescriptor(i); |
|
618 | 549 |
|
619 |
builder.append("</tr>\n"); |
|
550 |
builder.property().labelkey("_name").value(bandDescriptor.getName()); |
|
551 |
builder.property().labelkey("_description").value(bandDescriptor.getDescription()); |
|
552 |
builder.property().labelkey("_dataType").value(BufferLocator.getBufferManager().getTypeName(bandDescriptor.getDataType())); |
|
620 | 553 |
|
621 | 554 |
|
555 |
if (bandDescriptor.getNoData() != null) { |
|
556 |
builder.property().labelkey("_noData").value(bandDescriptor.getNoData().toString()); |
|
557 |
} else { |
|
558 |
builder.property().labelkey("_noData").value(i18nManager.getTranslation("_null")); |
|
559 |
} |
|
622 | 560 |
|
623 |
builder.append("<table>\n"); |
|
624 |
for (BandAttributeDescriptor bandAttributeDescriptor : bandDescriptor) { |
|
625 |
builder.append("<tr>\n"); |
|
626 |
builder.append("<td>" + StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("_name")) + ":" + "</td>\n"); |
|
627 |
builder.append("<td>" + StringEscapeUtils.escapeHtml4(bandAttributeDescriptor.getName()) + "</td>\n"); |
|
628 |
builder.append("</tr>\n"); |
|
561 |
for (BandAttributeDescriptor bandAttributeDescriptor : bandDescriptor) { |
|
562 |
builder.property().labelkey("_name").value(bandAttributeDescriptor.getName()); |
|
563 |
builder.property().labelkey("_description").value(bandAttributeDescriptor.getDescription()); |
|
564 |
builder.property().labelkey("_units").value(bandAttributeDescriptor.getUnits()); |
|
629 | 565 |
|
630 |
builder.append("<tr>\n"); |
|
631 |
builder.append("<td>" + StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("_description")) + ":" |
|
632 |
+ "</td>\n"); |
|
633 |
builder.append("<td>" + StringEscapeUtils.escapeHtml4(bandAttributeDescriptor.getDescription()) + "</td>\n"); |
|
634 |
builder.append("</tr>\n"); |
|
566 |
builder.title().labelkey("_values"); |
|
635 | 567 |
|
636 |
builder.append("<tr>\n"); |
|
637 |
builder |
|
638 |
.append("<td>" + StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("_units")) + ":" + "</td>\n"); |
|
639 |
builder.append("<td>" + StringEscapeUtils.escapeHtml4(bandAttributeDescriptor.getUnits()) + "</td>\n"); |
|
640 |
builder.append("</tr>\n"); |
|
568 |
List<Object> attributeValues = bandAttributeDescriptor.getAvailableValues(); |
|
641 | 569 |
|
642 |
builder.append("<tr>\n"); |
|
643 |
builder.append("<td>" + StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("_values")) + ":" |
|
644 |
+ "</td>\n"); |
|
645 |
List<Object> attributeValues = bandAttributeDescriptor.getAvailableValues(); |
|
646 |
|
|
647 |
for (Object value : attributeValues) { |
|
648 |
if (value != null) { |
|
649 |
builder.append("<td>" + StringEscapeUtils.escapeHtml4(value.toString()) + "</td>\n"); |
|
650 |
} else { |
|
651 |
builder.append("<td>" + StringEscapeUtils.escapeHtml4(i18nManager.getTranslation("_null")) |
|
652 |
+ "</td>\n"); |
|
653 |
} |
|
570 |
for (Object value : attributeValues) { |
|
571 |
if (value != null) { |
|
572 |
builder.property().labelkey("_units").value(bandAttributeDescriptor.getUnits()); |
|
573 |
} else { |
|
574 |
builder.property().labelkey("_units").value(bandAttributeDescriptor.getUnits()); |
|
654 | 575 |
} |
655 |
builder.append("</tr>\n"); |
|
656 | 576 |
} |
657 | 577 |
} |
658 |
builder.append("</table>\n"); |
|
659 |
|
|
660 |
|
|
661 |
|
|
662 | 578 |
} |
663 | 579 |
|
664 |
builder.append("</body>\n"); |
|
665 |
builder.append("</html>"); |
|
666 |
|
|
667 |
return builder.toString(); //super.getInfoString(); |
|
580 |
return builder.toString(); |
|
668 | 581 |
} |
669 | 582 |
|
670 | 583 |
private String dataTypeString(int dataType) { |
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.gdal/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"> |
|
1 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
2 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
2 | 3 |
<modelVersion>4.0.0</modelVersion> |
4 |
<!-- <parent> |
|
5 |
<groupId>org.gvsig</groupId> |
|
6 |
<artifactId>org.gvsig.desktop</artifactId> |
|
7 |
<version>2.0.173</version> |
|
8 |
</parent> --> |
|
3 | 9 |
<parent> |
4 | 10 |
<groupId>org.gvsig</groupId> |
5 | 11 |
<artifactId>org.gvsig.raster</artifactId> |
... | ... | |
8 | 14 |
<artifactId>org.gvsig.raster.gdal</artifactId> |
9 | 15 |
<packaging>pom</packaging> |
10 | 16 |
<name>org.gvsig.raster.gdal</name> |
17 |
|
|
18 |
<scm> |
|
19 |
<connection>scm:svn:https://devel.gvsig.org/svn/gvsig-rasterXXX/org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster</connection> |
|
20 |
<developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-rasterXXX/org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster</developerConnection> |
|
21 |
<url>https://devel.gvsig.org/redmine/projects/gvsig-rasterXXX/repository/show/org.gvsig.raster/trunk/org.gvsig.raster</url> |
|
22 |
</scm> |
|
23 |
|
|
24 |
<distributionManagement> |
|
25 |
<site> |
|
26 |
<id>gvsig-repository</id> |
|
27 |
<url>dav:https://devel.gvsig.org/sites/${project.artifactId}/${project.version}</url> |
|
28 |
</site> |
|
29 |
</distributionManagement> |
|
30 |
|
|
31 |
<build> |
|
32 |
<plugins> |
|
33 |
<plugin> |
|
34 |
<groupId>org.apache.maven.plugins</groupId> |
|
35 |
<artifactId>maven-release-plugin</artifactId> |
|
36 |
<configuration> |
|
37 |
<tagBase>https://devel.gvsig.org/svn/gvsig-rasterXXX/org.gvsig.raster/tags</tagBase> |
|
38 |
</configuration> |
|
39 |
</plugin> |
|
40 |
</plugins> |
|
41 |
</build> |
|
42 |
|
|
43 |
<repositories> |
|
44 |
<repository> |
|
45 |
<id>gvsig-public-http-repository</id> |
|
46 |
<name>gvSIG maven public HTTP repository</name> |
|
47 |
<url>http://devel.gvsig.org/m2repo/j2se</url> |
|
48 |
<releases> |
|
49 |
<enabled>true</enabled> |
|
50 |
<updatePolicy>daily</updatePolicy> |
|
51 |
<checksumPolicy>warn</checksumPolicy> |
|
52 |
</releases> |
|
53 |
<snapshots> |
|
54 |
<enabled>true</enabled> |
|
55 |
<updatePolicy>daily</updatePolicy> |
|
56 |
<checksumPolicy>warn</checksumPolicy> |
|
57 |
</snapshots> |
|
58 |
</repository> |
|
59 |
</repositories> |
|
60 |
|
|
61 |
<dependencyManagement> |
|
62 |
<dependencies> |
|
63 |
<dependency> |
|
64 |
<groupId>org.gvsig</groupId> |
|
65 |
<artifactId>org.gvsig.gdal</artifactId> |
|
66 |
<version>${org.gvsig.gdal.version}</version> |
|
67 |
<type>pom</type> |
|
68 |
<scope>import</scope> |
|
69 |
</dependency> |
|
70 |
<!-- <dependency> |
|
71 |
<groupId>org.gvsig</groupId> |
|
72 |
<artifactId>org.gvsig.raster</artifactId> |
|
73 |
<version>${org.gvsig.raster.version}</version> |
|
74 |
<type>pom</type> |
|
75 |
<scope>import</scope> |
|
76 |
</dependency> --> |
|
77 |
</dependencies> |
|
78 |
</dependencyManagement> |
|
79 |
|
|
80 |
<properties> |
|
81 |
<org.gvsig.gdal.version>1.0.32</org.gvsig.gdal.version> |
|
82 |
<org.gvsig.raster.version>2.4.1-SNAPSHOT</org.gvsig.raster.version> |
|
83 |
</properties> |
|
84 |
|
|
11 | 85 |
<modules> |
12 |
<module>org.gvsig.raster.gdal.app</module> |
|
13 |
<module>org.gvsig.raster.gdal.provider</module> |
|
14 |
<module>org.gvsig.raster.gdal.provider.legend</module> |
|
86 |
<module>org.gvsig.raster.gdal.app</module>
|
|
87 |
<module>org.gvsig.raster.gdal.provider</module>
|
|
88 |
<module>org.gvsig.raster.gdal.provider.legend</module>
|
|
15 | 89 |
</modules> |
90 |
|
|
16 | 91 |
</project> |
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.swing/org.gvsig.raster.swing.impl/src/main/java/org/gvsig/raster/swing/impl/InformationPanelController.java | ||
---|---|---|
1 |
/* gvSIG. Desktop Geographic Information System. |
|
2 |
* |
|
3 |
* Copyright ? 2007-2017 gvSIG Association |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 |
* MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us |
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.raster.swing.impl; |
|
24 |
|
|
25 |
import java.util.Locale; |
|
26 |
|
|
27 |
import javax.swing.JComponent; |
|
28 |
|
|
29 |
import org.slf4j.Logger; |
|
30 |
import org.slf4j.LoggerFactory; |
|
31 |
|
|
32 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
33 |
import org.gvsig.raster.swing.api.InformationPanel; |
|
34 |
import org.gvsig.tools.ToolsLocator; |
|
35 |
import org.gvsig.tools.i18n.I18nManager; |
|
36 |
|
|
37 |
|
|
38 |
/** |
|
39 |
* @author fdiaz |
|
40 |
* |
|
41 |
*/ |
|
42 |
public class InformationPanelController extends InformationPanelView implements InformationPanel{ |
|
43 |
|
|
44 |
/** |
|
45 |
* |
|
46 |
*/ |
|
47 |
private static final long serialVersionUID = 2386492505441108866L; |
|
48 |
|
|
49 |
@SuppressWarnings("unused") |
|
50 |
private static final Logger LOG = LoggerFactory.getLogger(InformationPanelController.class); |
|
51 |
|
|
52 |
// FLayer layer; |
|
53 |
|
|
54 |
|
|
55 |
/** |
|
56 |
* @param layer |
|
57 |
*/ |
|
58 |
public InformationPanelController() { |
|
59 |
translate(); |
|
60 |
} |
|
61 |
|
|
62 |
private void translate() { |
|
63 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
64 |
txtFieldName.setToolTipText(i18nManager.getTranslation(txtFieldName.getToolTipText())); |
|
65 |
nameLabel.setText(i18nManager.getTranslation(nameLabel.getText())); |
|
66 |
txtAreaInformation.setToolTipText(i18nManager.getTranslation(txtAreaInformation.getToolTipText())); |
|
67 |
informationLabel.setText(i18nManager.getTranslation(informationLabel.getText())); |
|
68 |
} |
|
69 |
|
|
70 |
/** |
|
71 |
* @param locale |
|
72 |
* |
|
73 |
*/ |
|
74 |
public void setLocate(Locale locale) { |
|
75 |
Locale l = super.getLocale(); |
|
76 |
if (!l.equals(locale)) { |
|
77 |
translate(); |
|
78 |
} |
|
79 |
super.setLocale(locale); |
|
80 |
} |
|
81 |
|
|
82 |
/** |
|
83 |
* @param layer |
|
84 |
*/ |
|
85 |
public void set(FLayer layer){ |
|
86 |
// this.layer = layer; |
|
87 |
txtFieldName.setText(layer.getName()); |
|
88 |
txtAreaInformation.setText(layer.getInfoString()); |
|
89 |
} |
|
90 |
|
|
91 |
/** |
|
92 |
* @param layer |
|
93 |
*/ |
|
94 |
public boolean fetch(FLayer layer){ |
|
95 |
layer.setName(txtFieldName.getText()); |
|
96 |
layer.getMapContext().invalidate(); |
|
97 |
return true; |
|
98 |
} |
|
99 |
|
|
100 |
@Override |
|
101 |
public JComponent asJComponent() { |
|
102 |
return this; |
|
103 |
} |
|
104 |
|
|
105 |
} |
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.swing/org.gvsig.raster.swing.impl/src/main/java/org/gvsig/raster/swing/impl/InformationPanelView.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/paco/projects/externals/gvsig-desktop/RasterRefactoring/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.swing/org.gvsig.raster.swing.impl/src/main/java/org/gvsig/raster/swing/impl/InformationPanelView.xml</at> |
|
28 |
<at name="rowspecs">CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:GROW(1.0),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">3</at> |
|
40 |
<at name="colspan">1</at> |
|
41 |
<at name="rowspan">1</at> |
|
42 |
<at name="halign">fill</at> |
|
43 |
<at name="valign">fill</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">txtFieldName</at> |
|
77 |
<at name="width">868</at> |
|
78 |
<at name="toolTipText">_name</at> |
|
79 |
<at name="height">20</at> |
|
80 |
</object> |
|
81 |
</at> |
|
82 |
</object> |
|
83 |
</at> |
|
84 |
</object> |
|
85 |
</at> |
|
86 |
</item> |
|
87 |
<item > |
|
88 |
<at name="value"> |
|
89 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
90 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
91 |
<at name="cellconstraints"> |
|
92 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
93 |
<at name="column">2</at> |
|
94 |
<at name="row">6</at> |
|
95 |
<at name="colspan">1</at> |
|
96 |
<at name="rowspan">1</at> |
|
97 |
<at name="halign">fill</at> |
|
98 |
<at name="valign">fill</at> |
|
99 |
<at name="insets" object="insets">0,0,0,0</at> |
|
100 |
</object> |
|
101 |
</at> |
|
102 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
103 |
</super> |
|
104 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
105 |
<at name="beanclass">javax.swing.JEditorPane</at> |
|
106 |
<at name="beanproperties"> |
|
107 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
108 |
<at name="classname">javax.swing.JEditorPane</at> |
|
109 |
<at name="properties"> |
|
110 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
111 |
<at name="border"> |
|
112 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
113 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
114 |
<at name="name">border</at> |
|
115 |
</super> |
|
116 |
<at name="borders"> |
|
117 |
<object classname="java.util.LinkedList"> |
|
118 |
<item > |
|
119 |
<at name="value"> |
|
120 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
121 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
122 |
<at name="name">border</at> |
|
123 |
</super> |
|
124 |
</object> |
|
125 |
</at> |
|
126 |
</item> |
|
127 |
</object> |
|
128 |
</at> |
|
129 |
</object> |
|
130 |
</at> |
|
131 |
<at name="selectionStart">1</at> |
|
132 |
<at name="editable">false</at> |
|
133 |
<at name="scrollableTracksViewportHeight">true</at> |
|
134 |
<at name="scrollableTracksViewportWidth">true</at> |
|
135 |
<at name="selectionEnd">1</at> |
|
136 |
<at name="name">txtAreaInformation</at> |
|
137 |
<at name="width">866</at> |
|
138 |
<at name="text"><html> |
|
139 |
<head> |
|
140 |
|
|
141 |
</head> |
|
142 |
<body> |
|
143 |
</body> |
|
144 |
</html> |
|
145 |
</at> |
|
146 |
<at name="contentType">text/html</at> |
|
147 |
<at name="scollBars"> |
|
148 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
149 |
<at name="name">scollBars</at> |
|
150 |
<at name="verticalpolicy">20</at> |
|
151 |
<at name="horizontalpolicy">30</at> |
|
152 |
<at name="border"> |
|
153 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
154 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
155 |
<at name="name">border</at> |
|
156 |
</super> |
|
157 |
<at name="borders"> |
|
158 |
<object classname="java.util.LinkedList"> |
|
159 |
<item > |
|
160 |
<at name="value"> |
|
161 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
162 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
163 |
<at name="name">border</at> |
|
164 |
</super> |
|
165 |
</object> |
|
166 |
</at> |
|
167 |
</item> |
|
168 |
</object> |
|
169 |
</at> |
|
170 |
</object> |
|
171 |
</at> |
|
172 |
</object> |
|
173 |
</at> |
|
174 |
<at name="toolTipText">_information</at> |
|
175 |
<at name="height">484</at> |
|
176 |
</object> |
|
177 |
</at> |
|
178 |
</object> |
|
179 |
</at> |
|
180 |
</object> |
|
181 |
</at> |
|
182 |
</item> |
|
183 |
<item > |
|
184 |
<at name="value"> |
|
185 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
186 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
187 |
<at name="cellconstraints"> |
|
188 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
189 |
<at name="column">2</at> |
|
190 |
<at name="row">5</at> |
|
191 |
<at name="colspan">1</at> |
|
192 |
<at name="rowspan">1</at> |
|
193 |
<at name="halign">default</at> |
|
194 |
<at name="valign">default</at> |
|
195 |
<at name="insets" object="insets">0,0,0,0</at> |
|
196 |
</object> |
|
197 |
</at> |
|
198 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
199 |
</super> |
|
200 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
201 |
<at name="beanclass">com.jeta.forms.components.separator.TitledSeparator</at> |
|
202 |
<at name="beanproperties"> |
|
203 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
204 |
<at name="classname">com.jeta.forms.components.separator.TitledSeparator</at> |
|
205 |
<at name="properties"> |
|
206 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
207 |
<at name="border"> |
|
208 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
209 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
210 |
<at name="name">border</at> |
|
211 |
</super> |
|
212 |
<at name="borders"> |
|
213 |
<object classname="java.util.LinkedList"> |
|
214 |
<item > |
|
215 |
<at name="value"> |
|
216 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
217 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
218 |
<at name="name">border</at> |
|
219 |
</super> |
|
220 |
</object> |
|
221 |
</at> |
|
222 |
</item> |
|
223 |
</object> |
|
224 |
</at> |
|
225 |
</object> |
|
226 |
</at> |
|
227 |
<at name="name">informationLabel</at> |
|
228 |
<at name="width">868</at> |
|
229 |
<at name="text">_information</at> |
|
230 |
<at name="height">15</at> |
|
231 |
</object> |
|
232 |
</at> |
|
233 |
</object> |
|
234 |
</at> |
|
235 |
</object> |
|
236 |
</at> |
|
237 |
</item> |
|
238 |
<item > |
|
239 |
<at name="value"> |
|
240 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
241 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
242 |
<at name="cellconstraints"> |
|
243 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
244 |
<at name="column">2</at> |
|
245 |
<at name="row">2</at> |
|
246 |
<at name="colspan">1</at> |
|
247 |
<at name="rowspan">1</at> |
|
248 |
<at name="halign">default</at> |
|
249 |
<at name="valign">default</at> |
|
250 |
<at name="insets" object="insets">0,0,0,0</at> |
|
251 |
</object> |
|
252 |
</at> |
|
253 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
254 |
</super> |
|
255 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
256 |
<at name="beanclass">com.jeta.forms.components.separator.TitledSeparator</at> |
|
257 |
<at name="beanproperties"> |
|
258 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
259 |
<at name="classname">com.jeta.forms.components.separator.TitledSeparator</at> |
|
260 |
<at name="properties"> |
|
261 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
262 |
<at name="border"> |
|
263 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
264 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
265 |
<at name="name">border</at> |
|
266 |
</super> |
|
267 |
<at name="borders"> |
|
268 |
<object classname="java.util.LinkedList"> |
|
269 |
<item > |
|
270 |
<at name="value"> |
|
271 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
272 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
273 |
<at name="name">border</at> |
|
274 |
</super> |
|
275 |
</object> |
|
276 |
</at> |
|
277 |
</item> |
|
278 |
</object> |
|
279 |
</at> |
|
280 |
</object> |
|
281 |
</at> |
|
282 |
<at name="name">nameLabel</at> |
|
283 |
<at name="width">868</at> |
|
284 |
<at name="text">_name</at> |
|
285 |
<at name="height">15</at> |
|
286 |
</object> |
|
287 |
</at> |
|
288 |
</object> |
|
289 |
</at> |
|
290 |
</object> |
|
291 |
</at> |
|
292 |
</item> |
|
293 |
</object> |
|
294 |
</at> |
|
295 |
<at name="properties"> |
|
296 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
297 |
<at name="classname">com.jeta.forms.gui.form.GridView</at> |
|
298 |
<at name="properties"> |
|
299 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
300 |
<at name="border"> |
|
301 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
302 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
303 |
<at name="name">border</at> |
|
304 |
</super> |
|
305 |
<at name="borders"> |
|
306 |
<object classname="java.util.LinkedList"/> |
|
307 |
</at> |
|
308 |
</object> |
|
309 |
</at> |
|
310 |
<at name="name"/> |
|
311 |
<at name="fill"> |
|
312 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
313 |
<at name="name">fill</at> |
|
314 |
</object> |
|
315 |
</at> |
|
316 |
<at name="scollBars"> |
|
317 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
318 |
<at name="name">scollBars</at> |
|
319 |
<at name="verticalpolicy">21</at> |
|
320 |
<at name="horizontalpolicy">31</at> |
|
321 |
<at name="border"> |
|
322 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
323 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
324 |
<at name="name">border</at> |
|
325 |
</super> |
|
326 |
<at name="borders"> |
|
327 |
<object classname="java.util.LinkedList"> |
|
328 |
<item > |
|
329 |
<at name="value"> |
|
330 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
331 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
332 |
<at name="name">border</at> |
|
333 |
</super> |
|
334 |
</object> |
|
335 |
</at> |
|
336 |
</item> |
|
337 |
</object> |
|
338 |
</at> |
|
339 |
</object> |
|
340 |
</at> |
|
341 |
</object> |
|
342 |
</at> |
|
343 |
</object> |
|
344 |
</at> |
|
345 |
</object> |
|
346 |
</at> |
|
347 |
<at name="cellpainters"> |
|
348 |
<object classname="com.jeta.forms.store.support.Matrix"> |
|
349 |
<at name="rows"> |
|
350 |
<object classname="[Ljava.lang.Object;" size="7"> |
|
351 |
<at name="item" index="0"> |
|
352 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
353 |
</at> |
|
354 |
<at name="item" index="1"> |
|
355 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
356 |
</at> |
|
357 |
<at name="item" index="2"> |
|
358 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
359 |
</at> |
|
360 |
<at name="item" index="3"> |
|
361 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
362 |
</at> |
|
363 |
<at name="item" index="4"> |
|
364 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
365 |
</at> |
|
366 |
<at name="item" index="5"> |
|
367 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
368 |
</at> |
|
369 |
<at name="item" index="6"> |
|
370 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
371 |
</at> |
|
372 |
</object> |
|
373 |
</at> |
|
374 |
</object> |
|
375 |
</at> |
|
376 |
<at name="rowgroups"> |
|
377 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
378 |
<at name="groups"> |
|
379 |
<object classname="java.util.HashMap"/> |
|
380 |
</at> |
|
381 |
</object> |
|
382 |
</at> |
|
383 |
<at name="colgroups"> |
|
384 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
385 |
<at name="groups"> |
|
386 |
<object classname="java.util.HashMap"/> |
|
387 |
</at> |
|
388 |
</object> |
|
389 |
</at> |
|
390 |
</object> |
|
391 |
</at> |
|
392 |
</object> |
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.swing/org.gvsig.raster.swing.impl/src/main/java/org/gvsig/raster/swing/impl/InformationPanelView.java | ||
---|---|---|
1 |
package org.gvsig.raster.swing.impl; |
|
2 |
|
|
3 |
import com.jeta.forms.components.separator.TitledSeparator; |
|
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.JEditorPane; |
|
13 |
import javax.swing.JFrame; |
|
14 |
import javax.swing.JPanel; |
|
15 |
import javax.swing.JScrollPane; |
|
16 |
import javax.swing.JTextField; |
|
17 |
|
|
18 |
|
|
19 |
public class InformationPanelView extends JPanel |
|
20 |
{ |
|
21 |
JTextField txtFieldName = new JTextField(); |
|
22 |
JEditorPane txtAreaInformation = new JEditorPane(); |
|
23 |
TitledSeparator informationLabel = new TitledSeparator(); |
|
24 |
TitledSeparator nameLabel = new TitledSeparator(); |
|
25 |
|
|
26 |
/** |
|
27 |
* Default constructor |
|
28 |
*/ |
|
29 |
public InformationPanelView() |
|
30 |
{ |
|
31 |
initializePanel(); |
|
32 |
} |
|
33 |
|
|
34 |
/** |
|
35 |
* Adds fill components to empty cells in the first row and first column of the grid. |
|
36 |
* This ensures that the grid spacing will be the same as shown in the designer. |
|
37 |
* @param cols an array of column indices in the first row where fill components should be added. |
|
38 |
* @param rows an array of row indices in the first column where fill components should be added. |
|
39 |
*/ |
|
40 |
void addFillComponents( Container panel, int[] cols, int[] rows ) |
|
41 |
{ |
|
42 |
Dimension filler = new Dimension(10,10); |
|
43 |
|
|
44 |
boolean filled_cell_11 = false; |
|
45 |
CellConstraints cc = new CellConstraints(); |
|
46 |
if ( cols.length > 0 && rows.length > 0 ) |
|
47 |
{ |
|
48 |
if ( cols[0] == 1 && rows[0] == 1 ) |
|
49 |
{ |
|
50 |
/** add a rigid area */ |
|
51 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,1) ); |
|
52 |
filled_cell_11 = true; |
|
53 |
} |
|
54 |
} |
|
55 |
|
|
56 |
for( int index = 0; index < cols.length; index++ ) |
|
57 |
{ |
|
58 |
if ( cols[index] == 1 && filled_cell_11 ) |
|
59 |
{ |
|
60 |
continue; |
|
61 |
} |
|
62 |
panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) ); |
|
63 |
} |
|
64 |
|
|
65 |
for( int index = 0; index < rows.length; index++ ) |
|
66 |
{ |
|
67 |
if ( rows[index] == 1 && filled_cell_11 ) |
|
68 |
{ |
|
69 |
continue; |
|
70 |
} |
|
71 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) ); |
|
72 |
} |
|
73 |
|
|
74 |
} |
|
75 |
|
|
76 |
/** |
|
77 |
* Helper method to load an image file from the CLASSPATH |
|
78 |
* @param imageName the package and name of the file to load relative to the CLASSPATH |
|
79 |
* @return an ImageIcon instance with the specified image file |
|
80 |
* @throws IllegalArgumentException if the image resource cannot be loaded. |
|
81 |
*/ |
|
82 |
public ImageIcon loadImage( String imageName ) |
|
83 |
{ |
|
84 |
try |
|
85 |
{ |
|
86 |
ClassLoader classloader = getClass().getClassLoader(); |
|
87 |
java.net.URL url = classloader.getResource( imageName ); |
|
88 |
if ( url != null ) |
|
89 |
{ |
|
90 |
ImageIcon icon = new ImageIcon( url ); |
|
91 |
return icon; |
|
92 |
} |
|
93 |
} |
|
94 |
catch( Exception e ) |
|
95 |
{ |
|
96 |
e.printStackTrace(); |
|
97 |
} |
|
98 |
throw new IllegalArgumentException( "Unable to load image: " + imageName ); |
|
99 |
} |
|
100 |
|
|
101 |
/** |
|
102 |
* Method for recalculating the component orientation for |
|
103 |
* right-to-left Locales. |
|
104 |
* @param orientation the component orientation to be applied |
|
105 |
*/ |
|
106 |
public void applyComponentOrientation( ComponentOrientation orientation ) |
|
107 |
{ |
|
108 |
// Not yet implemented... |
|
109 |
// I18NUtils.applyComponentOrientation(this, orientation); |
|
110 |
super.applyComponentOrientation(orientation); |
|
111 |
} |
|
112 |
|
|
113 |
public JPanel createPanel() |
|
114 |
{ |
|
115 |
JPanel jpanel1 = new JPanel(); |
|
116 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE"); |
|
117 |
CellConstraints cc = new CellConstraints(); |
|
118 |
jpanel1.setLayout(formlayout1); |
|
119 |
|
|
120 |
txtFieldName.setName("txtFieldName"); |
|
121 |
txtFieldName.setToolTipText("_name"); |
|
122 |
jpanel1.add(txtFieldName,new CellConstraints(2,3,1,1,CellConstraints.FILL,CellConstraints.FILL)); |
|
123 |
|
|
124 |
txtAreaInformation.setContentType("text/html"); |
|
125 |
txtAreaInformation.setEditable(false); |
|
126 |
txtAreaInformation.setName("txtAreaInformation"); |
|
127 |
txtAreaInformation.setSelectionEnd(1); |
|
128 |
txtAreaInformation.setSelectionStart(1); |
|
129 |
txtAreaInformation.setText("<html>\n <head>\n \n </head>\n <body>\n </body>\n</html>\n"); |
|
130 |
txtAreaInformation.setToolTipText("_information"); |
|
131 |
JScrollPane jscrollpane1 = new JScrollPane(); |
|
132 |
jscrollpane1.setViewportView(txtAreaInformation); |
|
133 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); |
|
134 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); |
|
135 |
jpanel1.add(jscrollpane1,new CellConstraints(2,6,1,1,CellConstraints.FILL,CellConstraints.FILL)); |
|
136 |
|
|
137 |
informationLabel.setName("informationLabel"); |
|
138 |
informationLabel.setText("_information"); |
|
139 |
jpanel1.add(informationLabel,cc.xy(2,5)); |
|
140 |
|
|
141 |
nameLabel.setName("nameLabel"); |
|
142 |
nameLabel.setText("_name"); |
|
143 |
jpanel1.add(nameLabel,cc.xy(2,2)); |
|
144 |
|
|
145 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5,6,7 }); |
|
146 |
return jpanel1; |
|
147 |
} |
|
148 |
|
|
149 |
/** |
|
150 |
* Initializer |
|
151 |
*/ |
|
152 |
protected void initializePanel() |
|
153 |
{ |
|
154 |
setLayout(new BorderLayout()); |
|
155 |
add(createPanel(), BorderLayout.CENTER); |
|
156 |
} |
|
157 |
|
|
158 |
|
|
159 |
} |
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.swing/org.gvsig.raster.swing.impl/src/main/java/org/gvsig/raster/swing/impl/RasterStoreBand.java | ||
---|---|---|
26 | 26 |
import org.slf4j.LoggerFactory; |
27 | 27 |
|
28 | 28 |
import org.gvsig.fmap.dal.exception.DataException; |
29 |
import org.gvsig.fmap.dal.raster.api.BandDescriptor; |
|
30 | 29 |
import org.gvsig.fmap.dal.raster.api.RasterStore; |
31 |
import org.gvsig.raster.lib.buffer.api.BandInfo; |
|
32 | 30 |
import org.gvsig.raster.lib.buffer.api.NoData; |
33 | 31 |
|
34 | 32 |
|
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.swing/org.gvsig.raster.swing.impl/src/main/java/org/gvsig/raster/swing/impl/DefaultRasterSwingManager.java | ||
---|---|---|
52 | 52 |
} |
Also available in: Unified diff