33 |
|
|
34 |
import java.awt.event.MouseEvent; |
import java.awt.event.MouseEvent; |
35 |
|
|
|
import org.fenfire.util.*; |
|
|
import org.fenfire.vocab.*; |
|
|
|
|
36 |
/** A BuoyViewMainNode showing a 2D plane rendered through |
/** A BuoyViewMainNode showing a 2D plane rendered through |
37 |
* a View2D. This class implements the keyboard and mouse |
* a View2D. This class implements the keyboard and mouse |
38 |
* command for moving on the spatial plane. |
* command for moving on the spatial plane. |
41 |
public static boolean dbg = true; |
public static boolean dbg = true; |
42 |
private static void p(String s) { System.out.println("MainNode2D:: "+s); } |
private static void p(String s) { System.out.println("MainNode2D:: "+s); } |
43 |
|
|
|
/** Ugly hack!!! XXX |
|
|
*/ |
|
|
static public org.fenfire.Fen fen = null; |
|
|
|
|
44 |
protected float zoom; |
protected float zoom; |
45 |
|
|
46 |
private float tmp[] = new float[2]; |
private float tmp[] = new float[2]; |
85 |
box2paper = vs.coords.orthoBox(0,0,0,0,0,0,0,0); |
box2paper = vs.coords.orthoBox(0,0,0,0,0,0,0,0); |
86 |
vs.matcher.add(box2screen, box2paper, "BOX2PAPER"); |
vs.matcher.add(box2screen, box2paper, "BOX2PAPER"); |
87 |
setZoomPan(vs, box2paper); |
setZoomPan(vs, box2paper); |
|
|
|
|
if (fen != null) |
|
|
if (RDFUtil.isNodeType(fen, plane, PP.Paper) || |
|
|
RDFUtil.isNodeType(fen, plane, RST.Canvas)) ; |
|
|
else throw new Error("plane is NOT a container!"); |
|
|
|
|
88 |
view2d.render(vs, plane, into, into, box2paper); |
view2d.render(vs, plane, into, into, box2paper); |
89 |
} |
} |
90 |
|
|