Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Minimum expected display size for Eclipse user?

Greg
I created a minimal implementation of 
AbstractRMLaunchConfigurationDynamicTab which creates an instance of my 
ScrolledComposite sample and the ScrolledPane does not work correctly 
there, while it does when implemented as an extension of 
PLaunchConfigurationTab. 
Dave



Dave Wootton/Poughkeepsie/IBM@IBMUS 
Sent by: ptp-dev-bounces@xxxxxxxxxxx
06/01/2007 09:27 PM
Please respond to
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>


To
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
cc

Subject
Re: [ptp-dev] Minimum expected display size for Eclipse user?






Greg
I did what I think you asked, after upgrading to the latest (RC2) Eclipse 
3.3 build and also updating PTP to the latest code.
I created a new class extending PLaunchConfigurationTab (BugTab) and added 
BugTab to the end of the array of panes in 
ParallelLaunchConfigurationTabGroup. I put code in BugGroup's 
createControl method to create a Composite object and called setControl() 
using taht Composite. I added the creation of my test ScrolledComposite 
class as a child of that Composite. When I run the test and switch to the 
BugTab tab and resize, the ScrolledComposite works correctly.

I tried my pane;l again, both trying to use ScrolledComposite as a child 
of TabFolder as Wyatt suggested, and also as the top level child object in 
my createControl method, and neither works correctly.
Dave
Greg Watson <g.watson@xxxxxxxxxxxx>


Greg Watson <g.watson@xxxxxxxxxxxx> 
Sent by: ptp-dev-bounces@xxxxxxxxxxx 
06/01/2007 01:37 PM 

Please respond to
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>




To

Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>

cc


Subject

Re: [ptp-dev] Minimum expected display size for Eclipse user?





Dave,

Can you try modifying the ParallelTab so it creates the 
ScrolledComposite directly (or have 
ParallelLaunchConfigurationTabGroup.createTabs() call your code 
directly), without going through the dynamic stuff? I'd like to know 
if this is something specific to PTP or related to the 
AbstractLaunchConfigurationTab implementation. If we can build a 
minimal plugin that exhibits this behavior, then we could submit it 
as a platform bug. There still might be time to get it fixed in 3.3.

Greg

On Jun 1, 2007, at 9:14 AM, Dave Wootton wrote:

