Right click rotates component while laying out on the canvas

This commit is contained in:
bancika
2012-08-16 10:23:51 +00:00
parent 6a4508b4a9
commit 21e46b3835
4 changed files with 9 additions and 3 deletions
@@ -187,7 +187,7 @@ class CanvasPanel extends JComponent implements Autoscroll {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if (e.getButton() == MouseEvent.BUTTON1) { if (e.getButton() == MouseEvent.BUTTON1) {
plugInPort.mouseClicked(e.getPoint(), e.isControlDown(), e.isShiftDown(), e plugInPort.mouseClicked(e.getPoint(), e.getButton(), e.isControlDown(), e.isShiftDown(), e
.isAltDown(), e.getClickCount()); .isAltDown(), e.getClickCount());
} }
} }
@@ -94,7 +94,9 @@ public class CanvasPlugin implements IPlugIn, ClipboardOwner {
@Override @Override
public void mouseReleased(MouseEvent e) { public void mouseReleased(MouseEvent e) {
if (e.isPopupTrigger()) { if (plugInPort.getNewComponentTypeSlot() != null) {
plugInPort.mouseClicked(e.getPoint(), e.getButton(), false, false, false, 1);
} else if (e.isPopupTrigger()) {
// Enable actions. // Enable actions.
boolean enabled = !plugInPort.getSelectedComponents().isEmpty(); boolean enabled = !plugInPort.getSelectedComponents().isEmpty();
getCutAction().setEnabled(enabled); getCutAction().setEnabled(enabled);
@@ -602,6 +602,10 @@
<releaseDate>2012-03-27 20:00:00.000 CET</releaseDate> <releaseDate>2012-03-27 20:00:00.000 CET</releaseDate>
<name></name> <name></name>
<changes> <changes>
<org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType>
<description>Right click rotates component while laying out on the canvas</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change> <org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType> <changeType>IMPROVEMENT</changeType>
<description>More usable "Bring to Forward" and "Send to Backward"</description> <description>More usable "Bring to Forward" and "Send to Backward"</description>