33 |
|
|
34 |
import java.awt.event.MouseEvent; |
import java.awt.event.MouseEvent; |
35 |
|
|
36 |
|
import org.fenfire.util.*; |
37 |
|
import org.fenfire.vocab.*; |
38 |
|
|
39 |
/** A BuoyViewMainNode showing a 2D plane rendered through |
/** A BuoyViewMainNode showing a 2D plane rendered through |
40 |
* a View2D. This class implements the keyboard and mouse |
* a View2D. This class implements the keyboard and mouse |
41 |
* command for moving on the spatial plane. |
* command for moving on the spatial plane. |
42 |
*/ |
*/ |
43 |
public class MainNode2D extends AbstractMainNode2D { |
public class MainNode2D extends AbstractMainNode2D { |
44 |
public static boolean dbg = true; |
public static boolean dbg = true; |
45 |
private static void pa(String s) { System.out.println("MainNode2D:: "+s); } |
private static void p(String s) { System.out.println("MainNode2D:: "+s); } |
46 |
|
|
47 |
|
/** Ugly hack!!! XXX |
48 |
|
*/ |
49 |
|
static public org.fenfire.Fen fen = null; |
50 |
|
|
51 |
protected float zoom; |
protected float zoom; |
52 |
|
|
93 |
vs.matcher.add(box2screen, box2paper, "BOX2PAPER"); |
vs.matcher.add(box2screen, box2paper, "BOX2PAPER"); |
94 |
setZoomPan(vs, box2paper); |
setZoomPan(vs, box2paper); |
95 |
|
|
96 |
|
if (RDFUtil.isNodeType(fen, plane, PP.Paper) || |
97 |
|
RDFUtil.isNodeType(fen, plane, RST.Canvas)) ; |
98 |
|
else throw new Error("plane is NOT a container!"); |
99 |
|
|
100 |
view2d.render(vs, plane, into, into, box2paper); |
view2d.render(vs, plane, into, into, box2paper); |
101 |
} |
} |
102 |
|
|