|
|
@ -281,7 +281,7 @@ public class EditingMouseListener extends MouseInputAdapter { |
|
|
|
Rectangle rect = xcreator.getBounds(); |
|
|
|
Rectangle rect = xcreator.getBounds(); |
|
|
|
int min = rect.x + rect.width / 2 - minMoveSize; |
|
|
|
int min = rect.x + rect.width / 2 - minMoveSize; |
|
|
|
int max = rect.x + rect.width / 2 + minMoveSize; |
|
|
|
int max = rect.x + rect.width / 2 + minMoveSize; |
|
|
|
if (e.getX() > min && e.getX() < max) { |
|
|
|
if (e.getX() + designer.getHorizontalScaleValue() > min && e.getX() + designer.getHorizontalScaleValue() < max) { |
|
|
|
if (designer.getCursor().getType() != Cursor.HAND_CURSOR) { |
|
|
|
if (designer.getCursor().getType() != Cursor.HAND_CURSOR) { |
|
|
|
designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); |
|
|
|
designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); |
|
|
|
} |
|
|
|
} |
|
|
@ -673,8 +673,8 @@ public class EditingMouseListener extends MouseInputAdapter { |
|
|
|
currentEditor = designerEditor; |
|
|
|
currentEditor = designerEditor; |
|
|
|
currentXCreator = creator; |
|
|
|
currentXCreator = creator; |
|
|
|
Rectangle bounds = new Rectangle(1, 1, creator.getWidth() - 2, creator.getHeight() - 2); |
|
|
|
Rectangle bounds = new Rectangle(1, 1, creator.getWidth() - 2, creator.getHeight() - 2); |
|
|
|
bounds.x += (rect.x - designer.getArea().getHorizontalValue()); |
|
|
|
bounds.x += (rect.x - designer.getHorizontalScaleValue()); |
|
|
|
bounds.y += (rect.y - designer.getArea().getVerticalValue()); |
|
|
|
bounds.y += (rect.y - designer.getVerticalScaleValue()); |
|
|
|
designerEditor.getEditorTarget().setBounds(bounds); |
|
|
|
designerEditor.getEditorTarget().setBounds(bounds); |
|
|
|
designer.add(designerEditor.getEditorTarget()); |
|
|
|
designer.add(designerEditor.getEditorTarget()); |
|
|
|
designer.invalidate(); |
|
|
|
designer.invalidate(); |
|
|
|