mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-12 02:02:16 +10:00
added project to component.draw
better logging
This commit is contained in:
+2
@@ -52,6 +52,7 @@ public class ComponentProcessor {
|
||||
* @param clazz
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<PropertyWrapper> extractProperties(Class<? extends IDIYComponent> clazz) {
|
||||
if (propertyCache.containsKey(clazz)) {
|
||||
return cloner.deepClone(propertyCache.get(clazz));
|
||||
@@ -95,6 +96,7 @@ public class ComponentProcessor {
|
||||
* @param clazz
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<ControlPointWrapper> extractControlPoints(Class<? extends IDIYComponent> clazz) {
|
||||
if (controlPointCache.containsKey(clazz)) {
|
||||
return cloner.deepClone(controlPointCache.get(clazz));
|
||||
|
||||
+2
-2
@@ -313,7 +313,7 @@ public class Presenter implements IPlugInPort {
|
||||
g2dWrapper.setComposite(alphaComposite);
|
||||
}
|
||||
// Draw the component through the g2dWrapper.
|
||||
component.draw(g2dWrapper, state);
|
||||
component.draw(g2dWrapper, state, currentProject);
|
||||
// Restore the composite if needed.
|
||||
if (state == ComponentState.DRAGGING) {
|
||||
g2dWrapper.setComposite(mainComposite);
|
||||
@@ -328,7 +328,7 @@ public class Presenter implements IPlugInPort {
|
||||
try {
|
||||
controlPoint.readFrom(component);
|
||||
if (shouldShowControlPoint(controlPoint, component)) {
|
||||
g2d.setColor(Color.blue);
|
||||
g2d.setColor(Constants.CONTROL_POINT_COLOR);
|
||||
g2d.setStroke(new BasicStroke(2));
|
||||
g2d.drawOval(controlPoint.getValue().x - 2,
|
||||
controlPoint.getValue().y - 2, 4, 4);
|
||||
|
||||
Reference in New Issue
Block a user