|
|
|
@ -281,7 +281,7 @@ public class EditingMouseListener extends MouseInputAdapter {
|
|
|
|
|
Rectangle rect = xcreator.getBounds(); |
|
|
|
|
int min = 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) { |
|
|
|
|
designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); |
|
|
|
|
} |
|
|
|
@ -673,8 +673,8 @@ public class EditingMouseListener extends MouseInputAdapter {
|
|
|
|
|
currentEditor = designerEditor; |
|
|
|
|
currentXCreator = creator; |
|
|
|
|
Rectangle bounds = new Rectangle(1, 1, creator.getWidth() - 2, creator.getHeight() - 2); |
|
|
|
|
bounds.x += (rect.x - designer.getArea().getHorizontalValue()); |
|
|
|
|
bounds.y += (rect.y - designer.getArea().getVerticalValue()); |
|
|
|
|
bounds.x += (rect.x - designer.getHorizontalScaleValue()); |
|
|
|
|
bounds.y += (rect.y - designer.getVerticalScaleValue()); |
|
|
|
|
designerEditor.getEditorTarget().setBounds(bounds); |
|
|
|
|
designer.add(designerEditor.getEditorTarget()); |
|
|
|
|
designer.invalidate(); |
|
|
|
|