> I found a small ScrolledComposite sample program which I 
> successfully ran.
> I then modified the sample to place the ScrolledComposite as a 
> child of a
> TabFolder object and it still worked correctly. I then made the 
> TabFolder
> object a child of a CTabFolder object and that worked correctly. 
> Finally I
> had a hierarchy of CTabFolder->Composite->TabFolder- 
> >ScrolledComposite and
> that worked correctly. In all cases, my ControlListener registered 
> on the
> ScrolledComposite object is seeing resize events.
>
> Finally, I modified my PTP code to make this sample class the only 
> object
> created as a child of 'parent' in createControl() and the
> ScrolledComposite object does not resize properly any more.
>
> I think this tells me that something is happening in the launch
> configuration to keep resize events from being forwarded to my
> ScrolledComposite widget.
> Dave
>
>
>
> Dave Wootton/Poughkeepsie/IBM@IBMUS
> Sent by: ptp-dev-bounces@xxxxxxxxxxx
> 06/01/2007 08:28 AM
> Please respond to
> Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
>
>
> To
> Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
> cc
>
> Subject
> Re: [ptp-dev] Minimum expected display size for Eclipse user?
>
>
>
>
>
>
> Thanks, Wyatt & Beth
>
> Wyatt - was your use of ScrolledComposite as a child (directly or
> indirectly) of a CTabPane or was it a different hierarchy?
>
> I've looked at both examples and am pretty confident I am following 
> the
> examples in my code but it still doesn't work.
>
> I think the problem is that the resize events are not making it far 
> enough
>
> down the widget hierarchy to reach my ScrolledComposite widget. I 
> wrote
> some debug code that starts with the Composite widget that is the
> immediate child of my ScrolledComposite and iterates up the parent 
> list.
> As I iterate, I use widget.setData("ID", String.valueOf(n++)) to set a
> unique identifier for each widget, and register my ControlListener. 
> So my
> Composite is id 0, and the ScrolledComposite id 1, etc.
>
> createControl() apparently gets called somewhere in the initial 
> display of
>
> the launch configuration, before I click the parallel tab, as I can 
> see a
> set of resize events that reach my ScrolledComposite, then a second 
> set
> starting from the Shell widget (id 19) to the immediate child of a
> CTabFolder widget (id 7). When I click the parallel tab, I then see 
> resize
>
> events the rest of the way to my Composite (id 0). I'm guessing 
> this is
> all part of the initial layout of the panel.
>
> When I manually resize the launch configuration panel, I see more 
> resize
> events starting from the Shell down to the child Composite of the
> CTabFolder (id 7), and no further. The only way I see any more resize
> events sent to my ScrolledComposite and Composite is if I click 
> another
> tab, such as debug, and then the parallel tab again, but even then 
> it's
> not resizing properly
>
> I'll keep looking, but am just wondering someone might recognize a
> possible restriction here. I'm sort of guessing a CTabFolder might not
> like anyone trying to resize subordinate widgets and refuses to 
> forward
> resize events to them. If the ScrolledPane widget isn't getting resize
> events, I can understand why scrollbars might not work.
>
> The one thing I am not doing that is in some examples is setting a 
> layout
> manager on the container (parent) of my ScrolledComposite because 
> in my
> case, the parent is a TabbedFolder widget, and I suspect I can't set a
> layout manager on it and expect it to work right.
>
> Maybe ScrolledComposites just hate me :-(
>
> Thanks
> Dave
>
>
>
> wspear <wspear@xxxxxxxxxxxxxx>
> Sent by: ptp-dev-bounces@xxxxxxxxxxx
> 05/31/2007 04:31 PM
> Please respond to
> Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
>
>
> To
> "Parallel Tools Platform general developers" <ptp-dev@xxxxxxxxxxx>
> cc
>
> Subject
> Re: [ptp-dev] Minimum expected display size for Eclipse user?
>
>
>
>
>
>
> Greetings,
>
> I'm not sure if this is applicable to your situation, but when I was
> creating scrollable tabs for the TAU plugins, this was how I did 
> it.  I
> found it looked better having each tab scroll individually, rather 
> than
> putting the entire tab-group in a scrollable composite.  That avoids
> having a lot of blank space on the bottom of tabs shorter than the 
> longest
>
> tab.  The tricky bit, I found, was making sure to specify a 'sane' 
> minimum
>
> size.  This only applies to vertical scrolling, but it should be 
> easy to
> apply it to horizontal.
>
> Regards,
> -Wyatt
>
>
>        //Define the top level composite and tab parent
>        Composite comp = new Composite(parent, SWT.NONE);//parent 
> provided
> as an argument
>         setControl(comp);
>         FillLayout topLayout = new FillLayout();
>         comp.setLayout(topLayout);
>         TabFolder tabParent = new TabFolder(comp, SWT.BORDER);
>
> //Repeat approximately the following for every tab:
>
>         TabItem anaTab = new TabItem(tabParent, SWT.NULL );
>         anaTab.setText("Tab Label");
>
>         ScrolledComposite scrollAna = new
> ScrolledComposite(tabParent,SWT.V_SCROLL);
>
>         Composite anaComp = new Composite(scrollAna, SWT.NONE );
>         anaTab.setControl(scrollAna);
>
>         anaComp.setLayout(createGridLayout(1, false, 0, 0));
>         anaComp.setLayoutData(spanGridData 
> (GridData.FILL_HORIZONTAL, 5));
>
> //Insert all of your actual tab content here, using anaComp as the 
> parent
> //Conclude the tab area with this (adjusting names as necessary for
> individual tabs):
>
>         anaComp.pack();
> //This gets the approximate height of the composite as rendered; a 
> good
> minSize for the scroller
>         int anaCompHeight=anaComp.computeSize(SWT.DEFAULT, 
> SWT.DEFAULT).y;
>
>         scrollAna.setContent(anaComp);
>         scrollAna.setMinSize(400, anaCompHeight);
>         scrollAna.setExpandHorizontal (true);
>         scrollAna.setExpandVertical(true);
>
>
>
>
> On 5/31/07, Beth Tibbitts <tibbitts@xxxxxxxxxx > wrote:
> There's a decent example here
> http://help.eclipse.org/help32/nftopic/org.eclipse.platform.doc.isv/ 
> reference/api/org/eclipse/swt/custom/ScrolledComposite.html
>
>
> But that's from the eclipse help which Doug said didn't help....
> it's just that this is a better example than most eclipse help 
> anyways.
> It explains two different way to use it.
> I have *not* tried this, so take it for whatever it's worth, possibly
> nothing.
>
> ...Beth
>
> Beth Tibbitts  (859) 243-4981  (TL 545-4981)
> High Productivity Tools / Parallel Tools   http://eclipse.org/ptp
> IBM T.J.Watson Research Center
> Mailing Address:  IBM Corp., 455 Park Place, Lexington, KY 40511
>
>
>
>              Doug Schaefer
>              < DSchaefer@xxxxxx
> 
> m>                                                         To
>              Sent by:                  Parallel Tools Platform general
>              ptp-dev-bounces@e         developers <ptp- 
> dev@xxxxxxxxxxx>
> 
> clipse.org                                                 cc
>
> 
> Subject
>              05/31/2007 04:01          RE: [ptp-dev] Minimum expected
>              PM                        display size for Eclipse user?
>
>
>              Please respond to
>               Parallel Tools
>              Platform general
>                 developers
>              <ptp-dev@eclipse.
>                    org>
>
>
>
>
>
>
> ScrolledComposite is evil. The last time I tried, I just kept 
> hacking away
> at the options until it worked. And even then it didn't work 
> exactly how I
> wanted. There must be examples out there. The Eclipse help didn't 
> help at
> all.
>
> Doug Schaefer, QNX Software Systems
> Eclipse CDT Project Lead, http://cdtdoug.blogspot.com
>
>
>> -----Original Message-----
>> From: ptp-dev-bounces@xxxxxxxxxxx [mailto:ptp-dev- 
>> bounces@xxxxxxxxxxx]
> On
>> Behalf Of Dave Wootton
>> Sent: Thursday, May 31, 2007 3:31 PM
>> To: Parallel Tools Platform general developers
>> Subject: Re: [ptp-dev] Minimum expected display size for Eclipse 
>> user?
>>
>> Some more info:
>> I added a ControlListener to 'parent', and to my ScrolledComposite 
>> and
>> Composite objects, with a println in the controlResized() method. 
>> I see
>> resize events for the ScrolledComposite each time createControl() is
>> invoked, and where 'parent' and my top level Composite don't get 
>> resize
>> events. When I resize the launch configuration pane manually, I don't
> see
>> any resize events at all for any of these three widgets. It seems a
> higher
>> level widget might be getting them. This could explain why my 
>> scrollbars
>> don't work.
>> Dave
>>
>>
>>
>> Dave Wootton/Poughkeepsie/IBM@IBMUS
>> Sent by: ptp-dev-bounces@xxxxxxxxxxx
>> 05/31/2007 03:19 PM
>> Please respond to
>> Parallel Tools Platform general developers < ptp-dev@xxxxxxxxxxx>
>>
>>
>> To
>> Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
>> cc
>>
>> Subject
>> Re: [ptp-dev] Minimum expected display size for Eclipse user?
>>
>>
>>
>>
>>
>>
>> I'm trying to make this work with a scrollbar but I'm missing 
>> something.
>
>
>> Originally, my code in createControl() was createing a Compoiste 
>> object
>> which I then filled in with a TabPane and a couple other widgets, 
>> where
>> the parent of this Composite object was the Composite object 
>> passed as
>> 'parent' in the createControl() invocation.
>>
>> I've now changed my code to create a ScrolledComposite object as the
>> immediate child of 'parent, then use the ScrolledComposite object 
>> as the
>
>
>> parent of my top level Composite object, also calling
>> ScrolledComposite.setContent() so that the ScrolledComposite object
> knows
>> what it contains. Once I fully populate my top level Composite 
>> object, I
>
>
>> call computeSize() and setSize() on the Composite and then
>> setMinimumSize() on the ScrolledComposite, where I think I am 
>> following
>> case 2 in the online help for ScrolledComposite.
>>
>> I end up with a display, with scroll bars, since I also call
>> setAlwaysShowScrollBars() for now, However, the scroll bars are 
>> always
>> full height, and my Composite does not scroll, as if the
> ScrolledComposite
>>
>> always thinks its big enough to display all of my Composite 
>> object. If I
>
>
>> shring the launch configuration panel, then the bottom of my 
>> Composite
>> object gets clipped. If I omit the call to setContent(), then the
>> scrollbars are able to scroll, but my Composite object doesn't 
>> scroll.
>>
>> I must be missing something obvious, but don't know what.
>>
>> Dave
>>
>>
>>
>> Beth Tibbitts/Watson/IBM@IBMUS
>> Sent by: ptp-dev-bounces@xxxxxxxxxxx
>> 05/31/2007 01:01 PM
>> Please respond to
>> Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
>>
>>
>> To
>> Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
>> cc
>>
>> Subject
>> Re: [ptp-dev] Minimum expected display size for Eclipse user?
>>
>>
>>
>>
>>
>>
>> Yes I vote for scrollbar.
>> 1024x768 will always be needed, especially for LCD projectors and 
>> demos.
>>
>> ...Beth
>>
>> Beth Tibbitts  (859) 243-4981  (TL 545-4981)
>> High Productivity Tools / Parallel Tools  http://eclipse.org/ptp
>> IBM T.J.Watson Research Center
>> Mailing Address:  IBM Corp., 455 Park Place, Lexington, KY 40511
>>
>>
>>
>>              "Randy M.
>>              Roberts"
>>              <rsqrd@xxxxxxxx>
> To
>>
>>
>>              Sent by:                  ptp-dev < ptp-dev@xxxxxxxxxxx>
>>              ptp-dev-bounces@e
> cc
>>
>>
>>              clipse.org
>>
> Subject
>>
>>
>>                                        Re: [ptp-dev] Minimum expected
>>              05/31/2007 12:01          display size for Eclipse user?
>>              PM
>>
>>
>>              Please respond to
>>               Parallel Tools
>>              Platform general
>>                 developers
>>              <ptp-dev@eclipse.
>>                    org>
>>
>>
>>
>>
>>
>>
>> Dave,
>>
>> Can you add a scrollbar?
>>
>> R^2
>>
>> On Thu, 2007-05-31 at 11:49 -0400, Dave Wootton wrote:
>>> Is there an expected minimum display size for Eclipse users? I'm
> looking
>>> at a launch configuration panel parallel tab with my 
>>> implementation of
>>> AbstractRMLaunchConfigurationDynamicTab, and it looks like it is too
>> tall
>>
>>> for a 1024x768 resolution display on my laptop. I removed the 
>>> calls to
>
>
>>> createVerticalSpacer() in the ParallelTab class, and the launch
>>> configuration panel barely fits afterward. If ParallelTab 
>>> provided an
>>> option to remove the queue dropdown, as well as the machine 
>>> dropdown,
>> that
>>> would help in cases where I don't need either.
>>>
>>> If this needs to run on a 1024x768 display, then I probably need to
>> create
>>> more tabs in my panel and move some fields around. Is 1024x768
>> considered
>>
>>> usable for Eclipse?
>>> Dave
>>> _______________________________________________
>>> ptp-dev mailing list
>>> ptp-dev@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/ptp-dev
>>
>> _______________________________________________
>> ptp-dev mailing list
>> ptp-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/ptp-dev
>>
>>
>> _______________________________________________
>> ptp-dev mailing list
>> ptp-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/ptp-dev
>>
>>
>> _______________________________________________
>> ptp-dev mailing list
>> ptp-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/ptp-dev
>>
>>
>> _______________________________________________
>> ptp-dev mailing list
>> ptp-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/ptp-dev
> _______________________________________________
> ptp-dev mailing list
> ptp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ptp-dev
>
>
> _______________________________________________
> ptp-dev mailing list
> ptp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ptp-dev
>
> _______________________________________________
> ptp-dev mailing list
> ptp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ptp-dev
>
>
> _______________________________________________
> ptp-dev mailing list
> ptp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ptp-dev
>
>
> _______________________________________________
> ptp-dev mailing list
> ptp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ptp-dev

_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev




Back to the top