SWT GC from IFigure Graphics? [message #166604] |
Wed, 02 February 2005 01:11  |
Eclipse User |
|
|
|
Originally posted by: jthomas.virtuality.com
I have a Draw2D/GEF application that allows extensibility by permitting
extension writers to write custom objects that do their own painting.
However, my custom objects do not understand Draw2D/GEF and can only write
to an SWT GC. Hence, the 'extension interface' defined by my Draw2D/GEF
application must include a 'paint' method as follows:
interface ICustomExtension
{
void paint(Rectangle rClippedArea, GC gc);
}
I would like the GEF application to call into the paint method for each
ICustomExtension implementation. From what I hear, Draw2D uses SWT behind
the scenes?
So, is it possible to obtain an SWT GC from a Draw2D IFigure Graphics
instance? Is there any online HTML javadoc reference to GEF available
someplace that I could refer to?
Please let me know.
Thank you.
- Jade
|
|
|
|
|
Re: SWT GC from IFigure Graphics? [message #166831 is a reply to message #166722] |
Thu, 03 February 2005 10:39  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
FigureCanvas.getLightweightSystem().getUpdateManager() would work.
DeferredUpdateManager.setGraphicsSource()
"Jade Thomas" <jthomas@virtuality.com> escreveu na mensagem
news:ctrlqn$r33$1@www.eclipse.org...
>
> If my application is a pure GEF application, how do I obtain a reference
> to the LightweightSystem?
>
> Once I get the LightweightSystem instance, I could obtain the
> 'UpdateManager' instance and update the GraphicsSource to my custom
> 'subclassed' SWTGraphics that maintains a reference to the underlying GC.
>
> Any suggestions?
>
> - Jade
>
>
>
> Randy Hudson wrote:
>
>> You could probably get access to the GC. Subclass SWTGraphics and hold
>> onto the SWT GC which is passed to the constructor. You need to replace
>> the LightweightSystem's GraphicsSource.
>
>
>> "Jade Thomas" <jthomas@virtuality.com> escreveu na mensagem
>> news:ctpqut$990$1@www.eclipse.org...
>>>
>>> I have a Draw2D/GEF application that allows extensibility by permitting
>>> extension writers to write custom objects that do their own painting.
>>> However, my custom objects do not understand Draw2D/GEF and can only
>>> write to an SWT GC. Hence, the 'extension interface' defined by my
>>> Draw2D/GEF application must include a 'paint' method as follows:
>>>
>>> interface ICustomExtension
>>> {
>>> void paint(Rectangle rClippedArea, GC gc);
>>> }
>>>
>>> I would like the GEF application to call into the paint method for each
>>> ICustomExtension implementation. From what I hear, Draw2D uses SWT
>>> behind the scenes?
>>>
>>> So, is it possible to obtain an SWT GC from a Draw2D IFigure Graphics
>>> instance? Is there any online HTML javadoc reference to GEF available
>>> someplace that I could refer to?
>>>
>>> Please let me know.
>>>
>>> Thank you.
>>>
>>> - Jade
>>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.06897 seconds