This was necessary in order to unify the event handling between G2D and scene graph and to make it possible
to propagate higher level events originating from the Eclipse Workbench, such as CommandEvent to scene graph
nodes which are currently only able to process AWT events and nothing else.
This is only the groundwork for taking the G2D events into use in the scenegraph,
i.e. moving all the necessary code into scene graph plug-ins.
If your code breaks as a result, organizing your imports should fix the problems in most cases.
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@22336
ac1ea38d-2e2b-0410-8846-
a27921b304fc
import org.simantics.g2d.element.ElementClass;\r
import org.simantics.g2d.element.ElementUtils;\r
import org.simantics.g2d.element.IElement;\r
-import org.simantics.g2d.event.EventHandlerReflection.EventHandler;\r
-import org.simantics.g2d.event.KeyEvent;\r
-import org.simantics.g2d.event.KeyEvent.KeyPressedEvent;\r
-import org.simantics.g2d.event.KeyEvent.KeyReleasedEvent;\r
-import org.simantics.g2d.event.MouseEvent;\r
-import org.simantics.g2d.event.MouseEvent.MouseMovedEvent;\r
import org.simantics.g2d.participant.MouseUtil;\r
-import org.simantics.g2d.participant.MouseUtil.MouseClickEvent;\r
import org.simantics.g2d.participant.MouseUtil.MouseInfo;\r
import org.simantics.scenegraph.g2d.G2DParentNode;\r
+import org.simantics.scenegraph.g2d.events.KeyEvent;\r
+import org.simantics.scenegraph.g2d.events.MouseEvent;\r
+import org.simantics.scenegraph.g2d.events.EventHandlerReflection.EventHandler;\r
+import org.simantics.scenegraph.g2d.events.KeyEvent.KeyPressedEvent;\r
+import org.simantics.scenegraph.g2d.events.KeyEvent.KeyReleasedEvent;\r
+import org.simantics.scenegraph.g2d.events.MouseEvent.MouseClickEvent;\r
+import org.simantics.scenegraph.g2d.events.MouseEvent.MouseMovedEvent;\r
import org.simantics.scenegraph.g2d.nodes.ShapeNode;\r
import org.simantics.sysdyn.ui.elements2.AuxiliaryFactory;\r
import org.simantics.sysdyn.ui.elements2.CloudFactory;\r
public boolean handleMouseEvent(MouseEvent me) {\r
\r
\r
- MouseClickEvent mce;\r
- if (me instanceof MouseClickEvent) {\r
- mce = (MouseClickEvent) me;\r
+ MouseEvent.MouseClickEvent mce;\r
+ if (me instanceof MouseEvent.MouseClickEvent) {\r
+ mce = (MouseEvent.MouseClickEvent) me;\r
} else {\r
return false;\r
}\r
import org.simantics.g2d.element.ElementClasses;\r
import org.simantics.g2d.element.IElement;\r
import org.simantics.g2d.element.IElementClassProvider;\r
-import org.simantics.g2d.event.EventHandlerReflection.EventHandler;\r
-import org.simantics.g2d.event.MouseEvent;\r
-import org.simantics.g2d.event.MouseEvent.MouseButtonPressedEvent;\r
import org.simantics.g2d.participant.KeyUtil;\r
import org.simantics.g2d.participant.MouseUtil;\r
import org.simantics.g2d.participant.TransformUtil;\r
import org.simantics.g2d.utils.GeometryUtils;\r
+import org.simantics.scenegraph.g2d.events.MouseEvent;\r
+import org.simantics.scenegraph.g2d.events.EventHandlerReflection.EventHandler;\r
+import org.simantics.scenegraph.g2d.events.MouseEvent.MouseButtonPressedEvent;\r
import org.simantics.sysdyn.ui.editor.participant.SysdynElementClassProviders.ISysdynElementClassProvider;\r
import org.simantics.sysdyn.ui.editor.routing.DependencyRouter;\r
import org.simantics.sysdyn.ui.editor.routing.FlowRouter;\r
import org.simantics.g2d.elementclass.BranchPoint;\r
import org.simantics.g2d.elementclass.BranchPointClass;\r
import org.simantics.g2d.elementclass.FlagClass;\r
-import org.simantics.g2d.event.MouseEvent.MouseButtonEvent;\r
-import org.simantics.g2d.event.MouseEvent.MouseButtonPressedEvent;\r
-import org.simantics.g2d.event.MouseEvent.MouseMovedEvent;\r
import org.simantics.g2d.routing.Constants;\r
import org.simantics.g2d.routing.IConnection;\r
import org.simantics.g2d.routing.IRouter2;\r
import org.simantics.g2d.snap.ISnapAdvisor;\r
import org.simantics.g2d.utils.GeometryUtils;\r
import org.simantics.scenegraph.g2d.G2DParentNode;\r
+import org.simantics.scenegraph.g2d.events.MouseEvent.MouseButtonEvent;\r
+import org.simantics.scenegraph.g2d.events.MouseEvent.MouseButtonPressedEvent;\r
+import org.simantics.scenegraph.g2d.events.MouseEvent.MouseMovedEvent;\r
import org.simantics.scenegraph.g2d.nodes.ShapeNode;\r
import org.simantics.structural2.modelingRules.ConnectionJudgement;\r
import org.simantics.sysdyn.SysdynResource;\r
import org.simantics.g2d.element.handler.impl.TextColorImpl;\r
import org.simantics.g2d.element.handler.impl.TextFontImpl;\r
import org.simantics.g2d.element.handler.impl.TextImpl;\r
-import org.simantics.g2d.event.MouseEvent;\r
-import org.simantics.g2d.event.MouseEvent.MouseEnterEvent;\r
-import org.simantics.g2d.event.MouseEvent.MouseExitEvent;\r
import org.simantics.g2d.image.Image;\r
import org.simantics.g2d.image.impl.ShapeImage;\r
import org.simantics.scenegraph.g2d.G2DParentNode;\r
+import org.simantics.scenegraph.g2d.events.MouseEvent;\r
+import org.simantics.scenegraph.g2d.events.MouseEvent.MouseEnterEvent;\r
+import org.simantics.scenegraph.g2d.events.MouseEvent.MouseExitEvent;\r
import org.simantics.scenegraph.g2d.nodes.ShapeNode;\r
import org.simantics.utils.datastructures.hints.IHintListener;\r
import org.simantics.utils.datastructures.hints.IHintObservable;\r