selection & multi d&d fix

This commit is contained in:
bancika
2013-08-15 11:47:52 +00:00
parent 8c0cec70de
commit 448f87666d
3 changed files with 33 additions and 14 deletions
@@ -12,9 +12,9 @@
<classpathentry kind="lib" path="lib/org-openide-awt.jar"/> <classpathentry kind="lib" path="lib/org-openide-awt.jar"/>
<classpathentry kind="lib" path="lib/org-openide-util.jar"/> <classpathentry kind="lib" path="lib/org-openide-util.jar"/>
<classpathentry kind="lib" path="lib/org-openide-util-lookup.jar"/> <classpathentry kind="lib" path="lib/org-openide-util-lookup.jar"/>
<classpathentry kind="lib" path="lib/app-framework.jar"/>
<classpathentry kind="lib" path="lib/swing-framework.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/diylc-core"/> <classpathentry combineaccessrules="false" kind="src" path="/diylc-core"/>
<classpathentry combineaccessrules="false" kind="src" path="/app-framework"/>
<classpathentry combineaccessrules="false" kind="src" path="/swing-framework"/>
<classpathentry kind="lib" path="lib/xstream-1.4.3.jar"/> <classpathentry kind="lib" path="lib/xstream-1.4.3.jar"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>
@@ -100,26 +100,15 @@ public class CanvasPlugin implements IPlugIn, ClipboardOwner {
canvasPanel = new CanvasPanel(plugInPort); canvasPanel = new CanvasPanel(plugInPort);
canvasPanel.addMouseListener(new MouseAdapter() { canvasPanel.addMouseListener(new MouseAdapter() {
private boolean processedPressed = false;
@Override @Override
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
canvasPanel.requestFocus(); canvasPanel.requestFocus();
mouseReleased(e); mouseReleased(e);
processedPressed = true;
} }
@Override @Override
public void mouseReleased(final MouseEvent e) { public void mouseReleased(final MouseEvent e) {
// Do not send mouseClicked on release if it was already
// process on pressed.
if (processedPressed) {
processedPressed = false;
} else {
plugInPort.mouseClicked(e.getPoint(), e.getButton(), e
.isControlDown(), e.isShiftDown(), e
.isAltDown(), e.getClickCount());
}
// Invoke the rest of the code later so we get the chance to // Invoke the rest of the code later so we get the chance to
// process selection messages. // process selection messages.
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
@@ -185,6 +174,16 @@ public class CanvasPlugin implements IPlugIn, ClipboardOwner {
.isShiftDown(), e.isAltDown()); .isShiftDown(), e.isAltDown());
} }
}); });
canvasPanel.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
plugInPort.mouseClicked(e.getPoint(), e.getButton(), e
.isControlDown(), e.isShiftDown(), e.isAltDown(), e
.getClickCount());
}
});
} }
return canvasPanel; return canvasPanel;
} }
@@ -1249,5 +1249,25 @@
</changes> </changes>
<url>http://code.google.com/p/diy-layout-creator/downloads/list</url> <url>http://code.google.com/p/diy-layout-creator/downloads/list</url>
</org.diylc.appframework.update.Version> </org.diylc.appframework.update.Version>
<org.diylc.appframework.update.Version>
<versionNumber>
<major>3</major>
<minor>29</minor>
<build>0</build>
</versionNumber>
<releaseDate>2013-08-15 20:00:00.000 CET</releaseDate>
<name></name>
<changes>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>Issue with dragging multiple components</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>Issue with component selection</description>
</org.diylc.appframework.update.Change>
</changes>
<url>http://code.google.com/p/diy-layout-creator/downloads/list</url>
</org.diylc.appframework.update.Version>
</a> </a>
</java.util.Arrays_-ArrayList> </java.util.Arrays_-ArrayList>