8d263842d5f91c052ad2685112e5ae3f38d66b54
[Mograsim.git] / LogicUI / src / era / mi / components / gui / BasicGUIComponent.java
1 package era.mi.components.gui;\r
2 \r
3 import era.mi.logic.wires.WireArray;\r
4 import net.haspamelodica.swt.helper.gcs.GeneralGC;\r
5 import net.haspamelodica.swt.helper.swtobjectwrappers.Point;\r
6 \r
7 public interface BasicGUIComponent\r
8 {\r
9         /**\r
10          * Render this component to the given gc, at coordinates (0, 0).\r
11          */\r
12         public void render(GeneralGC gc);\r
13 \r
14         //TODO this code will be replaced by code in BasicComponent.\r
15         /**\r
16          * Returns how many wire arrays are connected to this component.\r
17          * (Connections are static - they can't be removed and no new ones can be added)\r
18          */\r
19         public int getConnectedWireArraysCount();\r
20         /**\r
21          * Returns the n-th wire array connected to this component.\r
22          */\r
23         public WireArray getConnectedWireArray(int connectionIndex);\r
24         /**\r
25          * Returns relative coordinates where the n-th wire array is connected to this component.\r
26          */\r
27         public Point getWireArrayConnectionPoint(int connectionIndex);\r
28 }