X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=LogicUI%2Fsrc%2Fera%2Fmi%2Fgui%2Fcomponents%2FBasicGUIComponent.java;fp=LogicUI%2Fsrc%2Fera%2Fmi%2Fgui%2Fcomponents%2FBasicGUIComponent.java;h=0000000000000000000000000000000000000000;hb=4d29cabdc45d68b5e5f210266dc4fbc5560dbcdd;hp=2d27685bb3b17f1899e8f18f83f6161a07479f54;hpb=34fbe2b9bd5bdf6eda0506d9bf00c8840c6cc28a;p=Mograsim.git diff --git a/LogicUI/src/era/mi/gui/components/BasicGUIComponent.java b/LogicUI/src/era/mi/gui/components/BasicGUIComponent.java deleted file mode 100644 index 2d27685b..00000000 --- a/LogicUI/src/era/mi/gui/components/BasicGUIComponent.java +++ /dev/null @@ -1,44 +0,0 @@ -package era.mi.gui.components; - -import era.mi.logic.wires.Wire.ReadEnd; -import net.haspamelodica.swt.helper.gcs.GeneralGC; -import net.haspamelodica.swt.helper.swtobjectwrappers.Point; -import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle; - -public interface BasicGUIComponent -{ - /** - * Render this component to the given gc, at coordinates (0, 0). - */ - public void render(GeneralGC gc); - - /** - * Returns the bounds of this component. Used for calculating which component is clicked. - */ - public Rectangle getBounds(); - - /** - * Called when this component is clicked. Relative coordinates of the click are given. Returns true if this component has to be redrawn. - */ - public default boolean clicked(double x, double y) - { - return false; - } - - // TODO this code will be replaced by code in BasicComponent. - /** - * Returns how many wire arrays are connected to this component. (Connections are static - they can't be removed and no new ones can be - * added) - */ - public int getConnectedWireEndsCount(); - - /** - * Returns the n-th wire array connected to this component. - */ - public ReadEnd getConnectedWireEnd(int connectionIndex); - - /** - * Returns relative coordinates where the n-th wire array is connected to this component. - */ - public Point getWireEndConnectionPoint(int connectionIndex); -} \ No newline at end of file