From bb37b5bc0c20696df70fa716322da2c2136db7b5 Mon Sep 17 00:00:00 2001 From: lehtonen Date: Tue, 20 Sep 2011 11:29:06 +0000 Subject: [PATCH] All in-use contents of org.simantics.g2d.event package were moved into org.simantics.scenegraph.g2d.events. 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 --- .../CreateVariablesShortcutParticipant.java | 20 +++++++++---------- .../editor/participant/PointerInteractor.java | 6 +++--- .../editor/participant/SysdynConnectTool.java | 6 +++--- .../sysdyn/ui/elements2/CloudFactory.java | 6 +++--- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/CreateVariablesShortcutParticipant.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/CreateVariablesShortcutParticipant.java index 664546cb..d778169c 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/CreateVariablesShortcutParticipant.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/CreateVariablesShortcutParticipant.java @@ -34,16 +34,16 @@ import org.simantics.g2d.diagram.participant.Selection; import org.simantics.g2d.element.ElementClass; import org.simantics.g2d.element.ElementUtils; import org.simantics.g2d.element.IElement; -import org.simantics.g2d.event.EventHandlerReflection.EventHandler; -import org.simantics.g2d.event.KeyEvent; -import org.simantics.g2d.event.KeyEvent.KeyPressedEvent; -import org.simantics.g2d.event.KeyEvent.KeyReleasedEvent; -import org.simantics.g2d.event.MouseEvent; -import org.simantics.g2d.event.MouseEvent.MouseMovedEvent; import org.simantics.g2d.participant.MouseUtil; -import org.simantics.g2d.participant.MouseUtil.MouseClickEvent; import org.simantics.g2d.participant.MouseUtil.MouseInfo; import org.simantics.scenegraph.g2d.G2DParentNode; +import org.simantics.scenegraph.g2d.events.KeyEvent; +import org.simantics.scenegraph.g2d.events.MouseEvent; +import org.simantics.scenegraph.g2d.events.EventHandlerReflection.EventHandler; +import org.simantics.scenegraph.g2d.events.KeyEvent.KeyPressedEvent; +import org.simantics.scenegraph.g2d.events.KeyEvent.KeyReleasedEvent; +import org.simantics.scenegraph.g2d.events.MouseEvent.MouseClickEvent; +import org.simantics.scenegraph.g2d.events.MouseEvent.MouseMovedEvent; import org.simantics.scenegraph.g2d.nodes.ShapeNode; import org.simantics.sysdyn.ui.elements2.AuxiliaryFactory; import org.simantics.sysdyn.ui.elements2.CloudFactory; @@ -197,9 +197,9 @@ public class CreateVariablesShortcutParticipant extends AbstractDiagramParticipa public boolean handleMouseEvent(MouseEvent me) { - MouseClickEvent mce; - if (me instanceof MouseClickEvent) { - mce = (MouseClickEvent) me; + MouseEvent.MouseClickEvent mce; + if (me instanceof MouseEvent.MouseClickEvent) { + mce = (MouseEvent.MouseClickEvent) me; } else { return false; } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/PointerInteractor.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/PointerInteractor.java index 99ed3fb1..8af06aac 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/PointerInteractor.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/PointerInteractor.java @@ -31,13 +31,13 @@ import org.simantics.g2d.diagram.participant.pointertool.TerminalUtil.TerminalIn import org.simantics.g2d.element.ElementClasses; import org.simantics.g2d.element.IElement; import org.simantics.g2d.element.IElementClassProvider; -import org.simantics.g2d.event.EventHandlerReflection.EventHandler; -import org.simantics.g2d.event.MouseEvent; -import org.simantics.g2d.event.MouseEvent.MouseButtonPressedEvent; import org.simantics.g2d.participant.KeyUtil; import org.simantics.g2d.participant.MouseUtil; import org.simantics.g2d.participant.TransformUtil; import org.simantics.g2d.utils.GeometryUtils; +import org.simantics.scenegraph.g2d.events.MouseEvent; +import org.simantics.scenegraph.g2d.events.EventHandlerReflection.EventHandler; +import org.simantics.scenegraph.g2d.events.MouseEvent.MouseButtonPressedEvent; import org.simantics.sysdyn.ui.editor.participant.SysdynElementClassProviders.ISysdynElementClassProvider; import org.simantics.sysdyn.ui.editor.routing.DependencyRouter; import org.simantics.sysdyn.ui.editor.routing.FlowRouter; diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SysdynConnectTool.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SysdynConnectTool.java index 5a9bcc63..997a547d 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SysdynConnectTool.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/participant/SysdynConnectTool.java @@ -38,9 +38,6 @@ import org.simantics.g2d.element.impl.Element; import org.simantics.g2d.elementclass.BranchPoint; import org.simantics.g2d.elementclass.BranchPointClass; import org.simantics.g2d.elementclass.FlagClass; -import org.simantics.g2d.event.MouseEvent.MouseButtonEvent; -import org.simantics.g2d.event.MouseEvent.MouseButtonPressedEvent; -import org.simantics.g2d.event.MouseEvent.MouseMovedEvent; import org.simantics.g2d.routing.Constants; import org.simantics.g2d.routing.IConnection; import org.simantics.g2d.routing.IRouter2; @@ -48,6 +45,9 @@ import org.simantics.g2d.routing.TrivialRouter2; import org.simantics.g2d.snap.ISnapAdvisor; import org.simantics.g2d.utils.GeometryUtils; import org.simantics.scenegraph.g2d.G2DParentNode; +import org.simantics.scenegraph.g2d.events.MouseEvent.MouseButtonEvent; +import org.simantics.scenegraph.g2d.events.MouseEvent.MouseButtonPressedEvent; +import org.simantics.scenegraph.g2d.events.MouseEvent.MouseMovedEvent; import org.simantics.scenegraph.g2d.nodes.ShapeNode; import org.simantics.structural2.modelingRules.ConnectionJudgement; import org.simantics.sysdyn.SysdynResource; diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/CloudFactory.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/CloudFactory.java index fcb8011d..f0b9dbcc 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/CloudFactory.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/CloudFactory.java @@ -41,12 +41,12 @@ import org.simantics.g2d.element.handler.impl.StaticSymbolImpl; import org.simantics.g2d.element.handler.impl.TextColorImpl; import org.simantics.g2d.element.handler.impl.TextFontImpl; import org.simantics.g2d.element.handler.impl.TextImpl; -import org.simantics.g2d.event.MouseEvent; -import org.simantics.g2d.event.MouseEvent.MouseEnterEvent; -import org.simantics.g2d.event.MouseEvent.MouseExitEvent; import org.simantics.g2d.image.Image; import org.simantics.g2d.image.impl.ShapeImage; import org.simantics.scenegraph.g2d.G2DParentNode; +import org.simantics.scenegraph.g2d.events.MouseEvent; +import org.simantics.scenegraph.g2d.events.MouseEvent.MouseEnterEvent; +import org.simantics.scenegraph.g2d.events.MouseEvent.MouseExitEvent; import org.simantics.scenegraph.g2d.nodes.ShapeNode; import org.simantics.utils.datastructures.hints.IHintListener; import org.simantics.utils.datastructures.hints.IHintObservable; -- 2.47.1