Fixed a bug in Am2900; created dlatch8/80; relayouted some components
[Mograsim.git] / net.mograsim.logic.model.editor / src / net / mograsim / logic / model / editor / handles / Handle.java
index c8f9392..cbfe2a2 100644 (file)
@@ -14,9 +14,11 @@ public abstract class Handle
 {
        private final Rectangle bounds;
        private final Collection<Runnable> redrawListeners, destroyListeners;
+       private final int priority;
 
-       public Handle()
+       public Handle(int priority)
        {
+               this.priority = priority;
                redrawListeners = new ArrayList<>();
                destroyListeners = new ArrayList<>();
                bounds = new Rectangle(0, 0, 0, 0);
@@ -122,6 +124,11 @@ public abstract class Handle
     public void onDeselect() {}
     //@formatter:on
 
+       public final int getPriority()
+       {
+               return priority;
+       }
+
        public abstract HandleType getType();
 
        public static enum HandleType