Logo Search packages:      
Sourcecode: javamorph version File versions  Download package

javamorph::CMeshDecorator::CMeshDecorator ( CFrame  parent,
Vector< Point >  mesh,
BufferedImage  image,
File  f_mesh 
) [inline]

Constructor.

Parameters:
parent Parent JComponent to paint to.
mesh Pictures of the mesh.
image Picture of the own side.
f_mesh File to store the mesh to after shutdown.

Definition at line 52 of file CMeshDecorator.java.

References init(), and load().

                        {
        /* Ensure saving of the mesh after shutdown. */
        Runtime.getRuntime().addShutdownHook(new Thread(this));
        /* Assign arguments. */
        this.parent = parent;
        this.mesh = mesh;
        this.image = image;
        this.f_mesh = f_mesh;
        /* Provide the mesh. */
        if(f_mesh.exists())load();
        else init();
        /* Add listeners. */
        parent.addMouseListener(this);
        parent.addMouseMotionListener(this);
    }


Generated by  Doxygen 1.6.0   Back to index