|
Lines 1-5
Link Here
|
| 1 |
/****************************************************************************** |
1 |
/****************************************************************************** |
| 2 |
* Copyright (c) 2002, 2006 IBM Corporation and others. |
2 |
* Copyright (c) 2002, 2008 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 11-17
Link Here
|
| 11 |
|
11 |
|
| 12 |
package org.eclipse.gmf.runtime.diagram.ui.editparts; |
12 |
package org.eclipse.gmf.runtime.diagram.ui.editparts; |
| 13 |
|
13 |
|
|
|
14 |
import org.eclipse.draw2d.Border; |
| 14 |
import org.eclipse.draw2d.IFigure; |
15 |
import org.eclipse.draw2d.IFigure; |
|
|
16 |
import org.eclipse.draw2d.LineBorder; |
| 15 |
import org.eclipse.emf.common.notify.Notification; |
17 |
import org.eclipse.emf.common.notify.Notification; |
| 16 |
import org.eclipse.emf.ecore.EObject; |
18 |
import org.eclipse.emf.ecore.EObject; |
| 17 |
import org.eclipse.gef.ExposeHelper; |
19 |
import org.eclipse.gef.ExposeHelper; |
|
Lines 70-75
Link Here
|
| 70 |
refreshShowCompartmentTitle(); |
72 |
refreshShowCompartmentTitle(); |
| 71 |
refreshCollapsed(); |
73 |
refreshCollapsed(); |
| 72 |
refreshRatio(); |
74 |
refreshRatio(); |
|
|
75 |
refreshLineWidth(); |
| 76 |
refreshLineType(); |
| 73 |
} |
77 |
} |
| 74 |
|
78 |
|
| 75 |
/** |
79 |
/** |
|
Lines 138-144
Link Here
|
| 138 |
NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || |
142 |
NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || |
| 139 |
NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) { |
143 |
NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) { |
| 140 |
refreshFont(); |
144 |
refreshFont(); |
| 141 |
} else |
145 |
} else if (NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)){ |
|
|
146 |
refreshLineWidth(); |
| 147 |
} else if (NotationPackage.eINSTANCE.getLineTypeStyle_LineType().equals(feature)) { |
| 148 |
refreshLineType(); |
| 149 |
} else |
| 142 |
super.handleNotificationEvent(event); |
150 |
super.handleNotificationEvent(event); |
| 143 |
} |
151 |
} |
| 144 |
|
152 |
|
|
Lines 229-234
Link Here
|
| 229 |
if (getCompartmentFigure()!=null) |
237 |
if (getCompartmentFigure()!=null) |
| 230 |
getCompartmentFigure().setFontColor(color); |
238 |
getCompartmentFigure().setFontColor(color); |
| 231 |
} |
239 |
} |
|
|
240 |
|
| 241 |
/** |
| 242 |
* Sets the line width for the shape's border |
| 243 |
* @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#setLineWidth(int) |
| 244 |
*/ |
| 245 |
protected void setLineWidth(int width) { |
| 246 |
Border border = getFigure().getBorder(); |
| 247 |
if (border instanceof LineBorder) { |
| 248 |
((LineBorder) border).setWidth(getMapMode().DPtoLP(width)); |
| 249 |
getFigure().revalidate(); |
| 250 |
} |
| 251 |
} |
| 252 |
|
| 253 |
/** |
| 254 |
* Sets the line type for the shape's border |
| 255 |
* @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#setLineType(int) |
| 256 |
*/ |
| 257 |
protected void setLineType(int type) { |
| 258 |
Border border = getFigure().getBorder(); |
| 259 |
if (border instanceof LineBorder) { |
| 260 |
((LineBorder) border).setStyle(type); |
| 261 |
} |
| 262 |
} |
| 232 |
|
263 |
|
| 233 |
/** |
264 |
/** |
| 234 |
* @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#addNotationalListeners() |
265 |
* @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#addNotationalListeners() |