added selection size

This commit is contained in:
bancika
2011-01-08 15:35:33 +00:00
parent a4309a169c
commit ad43ecd0ed
10 changed files with 139 additions and 16 deletions
@@ -1,10 +1,10 @@
package org.diylc.common;
import java.awt.Rectangle;
import java.awt.geom.Point2D;
import org.diylc.core.Project;
/**
* Enumerates all possible events between {@link IPlugInPort} and
* {@link IPlugIn}. Some events overlap so be careful which ones you subscribe
@@ -37,6 +37,12 @@ public enum EventType {
* {@link ComponentSelection} is attached as a parameter.
*/
SELECTION_CHANGED,
/**
* Called when selection size changes, together with a {@link Point2D}
* object containing selection size (x = width, y = height). Size is
* expressed in the default measure (cm for metric, inches for imperial).
*/
SELECTION_SIZE_CHANGED,
/**
* Called when display needs to be repainted. No parameters are passed.
*/
@@ -51,5 +57,12 @@ public enum EventType {
* {@link Project} are passed as parameters, one before and one after the
* change. The third parameter is a string containing change description.
*/
PROJECT_MODIFIED, AVAILABLE_CTRL_POINTS_CHANGED, SELECTED_CTRL_POINTS_CHANGED, ;
PROJECT_MODIFIED,
/**
* Called when control points under the cursor are changed. A single
* parameter is passed, an instance of
* <code>Map<IDIYComponent<?>, Set<Integer>></code> containing all the
* components and indices of their control points that are under the cursor.
*/
AVAILABLE_CTRL_POINTS_CHANGED, SELECTED_CTRL_POINTS_CHANGED, ;
}
@@ -288,4 +288,11 @@ public interface IPlugInPort {
* instantiate new component.
*/
void setNewComponentSlot(ComponentType componentType);
/**
* Changes default size notation, true for metric, false for imperial.
*
* @param isMetric
*/
void setMetric(boolean isMetric);
}