added project to component.draw

better logging
This commit is contained in:
bancika
2011-01-05 01:00:16 +00:00
parent dd50ccf785
commit 8db24c2588
11 changed files with 34 additions and 24 deletions
@@ -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));
@@ -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);