|
@@ -255,6 +255,8 @@ public class GUI<E> implements CategoryListener {
|
|
|
|
|
|
private int yProThis;
|
|
|
private int xProThis;
|
|
|
+ private int yProThisOneClick;
|
|
|
+ private int xProThisOneClick;
|
|
|
private AbstractCpsObject temp = null;
|
|
|
private final JMenuItem mntmUndo = new JMenuItem("Undo");
|
|
|
private final JMenuItem mntmRedo = new JMenuItem("Redo");
|
|
@@ -1152,6 +1154,9 @@ public class GUI<E> implements CategoryListener {
|
|
|
if (e.getClickCount() == 2) {
|
|
|
yProThis = e.getY();
|
|
|
xProThis = e.getX();
|
|
|
+ } else {
|
|
|
+ yProThisOneClick = e.getY();
|
|
|
+ xProThisOneClick = e.getX();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -1208,6 +1213,8 @@ public class GUI<E> implements CategoryListener {
|
|
|
updCon.getActualCps().setName(temp.toString());
|
|
|
}
|
|
|
} else {
|
|
|
+ selValueY = (int) Math.floor(yProThisOneClick / 16);
|
|
|
+ selValueX = (int) Math.floor(xProThisOneClick / (tableProperties.getWidth() / 2));
|
|
|
temp = model.getPropertyTable().getValueAt(selValueY, selValueX);
|
|
|
btemp = model.getPropertyTable().getValueAt(mousePos.y / tableProperties.getRowHeight(),
|
|
|
mousePos.x / (tableProperties.getWidth() / 2));
|
|
@@ -1308,8 +1315,8 @@ public class GUI<E> implements CategoryListener {
|
|
|
UpperNodeCanvas unc = ((UpperNodeCanvas) ((JScrollPane) tabTemp.getSelectedComponent())
|
|
|
.getViewport().getComponent(0));
|
|
|
|
|
|
- int x = (int) unc.getMousePosition().getX();
|
|
|
- int y = (int) unc.getMousePosition().getY();
|
|
|
+ int x = (int) unc.getMousePosition().getX() + 16;
|
|
|
+ int y = (int) unc.getMousePosition().getY() + 16;
|
|
|
|
|
|
if (x > unc.borderPos) {
|
|
|
|
|
@@ -1331,8 +1338,8 @@ public class GUI<E> implements CategoryListener {
|
|
|
unc.repaint();
|
|
|
}
|
|
|
} else {
|
|
|
- int x = (int) canvas.getMousePosition().getX();
|
|
|
- int y = (int) canvas.getMousePosition().getY();
|
|
|
+ int x = (int) canvas.getMousePosition().getX() + 16;
|
|
|
+ int y = (int) canvas.getMousePosition().getY() + 16;
|
|
|
|
|
|
AbstractCpsObject h = null;
|
|
|
if (tempCps instanceof HolonObject) {
|
|
@@ -1405,11 +1412,11 @@ public class GUI<E> implements CategoryListener {
|
|
|
if (actualObjectClicked.compareTo(cps.getObjName()) == 0) {
|
|
|
File checkPath = new File(cps.getImage());
|
|
|
if (checkPath.exists()) {
|
|
|
- img = new ImageIcon(cps.getImage()).getImage().getScaledInstance(50, 50,
|
|
|
+ img = new ImageIcon(cps.getImage()).getImage().getScaledInstance(32, 32,
|
|
|
java.awt.Image.SCALE_SMOOTH);
|
|
|
} else {
|
|
|
img = new ImageIcon(this.getClass().getResource(cps.getImage())).getImage()
|
|
|
- .getScaledInstance(50, 50, java.awt.Image.SCALE_SMOOTH);
|
|
|
+ .getScaledInstance(32, 32, java.awt.Image.SCALE_SMOOTH);
|
|
|
}
|
|
|
tempCps = cps;
|
|
|
dragging = true;
|