Documentation of 'visad.bom.CutAndPasteFields' Java class
CutAndPasteFields
visad.bom

Class CutAndPasteFields

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.util.EventListener


    public class CutAndPasteFields
    extends java.lang.Object
    implements java.awt.event.ActionListener
    CutAndPasteFields is the VisAD class for cutting and pasting regions of fields.

    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 Detail

      • CutAndPasteFields

        public CutAndPasteFields(Field gs,
                                 DisplayImplJ3D d,
                                 int b)
                          throws VisADException,
                                 java.rmi.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
        
        Throws:
        VisADException
        java.rmi.RemoteException
    • Method Detail

      • setBlend

        public void setBlend(int b)
      • main

        public static void main(java.lang.String[] args)
                         throws VisADException,
                                java.rmi.RemoteException
        Throws:
        VisADException
        java.rmi.RemoteException
      • actionPerformed

        public void actionPerformed(java.awt.event.ActionEvent e)
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.