Added getBounds() in BasicGUIComponent
[Mograsim.git] / LogicUI / src / era / mi / components / gui / BasicGUIComponent.java
index 8d26384..55929b9 100644 (file)
@@ -3,6 +3,7 @@ package era.mi.components.gui;
 import era.mi.logic.wires.WireArray;\r
 import net.haspamelodica.swt.helper.gcs.GeneralGC;\r
 import net.haspamelodica.swt.helper.swtobjectwrappers.Point;\r
+import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;\r
 \r
 public interface BasicGUIComponent\r
 {\r
@@ -10,6 +11,11 @@ public interface BasicGUIComponent
         * Render this component to the given gc, at coordinates (0, 0).\r
         */\r
        public void render(GeneralGC gc);\r
+       /**\r
+        * Returns the bounds of this component.\r
+        * Used for calculating which component is clicked.\r
+        */\r
+       public Rectangle getBounds();\r
 \r
        //TODO this code will be replaced by code in BasicComponent.\r
        /**\r