Move selected components with arrow keys (and ctrl/shift)

This commit is contained in:
bancika
2012-08-17 10:41:31 +00:00
parent a6448676f7
commit 6ef7459d46
3 changed files with 504 additions and 275 deletions
@@ -0,0 +1,22 @@
package org.diylc.common;
public interface IKeyProcessor {
public static final int VK_LEFT = 0x25;
public static final int VK_UP = 0x26;
public static final int VK_RIGHT = 0x27;
public static final int VK_DOWN = 0x28;
/**
* Notifies the presenter that a key hes been pressed on the canvas.
*
* @param key
* @param ctrlDown
* @param shiftDown
* @param altDown
*
* @return true if the event should be consumed
*/
boolean keyPressed(int key, boolean ctrlDown, boolean shiftDown,
boolean altDown);
}
@@ -28,7 +28,7 @@ import org.diylc.core.Theme;
* @see IMessageListener * @see IMessageListener
* @see EventType * @see EventType
*/ */
public interface IPlugInPort extends ISelectionProcessor, IMouseProcessor { public interface IPlugInPort extends ISelectionProcessor, IMouseProcessor, IKeyProcessor {
public static final String ANTI_ALIASING_KEY = "antiAliasing"; public static final String ANTI_ALIASING_KEY = "antiAliasing";
public static final String HI_QUALITY_RENDER_KEY = "hiQualityRender"; public static final String HI_QUALITY_RENDER_KEY = "hiQualityRender";