Skip to content

Commit c7784b6

Browse files
committed
remove ImageXmlDataSource.java
1 parent d1ecfe7 commit c7784b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+16221
-911
lines changed

ImageXmlDataSource.java

Lines changed: 0 additions & 911 deletions
This file was deleted.

libsrc/vona/build.xml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
4+
5+
<project basedir="../../" name="vona">
6+
7+
<import file="../../build.xml"/>
8+
9+
<target name="fullvona" depends="init">
10+
<echo message="Classpath=${classpath}" />
11+
<javac
12+
classpath="${classpath}"
13+
debug="true"
14+
source="${srcversion}"
15+
target="${srcversion}"
16+
deprecation="false"
17+
destdir="${compiledir}"
18+
failonerror="${failonerror}"
19+
srcdir="${libsrc}"
20+
fork="${fork}"
21+
memoryMaximumSize="${maxmemory}"
22+
>
23+
<include name="vona/color/**"/>
24+
<include name="vona/compat/**"/>
25+
<include name="vona/compileserver/**"/>
26+
<include name="vona/cursor/**"/>
27+
<include name="vona/dae/**"/>
28+
<include name="vona/j3d/**"/>
29+
<include name="vona/jscheme/**"/>
30+
<include name="vona/log/**"/>
31+
<include name="vona/math/**"/>
32+
<include name="vona/rmi/**"/>
33+
<include name="vona/scripts/**"/>
34+
<!--include name="vona/templates/**"/-->
35+
<include name="vona/terminal/**"/>
36+
<include name="vona/time/**"/>
37+
<include name="vona/ui/**"/>
38+
</javac>
39+
</target>
40+
41+
<target name="clean" depends="init" >
42+
<delete dir="${compiledir}"/>
43+
<delete>
44+
<fileset dir="${sourcedir}" includes="**/*.class"/>
45+
</delete>
46+
</target>
47+
48+
<target name="orgjar" depends="init">
49+
<property name="compiledir" value="${basedir}/build"/>
50+
<echo message="jar dest docs: ${jars_dest}"/>
51+
<echo message="compiledir: ${compiledir}"/>
52+
<jar
53+
basedir="${compiledir}"
54+
compress="true"
55+
update="false"
56+
jarfile="${libsrc}/org-netlib.jar">
57+
<include name="org/**/*.class"/>
58+
59+
</jar>
60+
</target>
61+
62+
<target name="gitjar" depends="init">
63+
<property name="compiledir" value="${basedir}/build"/>
64+
<echo message="jar dest docs: ${jars_dest}"/>
65+
<echo message="compiledir: ${compiledir}"/>
66+
<jar
67+
basedir="${compiledir}"
68+
compress="true"
69+
update="false"
70+
jarfile="${libsrc}/git-netlib.jar">
71+
<include name="com/**/*.class"/>
72+
73+
</jar>
74+
</target>
75+
76+
<target name="vonajar" depends="init">
77+
<property name="compiledir" value="${basedir}/build"/>
78+
<echo message="jar dest docs: ${jars_dest}"/>
79+
<echo message="compiledir: ${compiledir}"/>
80+
<jar
81+
basedir="${compiledir}"
82+
compress="true"
83+
update="false"
84+
jarfile="${libsrc}/vonalib.jar">
85+
<include name="vona/**/*.class"/>
86+
87+
</jar>
88+
</target>
89+
90+
</project>
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
/*
2+
* Copyright 1997-2017 Unidata Program Center/University Corporation for
3+
* Atmospheric Research, P.O. Box 3000, Boulder, CO 80307,
4+
5+
*
6+
* This library is free software; you can redistribute it and/or modify it
7+
* under the terms of the GNU Lesser General Public License as published by
8+
* the Free Software Foundation; either version 2.1 of the License, or (at
9+
* your option) any later version.
10+
*
11+
* This library is distributed in the hope that it will be useful, but
12+
* WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
14+
* General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this library; if not, write to the Free Software Foundation,
18+
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19+
*/
20+
21+
package ucar.unidata.apps.cas;
22+
23+
24+
import java.awt.event.ActionEvent;
25+
import java.awt.event.ActionListener;
26+
import java.rmi.RemoteException;
27+
import java.util.List;
28+
29+
import javax.swing.JCheckBox;
30+
31+
import ucar.unidata.idv.control.WrapperWidget;
32+
import ucar.unidata.util.GuiUtils;
33+
import ucar.visad.display.DisplayableData;
34+
import ucar.visad.display.Grid2DDisplayable;
35+
import visad.VisADException;
36+
37+
38+
/**
39+
* Class for displaying cross sections as color shaded displays.
40+
* @author Jeff McWhirter
41+
* @version $Revision: 1.24 $
42+
*/
43+
public class ColorMultiSegmentCrossSectionControl extends MultiSegmentCrossSectionControl {
44+
45+
/** flag for smoothing */
46+
boolean isSmoothed = false;
47+
48+
/** flag for allowing smoothing */
49+
boolean allowSmoothing = true;
50+
51+
/**
52+
* Default constructor
53+
*/
54+
public ColorMultiSegmentCrossSectionControl() {}
55+
56+
/**
57+
* Create the <code>DisplayableData</code> that will be used
58+
* to depict the data in the main display.
59+
* @return depictor for data in main display
60+
* @throws VisADException unable to create depictor
61+
* @throws RemoteException unable to create depictor (shouldn't happen)
62+
*/
63+
protected DisplayableData createXSDisplay()
64+
throws VisADException, RemoteException {
65+
Grid2DDisplayable display = new Grid2DDisplayable("vcs_col"
66+
+ paramName, true);
67+
display.setTextureEnable( !isSmoothed);
68+
display.setUseRGBTypeForSelect(true);
69+
addAttributedDisplayable(display, FLAG_COLORTABLE | FLAG_SELECTRANGE);
70+
return display;
71+
}
72+
73+
/**
74+
* Create the <code>DisplayableData</code> that will be used
75+
* to depict the data in the control's display.
76+
* @return depictor for data in main display
77+
* @throws VisADException unable to create depictor
78+
* @throws RemoteException unable to create depictor (shouldn't happen)
79+
*/
80+
protected DisplayableData createVCSDisplay()
81+
throws VisADException, RemoteException {
82+
Grid2DDisplayable display = new Grid2DDisplayable("vcs_" + paramName,
83+
true);
84+
display.setTextureEnable( !isSmoothed);
85+
display.setUseRGBTypeForSelect(true);
86+
addAttributedDisplayable(display, FLAG_COLORTABLE | FLAG_SELECTRANGE);
87+
return display;
88+
}
89+
90+
/**
91+
* Create the <code>DisplayableData</code> that will be used
92+
* to depict the data in the control's display.
93+
* @return depictor for data in main display
94+
* @throws VisADException unable to create depictor
95+
* @throws RemoteException unable to create depictor (shouldn't happen)
96+
*/
97+
protected DisplayableData createMapTransectDisplay()
98+
throws VisADException, RemoteException {
99+
Grid2DDisplayable display = new Grid2DDisplayable("vcsmap_" + paramName,
100+
true);
101+
display.setTextureEnable( !isSmoothed);
102+
display.setUseRGBTypeForSelect(true);
103+
addAttributedDisplayable(display, FLAG_COLORTABLE | FLAG_SELECTRANGE);
104+
return display;
105+
}
106+
107+
/**
108+
* Add any specialized control widgets for this control
109+
* to the list.
110+
* @param controlWidgets <code>List</code> to add to.
111+
* @throws VisADException unable to create controls
112+
* @throws RemoteException unable to create controls (shouldn't happen)
113+
*/
114+
public void getControlWidgets(List controlWidgets)
115+
throws VisADException, RemoteException {
116+
super.getControlWidgets(controlWidgets);
117+
if (getAllowSmoothing()) {
118+
JCheckBox toggle = new JCheckBox("", isSmoothed);
119+
toggle.addActionListener(new ActionListener() {
120+
public void actionPerformed(ActionEvent e) {
121+
try {
122+
isSmoothed = ((JCheckBox) e.getSource()).isSelected();
123+
((Grid2DDisplayable) getXSDisplay()).setTextureEnable(
124+
!isSmoothed);
125+
((Grid2DDisplayable) getVerticalCSDisplay())
126+
.setTextureEnable( !isSmoothed);
127+
} catch (Exception ve) {
128+
logException("setSmoothed", ve);
129+
}
130+
}
131+
});
132+
controlWidgets.add(new WrapperWidget(this,
133+
GuiUtils.rLabel("Shade Colors:"), toggle));
134+
}
135+
}
136+
137+
/**
138+
* Set whether the depictions should show smooth or blocky shading.
139+
* Used by XML persistence.
140+
* @param v true to use smoothed depictions
141+
*/
142+
public void setSmoothed(boolean v) {
143+
isSmoothed = v;
144+
}
145+
146+
/**
147+
* Get whether the depictions show smooth or blocky shading.
148+
* @return true if using smoothed depictions
149+
*/
150+
public boolean getSmoothed() {
151+
return isSmoothed;
152+
}
153+
154+
/**
155+
* Set whether this display should allow smoothed colors or blocky. Used
156+
* by XML persistence (bundles) for the most part.
157+
* @param v true to allowing smoothing.
158+
*/
159+
public void setAllowSmoothing(boolean v) {
160+
allowSmoothing = v;
161+
if ( !allowSmoothing) {
162+
setSmoothed(false);
163+
}
164+
}
165+
166+
/**
167+
* Get whether this display should allow smoothing
168+
* @return true if allows smoothing.
169+
*/
170+
public boolean getAllowSmoothing() {
171+
return allowSmoothing;
172+
}
173+
174+
/**
175+
* Is this a raster display?
176+
*
177+
* @return true if raster
178+
*/
179+
public boolean getIsRaster() {
180+
return true;
181+
}
182+
}

0 commit comments

Comments
 (0)