Skip to content
Snippets Groups Projects
Commit 37f8feea authored by Daniela Genius's avatar Daniela Genius
Browse files

Merge branch 'master' of gitlab.enst.fr:mbe-tools/TTool into new-lip6

parents af2f4093 f739b348
No related branches found
No related tags found
1 merge request!255New lip6
13214 13220
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
...@@ -77,6 +77,8 @@ public class Robot extends Command { ...@@ -77,6 +77,8 @@ public class Robot extends Command {
private final static String MOVEA_RCLICK = "moverightclick"; private final static String MOVEA_RCLICK = "moverightclick";
private final static String MOVE_ABS = "movea"; private final static String MOVE_ABS = "movea";
private final static String MOVE_REL = "mover"; private final static String MOVE_REL = "mover";
private final static String DRAG_ABS = "draga";
private final static String DRAG_REL = "dragr";
private final static String ENTER_KEY = "key"; private final static String ENTER_KEY = "key";
private final static String ENTER_KEYS = "keys"; private final static String ENTER_KEYS = "keys";
private final static String ENTER_TEXT = "text"; private final static String ENTER_TEXT = "text";
...@@ -306,6 +308,64 @@ public class Robot extends Command { ...@@ -306,6 +308,64 @@ public class Robot extends Command {
} }
}; };
// drag tp abs coordinates
Command draga = new Command() {
public String getCommand() {
return DRAG_ABS;
}
public String getShortCommand() {
return "da";
}
public String getDescription() {
return "Drag mouse from current to a new absolute location";
}
public String executeCommand(String command, Interpreter interpreter) {
if (!interpreter.isTToolStarted()) {
return Interpreter.TTOOL_NOT_STARTED;
}
String ret; if ((ret = checkRobot()) != null) return ret;
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
if ((ret = moveAbsolute(command)) != null) return ret;
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
return null;
}
};
// drag tp abs coordinates
Command dragr = new Command() {
public String getCommand() {
return DRAG_REL;
}
public String getShortCommand() {
return "dr";
}
public String getDescription() {
return "Drag mouse from current to a new relative location";
}
public String executeCommand(String command, Interpreter interpreter) {
if (!interpreter.isTToolStarted()) {
return Interpreter.TTOOL_NOT_STARTED;
}
String ret; if ((ret = checkRobot()) != null) return ret;
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
if ((ret = moveRelative(command)) != null) return ret;
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
return null;
}
};
// entering x key event // entering x key event
Command keys = new Command() { Command keys = new Command() {
public String getCommand() { public String getCommand() {
...@@ -414,6 +474,8 @@ public class Robot extends Command { ...@@ -414,6 +474,8 @@ public class Robot extends Command {
addAndSortSubcommand(mover); addAndSortSubcommand(mover);
addAndSortSubcommand(movealc); addAndSortSubcommand(movealc);
addAndSortSubcommand(movearc); addAndSortSubcommand(movearc);
addAndSortSubcommand(draga);
addAndSortSubcommand(dragr);
addAndSortSubcommand(keys); addAndSortSubcommand(keys);
addAndSortSubcommand(key); addAndSortSubcommand(key);
addAndSortSubcommand(text); addAndSortSubcommand(text);
...@@ -471,8 +533,7 @@ public class Robot extends Command { ...@@ -471,8 +533,7 @@ public class Robot extends Command {
PointerInfo pi = MouseInfo.getPointerInfo(); PointerInfo pi = MouseInfo.getPointerInfo();
robot.mouseMove((int)(pi.getLocation().getX()) + x, (int)(pi.getLocation().getY()) + y); robot.mouseMove((int)(pi.getLocation().getX()) + x, (int)(pi.getLocation().getY()) + y);
robot.mouseMove(x, y);
} catch (Exception e) { } catch (Exception e) {
return Interpreter.BAD; return Interpreter.BAD;
} }
......
...@@ -60,9 +60,13 @@ import rationals.transformations.*; ...@@ -60,9 +60,13 @@ import rationals.transformations.*;
*/ */
public class AUTGraph implements myutil.Graph { public class AUTGraph implements myutil.Graph {
// Graph is defined with this only
protected ArrayList<AUTTransition> transitions; protected ArrayList<AUTTransition> transitions;
protected ArrayList<AUTState> states;
protected int nbState; protected int nbState;
// Can be built with computeStates()
protected ArrayList<AUTState> states;
protected BufferedReader br; protected BufferedReader br;
protected long nbTransition; protected long nbTransition;
protected int percentage; protected int percentage;
......
...@@ -50,8 +50,8 @@ package ui.util; ...@@ -50,8 +50,8 @@ package ui.util;
*/ */
public class DefaultText { public class DefaultText {
public static String BUILD = "13213"; public static String BUILD = "13219";
public static String DATE = "2019/10/30 03:07:26 CET"; public static String DATE = "2019/11/05 03:07:10 CET";
public static StringBuffer sbAbout = makeAbout(); public static StringBuffer sbAbout = makeAbout();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment