23 |
public View2D getView2D() { return view2d; } |
public View2D getView2D() { return view2d; } |
24 |
|
|
25 |
protected float panX, panY; |
protected float panX, panY; |
26 |
|
protected boolean cursor = true; |
27 |
|
public void setCursor(boolean cursor) { this.cursor = cursor; } |
28 |
|
|
29 |
public interface Factory { |
public interface Factory { |
30 |
AbstractMainNode2D create(Object plane, View2D view2d, |
AbstractMainNode2D create(Object plane, View2D view2d, |
57 |
public void keystroke(String s) { |
public void keystroke(String s) { |
58 |
context.handleKeyStroke(s, view2d); |
context.handleKeyStroke(s, view2d); |
59 |
} |
} |
60 |
|
public interface Render { |
61 |
|
void mainNodeToBeRender(AbstractMainNode2D main); |
62 |
|
} |
63 |
|
|
64 |
/** Cause the changes to the zooming and panning variables |
/** Cause the changes to the zooming and panning variables |
65 |
* to be shown in the given vobscene. |
* to be shown in the given vobscene. |
150 |
// See around of objects |
// See around of objects |
151 |
if(m_state[2] == e.BUTTON3_MASK && |
if(m_state[2] == e.BUTTON3_MASK && |
152 |
e.getID() == MouseEvent.MOUSE_CLICKED){ |
e.getID() == MouseEvent.MOUSE_CLICKED){ |
|
|
|
153 |
View2D view = getView2D(); |
View2D view = getView2D(); |
154 |
while (view.getChildView2D() != null) |
while (view.getChildView2D() != null) |
155 |
view = view.getChildView2D(); |
view = view.getChildView2D(); |
156 |
|
|
157 |
// currently only for canvas2d canvases |
// currently only for canvas2d canvases |
158 |
if (view instanceof CanvasView2D) { |
if (view instanceof CanvasView2D) { |
159 |
|
|
160 |
Object obj = ((CanvasView2D)view).getNode(oldVobScene, e.getX(), e.getY(), |
Object obj = ((CanvasView2D)view).getNode(oldVobScene, e.getX(), e.getY(), |
161 |
plane, box2screen, box2screen, |
plane, box2screen, box2screen, |
162 |
box2paper, null); |
box2paper, null); |
163 |
if (obj != null) { |
if (obj != null) if (dbg) p("Object is: "+ obj.toString()); |
164 |
p("Object is: "+ obj.toString() + " TADAA!!"); |
context.setAccursed(obj); |
165 |
context.setAccursed(obj); |
AbstractUpdateManager.chg(); |
|
AbstractUpdateManager.chg(); |
|
|
} |
|
166 |
} |
} |
167 |
else p("not a canvas view?"); |
else p("not a canvas view?"); |
168 |
|
|