|
Lines 19-24
Link Here
|
| 19 |
import org.eclipse.draw2d.IFigure; |
19 |
import org.eclipse.draw2d.IFigure; |
| 20 |
import org.eclipse.draw2d.IImageFigure; |
20 |
import org.eclipse.draw2d.IImageFigure; |
| 21 |
import org.eclipse.draw2d.IImageFigure.ImageChangedListener; |
21 |
import org.eclipse.draw2d.IImageFigure.ImageChangedListener; |
|
|
22 |
import org.eclipse.draw2d.ImageFigure; |
| 22 |
import org.eclipse.draw2d.geometry.Dimension; |
23 |
import org.eclipse.draw2d.geometry.Dimension; |
| 23 |
import org.eclipse.draw2d.geometry.Point; |
24 |
import org.eclipse.draw2d.geometry.Point; |
| 24 |
import org.eclipse.draw2d.geometry.PointList; |
25 |
import org.eclipse.draw2d.geometry.PointList; |
|
Lines 262-277
Link Here
|
| 262 |
} |
263 |
} |
| 263 |
|
264 |
|
| 264 |
/** |
265 |
/** |
| 265 |
* Default constructor, for which reference point is at the cneter of the figure |
266 |
* Default constructor, for which reference point is at the center of the figure |
| 266 |
* |
267 |
* |
| 267 |
* @param container the <code>IFigure</code> bounding figure |
268 |
* @param container the <code>IFigure</code> bounding figure |
| 268 |
* @param imageFig the <code>ImageFigure</code> inside the bounding figure |
269 |
* @param imageFig the <code>ImageFigure</code> inside the bounding figure |
|
|
270 |
* @since 1.4 |
| 269 |
*/ |
271 |
*/ |
| 270 |
public SlidableImageAnchor(IFigure container, IImageFigure imageFig) { |
272 |
public SlidableImageAnchor(IFigure container, IImageFigure imageFig) { |
| 271 |
super(container); |
273 |
super(container); |
| 272 |
this.imageFig = imageFig; |
274 |
this.imageFig = imageFig; |
| 273 |
} |
275 |
} |
| 274 |
|
276 |
|
|
|
277 |
/** |
| 278 |
* Default constructor, for which reference point is at the center of the figure |
| 279 |
* |
| 280 |
* @param container the <code>IFigure</code> bounding figure |
| 281 |
* @param imageFig the <code>ImageFigure</code> inside the bounding figure |
| 282 |
* @deprecated use {@link #SlidableImageAnchor(IFigure, IImageFigure)} instead |
| 283 |
*/ |
| 284 |
public SlidableImageAnchor(IFigure container, ImageFigure imageFig) { |
| 285 |
this(container); |
| 286 |
this.imageFig = imageFig; |
| 287 |
} |
| 288 |
|
| 275 |
@Override |
289 |
@Override |
| 276 |
public void addAnchorListener(AnchorListener listener) { |
290 |
public void addAnchorListener(AnchorListener listener) { |
| 277 |
if (listener == null) |
291 |
if (listener == null) |
|
Lines 294-301
Link Here
|
| 294 |
* Constructor, for which reference point is specified |
308 |
* Constructor, for which reference point is specified |
| 295 |
* |
309 |
* |
| 296 |
* @param f the <code>IFigure</code> bounding figure |
310 |
* @param f the <code>IFigure</code> bounding figure |
| 297 |
* @param imageFig the <code>ImageFigure</code> inside the bounding figure |
311 |
* @param imageFig the <code>IImageFigure</code> inside the bounding figure |
| 298 |
* @param p the <code>PrecisionPoint</code> relative reference |
312 |
* @param p the <code>PrecisionPoint</code> relative reference |
|
|
313 |
* @since 1.4 |
| 299 |
*/ |
314 |
*/ |
| 300 |
public SlidableImageAnchor(IFigure f, IImageFigure imageFig, PrecisionPoint p) { |
315 |
public SlidableImageAnchor(IFigure f, IImageFigure imageFig, PrecisionPoint p) { |
| 301 |
super(f, p); |
316 |
super(f, p); |
|
Lines 303-308
Link Here
|
| 303 |
} |
318 |
} |
| 304 |
|
319 |
|
| 305 |
/** |
320 |
/** |
|
|
321 |
* Constructor, for which reference point is specified |
| 322 |
* |
| 323 |
* @param f the <code>IFigure</code> bounding figure |
| 324 |
* @param imageFig the <code>ImageFigure</code> inside the bounding figure |
| 325 |
* @param p the <code>PrecisionPoint</code> relative reference |
| 326 |
* @deprecated use {@link #SlidableImageAnchor(IFigure, IImageFigure, PrecisionPoint)} instead |
| 327 |
*/ |
| 328 |
public SlidableImageAnchor(IFigure f, ImageFigure imageFig, PrecisionPoint p) { |
| 329 |
super(f, p); |
| 330 |
this.imageFig = imageFig; |
| 331 |
} |
| 332 |
|
| 333 |
/** |
| 306 |
* Returns the image. |
334 |
* Returns the image. |
| 307 |
* |
335 |
* |
| 308 |
* @return the <code>Image</code> object |
336 |
* @return the <code>Image</code> object |
|
Lines 347-352
Link Here
|
| 347 |
return null; |
375 |
return null; |
| 348 |
} |
376 |
} |
| 349 |
|
377 |
|
|
|
378 |
/** |
| 379 |
* @since 1.4 |
| 380 |
*/ |
| 350 |
public void imageChanged() { |
381 |
public void imageChanged() { |
| 351 |
fireAnchorMoved(); |
382 |
fireAnchorMoved(); |
| 352 |
} |
383 |
} |