mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
selection rect
This commit is contained in:
+6
@@ -5,6 +5,7 @@ import java.awt.Dimension;
|
|||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.awt.Point;
|
import java.awt.Point;
|
||||||
import java.awt.geom.Point2D;
|
import java.awt.geom.Point2D;
|
||||||
|
import java.awt.geom.Rectangle2D;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -275,6 +276,11 @@ public interface IPlugInPort extends ISelectionProcessor, IMouseProcessor, IKeyP
|
|||||||
*/
|
*/
|
||||||
Point2D calculateSelectionDimension();
|
Point2D calculateSelectionDimension();
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return the smallest rectangle that encloses the selection
|
||||||
|
// */
|
||||||
|
// Rectangle2D getSelectedAreaRect();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends each of the selected components one step back.
|
* Sends each of the selected components one step back.
|
||||||
*/
|
*/
|
||||||
|
|||||||
+17
@@ -1533,6 +1533,23 @@ public class Presenter implements IPlugInPort {
|
|||||||
return dimension;
|
return dimension;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public Rectangle2D getSelectedAreaRect() {
|
||||||
|
// if (selectedComponents.isEmpty()) {
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
// Area area = new Area();
|
||||||
|
// for (IDIYComponent<?> component : selectedComponents) {
|
||||||
|
// Area componentArea = drawingManager.getComponentArea(component);
|
||||||
|
// if (componentArea != null) {
|
||||||
|
// area.add(componentArea);
|
||||||
|
// } else {
|
||||||
|
// LOG.warn("No area found for: " + component.getName());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return area.getBounds2D();
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a component to the project taking z-order into account.
|
* Adds a component to the project taking z-order into account.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user