mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
doc
This commit is contained in:
+2
-1
@@ -37,7 +37,8 @@ import java.util.Map;
|
||||
* creates an {@link Area} that corresponds to drawn objects. Before each
|
||||
* component is drawn, {@link #startedDrawingComponent()} should be called.
|
||||
* After the component is drawn, area may be retrieved using
|
||||
* {@link #finishedDrawingComponent()}.
|
||||
* {@link #finishedDrawingComponent()}. Graphics configuration (color, font,
|
||||
* etc) is reset between each two components.
|
||||
*
|
||||
* @author Branislav Stojkovic
|
||||
*/
|
||||
|
||||
+10
-6
@@ -49,7 +49,7 @@ import com.diyfever.gui.update.VersionNumber;
|
||||
import com.rits.cloning.Cloner;
|
||||
|
||||
/**
|
||||
* The main presenter class.
|
||||
* The main presenter class, contains core app logic and drawing routines.
|
||||
*
|
||||
* @author Branislav Stojkovic
|
||||
*/
|
||||
@@ -341,11 +341,6 @@ public class Presenter implements IPlugInPort {
|
||||
view.addMenuAction(action, menuName);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void setCursorIcon(Icon icon) {
|
||||
// view.setCursorIcon(icon);
|
||||
// }
|
||||
|
||||
/**
|
||||
* Finds all components whose areas include the specified {@link Point}.
|
||||
* Point is <b>not</b> scaled by the zoom factor.
|
||||
@@ -657,6 +652,10 @@ public class Presenter implements IPlugInPort {
|
||||
calculateSelectionDimension());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return selection size expressed in either inches or centimeters, based
|
||||
* on the user preference.
|
||||
*/
|
||||
private Point2D calculateSelectionDimension() {
|
||||
if (selectedComponents.isEmpty()) {
|
||||
return null;
|
||||
@@ -817,6 +816,11 @@ public class Presenter implements IPlugInPort {
|
||||
(int) (point.y / zoomLevel));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param component
|
||||
* @return true if control points should be rendered for the specified
|
||||
* component.
|
||||
*/
|
||||
private boolean shouldShowControlPointsFor(IDIYComponent<?> component) {
|
||||
ComponentType componentType = componentTypeMap.get(component.getClass());
|
||||
// Do not show control points for non-stretchable components.
|
||||
|
||||
Reference in New Issue
Block a user