diff options
author | Eduardo Pedroni <e.pedroni91@gmail.com> | 2014-10-10 13:22:16 +0200 |
---|---|---|
committer | Eduardo Pedroni <e.pedroni91@gmail.com> | 2014-10-10 13:22:16 +0200 |
commit | e145523a2ae686dd2a2ae7996639e6e8d14d992a (patch) | |
tree | 3ffaa3c13fc48f3c58b72a53bb6a6ca41bcf96da /src/jcgp/gui/dragresize | |
parent | 952b6d502da5896b59ffecdb5fa6f9c56458a02c (diff) |
Moved constants to a separate file, added a formal README
Diffstat (limited to 'src/jcgp/gui/dragresize')
-rw-r--r-- | src/jcgp/gui/dragresize/HorizontalDragResize.java | 4 | ||||
-rw-r--r-- | src/jcgp/gui/dragresize/VerticalDragResize.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/jcgp/gui/dragresize/HorizontalDragResize.java b/src/jcgp/gui/dragresize/HorizontalDragResize.java index b618b74..e88eafd 100644 --- a/src/jcgp/gui/dragresize/HorizontalDragResize.java +++ b/src/jcgp/gui/dragresize/HorizontalDragResize.java @@ -4,7 +4,7 @@ import javafx.event.EventHandler; import javafx.scene.Cursor; import javafx.scene.input.MouseEvent; import javafx.scene.layout.Region; -import jcgp.gui.GUI; +import jcgp.gui.constants.Constants; /** * This class adds horizontal drag resize functionality to any @@ -125,7 +125,7 @@ public class HorizontalDragResize { * @return true if the mouse position is in the draggable area. */ private boolean isInDraggableZone(MouseEvent event) { - return event.getX() < (GUI.RESIZE_MARGIN); + return event.getX() < (Constants.RESIZE_MARGIN); } } diff --git a/src/jcgp/gui/dragresize/VerticalDragResize.java b/src/jcgp/gui/dragresize/VerticalDragResize.java index 06186c6..4f784e5 100644 --- a/src/jcgp/gui/dragresize/VerticalDragResize.java +++ b/src/jcgp/gui/dragresize/VerticalDragResize.java @@ -4,7 +4,7 @@ import javafx.event.EventHandler; import javafx.scene.Cursor; import javafx.scene.input.MouseEvent; import javafx.scene.layout.Region; -import jcgp.gui.GUI; +import jcgp.gui.constants.Constants; /** * This class adds vertical drag resize functionality to any @@ -126,7 +126,7 @@ public class VerticalDragResize { * @return true if the mouse position is in the draggable area. */ private boolean isInDraggableZone(MouseEvent event) { - return event.getY() < (GUI.RESIZE_MARGIN); + return event.getY() < (Constants.RESIZE_MARGIN); } } |