KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nightlabs > editor2d > edit > LineEditPart


1 /**
2  * <p> Project: com.nightlabs.editor2d </p>
3  * <p> Copyright: Copyright (c) 2004 </p>
4  * <p> Company: NightLabs GmbH (Germany) </p>
5  * <p> Creation Date: 21.12.2004 </p>
6  * <p> Author: Daniel Mazurek </p>
7 **/

8 package com.nightlabs.editor2d.edit;
9
10 import java.beans.PropertyChangeEvent JavaDoc;
11
12 import com.nightlabs.editor2d.LineDrawComponent;
13
14
15 public class LineEditPart
16 extends ShapeDrawComponentEditPart
17 {
18   /**
19    * @param drawComponent
20    */

21   public LineEditPart(LineDrawComponent drawComponent) {
22     super(drawComponent);
23   }
24     
25     public LineDrawComponent getLineDrawComponent() {
26       return (LineDrawComponent) getModel();
27     }
28     
29     protected void propertyChanged(PropertyChangeEvent JavaDoc evt)
30     {
31         super.propertyChanged(evt);
32         String JavaDoc propertyName = evt.getPropertyName();
33         if (propertyName.equals(LineDrawComponent.PROP_CONNECT)) {
34             LOGGER.debug(propertyName +" changed!");
35             refreshVisuals();
36         }
37     }
38     
39 // public void notifyChanged(Notification notification)
40
// {
41
// int type = notification.getEventType();
42
// int featureId = notification.getFeatureID(Editor2DPackage.class);
43
//
44
// // TODO: add Notification method for setting PathSegments to model
45
// if (type == Notification.SET)
46
// {
47
// switch (featureId)
48
// {
49
// case Editor2DPackage.LINE_DRAW_COMPONENT__CONNECT :
50
// LOGGER.debug("LINE_DRAW_COMPONENT__CONNECT Notified!");
51
// refreshVisuals();
52
// break;
53
// }
54
// }
55
// super.notifyChanged(notification);
56
// }
57
}
58
Popular Tags