Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » FigureCanvas vs. ScrollPane: a question
FigureCanvas vs. ScrollPane: a question [message #172148] Wed, 16 March 2005 18:36 Go to next message
Mark Powell is currently offline Mark PowellFriend
Messages: 14
Registered: July 2009
Junior Member
So, in the Draw2D API there are these two classes that can contain Figures
and provide scrolling: FigureCanvas, and ScrollPane.
FigureCanvas is lightweight (the O/S provides the scrollbars), and
ScrollPane is heavyweight (Draw2D paints the scrollbars).

Is the choice of which of these widgets to use purely aesthetic?

Are there any features other than how the scrollbars are rendered that you
get with using one versus using the other?

For instance, are each of these classes taking equal advantage of clipping
to the viewable area during repaints via DeferredUpdateManager, or is one of
these classes "smarter" about clipping than the other?

Thanks,
Mark
Re: FigureCanvas vs. ScrollPane: a question [message #172399 is a reply to message #172148] Thu, 17 March 2005 22:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Actually, FigureCanvas is heavyweight (an OS window), and ScrollPane is
lightweight (emulated).
Make your choice based on:

Use FigureCanvas if:
-you want the native appearance of the OS scrollbars
-you want optimized scrolling (using native bitblitting)

Use ScrollPane if:
- You need to nest the viewport inside a larger diagram
- You want to customize the scrollbar itself

"Mark Powell" <Mark.Powell@jpl.nasa.gov> wrote in message
news:d19ubp$jm2$1@www.eclipse.org...
>
> So, in the Draw2D API there are these two classes that can contain Figures
> and provide scrolling: FigureCanvas, and ScrollPane.
> FigureCanvas is lightweight (the O/S provides the scrollbars), and
> ScrollPane is heavyweight (Draw2D paints the scrollbars).
>
> Is the choice of which of these widgets to use purely aesthetic?
>
> Are there any features other than how the scrollbars are rendered that you
> get with using one versus using the other?
>
> For instance, are each of these classes taking equal advantage of clipping
> to the viewable area during repaints via DeferredUpdateManager, or is one
> of these classes "smarter" about clipping than the other?
>
> Thanks,
> Mark
>
>
Re: FigureCanvas vs. ScrollPane: a question [message #172407 is a reply to message #172399] Thu, 17 March 2005 22:16 Go to previous message
Mark Powell is currently offline Mark PowellFriend
Messages: 14
Registered: July 2009
Junior Member
Randy,

Thanks for the info...I always get lightweight and heavyweight mixed up :(
Are you also saying that by using ScrollPane one would not be taking
advantage of optimized scrolling via bitblitting? I'm thinking yes...

Thanks,
Mark

"Randy Hudson" <none@us.ibm.com> wrote in message
news:d1cunv$r0a$1@www.eclipse.org...
> Actually, FigureCanvas is heavyweight (an OS window), and ScrollPane is
> lightweight (emulated).
> Make your choice based on:
>
> Use FigureCanvas if:
> -you want the native appearance of the OS scrollbars
> -you want optimized scrolling (using native bitblitting)
>
> Use ScrollPane if:
> - You need to nest the viewport inside a larger diagram
> - You want to customize the scrollbar itself
>
> "Mark Powell" <Mark.Powell@jpl.nasa.gov> wrote in message
> news:d19ubp$jm2$1@www.eclipse.org...
>>
>> So, in the Draw2D API there are these two classes that can contain
>> Figures and provide scrolling: FigureCanvas, and ScrollPane.
>> FigureCanvas is lightweight (the O/S provides the scrollbars), and
>> ScrollPane is heavyweight (Draw2D paints the scrollbars).
>>
>> Is the choice of which of these widgets to use purely aesthetic?
>>
>> Are there any features other than how the scrollbars are rendered that
>> you get with using one versus using the other?
>>
>> For instance, are each of these classes taking equal advantage of
>> clipping to the viewable area during repaints via DeferredUpdateManager,
>> or is one of these classes "smarter" about clipping than the other?
>>
>> Thanks,
>> Mark
>>
>>
>
>
Previous Topic:layout manager troubles
Next Topic:Controling the number of connections
Goto Forum:
  


Current Time: Fri Apr 26 23:52:42 GMT 2024

Powered by FUDForum. Page generated in 0.02667 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top