projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added getBounds() in BasicGUIComponent
[Mograsim.git]
/
LogicUI
/
src
/
era
/
mi
/
components
/
gui
/
BasicGUIComponent.java
diff --git
a/LogicUI/src/era/mi/components/gui/BasicGUIComponent.java
b/LogicUI/src/era/mi/components/gui/BasicGUIComponent.java
index
d11bc71
..
55929b9
100644
(file)
--- a/
LogicUI/src/era/mi/components/gui/BasicGUIComponent.java
+++ b/
LogicUI/src/era/mi/components/gui/BasicGUIComponent.java
@@
-3,12
+3,32
@@
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 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
\r
public interface BasicGUIComponent
\r
{
\r
+ /**
\r
+ * Render this component to the given gc, at coordinates (0, 0).
\r
+ */
\r
public void render(GeneralGC gc);
\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
\r
+ //TODO this code will be replaced by code in BasicComponent.
\r
+ /**
\r
+ * Returns how many wire arrays are connected to this component.
\r
+ * (Connections are static - they can't be removed and no new ones can be added)
\r
+ */
\r
public int getConnectedWireArraysCount();
\r
public int getConnectedWireArraysCount();
\r
+ /**
\r
+ * Returns the n-th wire array connected to this component.
\r
+ */
\r
public WireArray getConnectedWireArray(int connectionIndex);
\r
public WireArray getConnectedWireArray(int connectionIndex);
\r
+ /**
\r
+ * Returns relative coordinates where the n-th wire array is connected to this component.
\r
+ */
\r
public Point getWireArrayConnectionPoint(int connectionIndex);
\r
}
\ No newline at end of file
public Point getWireArrayConnectionPoint(int connectionIndex);
\r
}
\ No newline at end of file