Hi all,
1. We are facing some problem with our work. We are
adding all the gridded sets to union sets and then
adding the union sets to the reference and then
reference to display. The same procedure for both the
vertical and horizontal lines(gridded sets).
When the user clicks on window the old references(here
the gridded sets) is to be removed. We are invoking a
method which removes these references. But we found
only the last gridded sets are removed(one from
vertical and horizontal).
The following method is used to create the
grid and the bottom one to remove the references of
teh gridded sets. Please let me know how to remove
full gridded sets.
public void drawGrid(float[] X, float[] Y, int imax,
int jmax) throws
RemoteException, VisADException {
float[][] samp = new float[2][2];
for(int j = 0; j < jmax; j++) {
Gridded2DSet[] g_set = new
Gridded2DSet[imax-1];
for(int i = 0; i < (imax-1); i++) {
samp[0][0] = X[(i+j*imax)];
samp[1][0] = Y[(i+j*imax)];
samp[0][1] = X[((i+j*imax)+1)];
samp[1][1] = Y[((i+j*imax)+1)];
g_set[i] = new
Gridded2DSet(domain_tuple, samp, 2);
}
// for horizontal lines
UnionSet us = new UnionSet(g_set);
//
gridded sets added to union set
d_ref1 = new DataReferenceImpl("d_ref1");
d_ref1.setData(us);
// for this reference the union sets are set as data.
display.addReference(d_ref1,
getGriddedSetsColor()); //
reference added to display.
}
for(int i = 0; i < imax; i++) {
Gridded2DSet[] g_set1 = new
Gridded2DSet[jmax-1];
for(int j = 0; j < (jmax-1); j++) {
samp[0][0] = X[(i+j*imax)];
samp[1][0] = Y[(i+j*imax)];
samp[0][1] = X[((i+j*imax)+imax)];
samp[1][1] = Y[((i+j*imax)+imax)];
g_set1[j] = new
Gridded2DSet(domain_tuple, samp, 2);
}
// for vertical lines
UnionSet us1 = new UnionSet(g_set1);
//
gridded sets added to union set.
d_ref2 = new DataReferenceImpl("d_ref2");
d_ref2.setData(us1);
// for this reference the union sets are set as data
display.addReference(d_ref2,
getGriddedSetsColor()); //
reference added to display.
}
}//end drawgrid
public void removeMainGridReference() throws
RemoteException,
VisADException
display.removeReference(d_ref1);
display.removeReference(d_ref2);
}
2. We are creating a geometry and are using the
DirectManipulationRenderer for the realtuples. With
this i can create the geometry and when the geometry
is satisfied i will divide the boundary points to some
N divisions and i want to use the
DirectManipulationRenderer separately for these
points. Is is possible to link the display with 2
renderers? Please let me know if there is any
alternative apprach to achieve this.
3. I have a gridded set and when i click near that
griddedset, it should be selected. Is is it possble to
select any gridded sets. Please let me know about
this.
Regards,
Karan.
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com