Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gef-dev] draw2D : Canvas or Composite ?

Hi,

The documentation for Draw2D states "A draw2d instance consists of an SWT
Composite, a Lightweight System, and its contents: figures..."

Unfortunately, that is not completely correct - it consists of an SWT Canvas
( not Composite ). This is turning out to be a disadvantage for me when I
want to create an Eclipse View that contains a draw2D graphic. 

The "org.eclipse.ui.part.ViewPart" class passes a
"org.eclipse.swt.widgets.Composite" object in its method
"createPartControl()" which we need to implement in order to create an
Eclipse View. But this "Composite" object is not useful for me since the
"com.ibm.etools.draw2d.LightweightSystem" constructor expects a "Canvas" and
not a "Composite".

How can I get around this ? ( Creating a new Canvas object using the
Composite does not help ).

Thanks,
Manohar



Back to the top