public class CutAndPasteFields extends Object implements ActionListener
Construct a CutAndPasteFields object linked to a 2-D grid [a FlatField with MathType ((x, y) -> range)]) or a sequence of 2-D grids {a FieldImpl with MathType (t -> ((x, y) -> range))], a DisplayImpl, and an optional integer blend region width. The grid or grids must all have the same Linear domain Set (Linear2DSet or LinearNDSet with domain dimension = 2), and the domain must be mapped to two of XAxis, YAxis and ZAxis. If a sequence of grids, the sequence domain must be mapped to Animation. The grid may have any number of range RealTypes. The CutAndPasteFields object operates in a sequence: 1. Invokes its start() method to start. 2. User drags a grid sector rectangle with the right mouse button. This rectangle must lie inside the grid. 3. When the user releases, the rectangle appears fixed over the grid. 4. The user can change to a different time step, and drag the rectangle by one of its corners. On release, it must lie inside the grid. 5. The source grid sector is pasted into the destination, within blending over a certain width near the destination border. 6. The user can change time step or drag the rectangle any number of times: each time the previous paste is undone and the source grid sector is pasted into the new time and location. 7. At any point after start(), the application can invoke stop() to stop the process. 8. After a source rectangle has been pasted, the application can invoke undo() to undo the paste and stop the process. 9. The process can be restarted by invoking start(), any number of times. 10. At any point, the application can invoke setBlend() to change the width of the blend region. The main() method illustrates a simple GUI and test case with a sequnece of grids. Run 'java visad.bom.CutAndPasteFields' to test with contour values, and run 'java visad.bom.CutAndPasteFields 1' to test with color values.
Constructor and Description |
---|
CutAndPasteFields(Field gs,
DisplayImplJ3D d) |
CutAndPasteFields(Field gs,
DisplayImplJ3D d,
int b)
gs has MathType (t -> ((x, y) -> v)) or ((x, y) -> v)
conditions on gs and display:
1.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
static void |
main(String[] args) |
void |
setBlend(int b) |
void |
start() |
void |
stop() |
void |
undo() |
public CutAndPasteFields(Field gs, DisplayImplJ3D d) throws VisADException, RemoteException
VisADException
RemoteException
public CutAndPasteFields(Field gs, DisplayImplJ3D d, int b) throws VisADException, RemoteException
gs has MathType (t -> ((x, y) -> v)) or ((x, y) -> v) conditions on gs and display: 1. x and y mapped to XAxis, YAxis, ZAxis 2. (x, y) domain LinearSet 3. if (t -> ...), then t is mapped to Animation b is width of blend region
VisADException
RemoteException
public void start() throws VisADException, RemoteException
VisADException
RemoteException
public void stop() throws VisADException, RemoteException
VisADException
RemoteException
public void undo() throws VisADException, RemoteException
VisADException
RemoteException
public void setBlend(int b)
public static void main(String[] args) throws VisADException, RemoteException
VisADException
RemoteException
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.