| 
| GEF draw2D Tabbed Pane [message #56833] | Tue, 21 January 2003 10:51  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: truenoto.yahoo.com 
 Hi,
 
 Is there a Tabbed Pane widget for GEF Draw 2d? I can only find ScrollPane.
 
 Thanks
 |  |  |  | 
|  | 
|  | 
| 
| Re: GEF draw2D Tabbed Pane [message #57993 is a reply to message #56886] | Fri, 24 January 2003 20:17   |  | 
| Eclipse User  |  |  |  |  | Originally posted by: truenoto.yahoo.com 
 Eric,
 
 I try creating a TabFolder for testing, and wrap it with a FigureCanvas.
 
 But how can I setup the content of that FigureCanvas. If I  call return
 FigureCanvas.getContents(), it returns null;
 
 
 
 
 
 <<<< my test code >>>>>>>>>>>>>>>>>>>>>
 
 Display display = Display.getCurrent();
 
 final Shell shell = new Shell (display);
 
 final TabFolder tabFolder = new TabFolder (shell, SWT.BORDER);
 
 for (int i=0; i<6; i++) {
 
 TabItem item = new TabItem (tabFolder, SWT.NULL);
 
 item.setText ("TabItem " + i);
 
 org.eclipse.swt.widgets.Button button = new org.eclipse.swt.widgets.Button
 (tabFolder, SWT.PUSH);
 
 button.setText ("Page " + i);
 
 item.setControl (button);
 
 }
 
 tabFolder.setSize (100, 100);
 
 
 FigureCanvas fc = new FigureCanvas(tabFolder);
 
 
 
 "Eric Bordeau" <ebordeau@us.ibm.com> wrote in message
 news:b0jqqq$n6b$1@rogue.oti.com...
 > No, but could you use an SWT TabFolder?  You could put a separate
 LightweightSystem or FigureCanvas
 > on each page.
 >
 > Eric
 >
 >
 > Takumi Fujiwara wrote:
 > > Hi,
 > >
 > > Is there a Tabbed Pane widget for GEF Draw 2d? I can only find
 ScrollPane.
 > >
 > > Thanks
 > >
 > >
 >
 |  |  |  | 
| 
| Re: GEF draw2D Tabbed Pane [message #58016 is a reply to message #57993] | Sat, 25 January 2003 11:05   |  | 
| Eclipse User  |  |  |  |  | You have to call setContents(IFigure) on the FigureCanvas before you can get anything back from getContents().
 
 Eric
 
 
 
 Takumi Fujiwara wrote:
 > Eric,
 >
 > I try creating a TabFolder for testing, and wrap it with a FigureCanvas.
 >
 > But how can I setup the content of that FigureCanvas. If I  call return
 > FigureCanvas.getContents(), it returns null;
 >
 >
 >
 >
 >
 > <<<< my test code >>>>>>>>>>>>>>>>>>>>>
 >
 > Display display = Display.getCurrent();
 >
 > final Shell shell = new Shell (display);
 >
 > final TabFolder tabFolder = new TabFolder (shell, SWT.BORDER);
 >
 > for (int i=0; i<6; i++) {
 >
 > TabItem item = new TabItem (tabFolder, SWT.NULL);
 >
 > item.setText ("TabItem " + i);
 >
 > org.eclipse.swt.widgets.Button button = new org.eclipse.swt.widgets.Button
 > (tabFolder, SWT.PUSH);
 >
 > button.setText ("Page " + i);
 >
 > item.setControl (button);
 >
 > }
 >
 > tabFolder.setSize (100, 100);
 >
 >
 > FigureCanvas fc = new FigureCanvas(tabFolder);
 >
 >
 >
 > "Eric Bordeau" <ebordeau@us.ibm.com> wrote in message
 > news:b0jqqq$n6b$1@rogue.oti.com...
 >
 >>No, but could you use an SWT TabFolder?  You could put a separate
 >
 > LightweightSystem or FigureCanvas
 >
 >>on each page.
 >>
 >>Eric
 >>
 >>
 >>Takumi Fujiwara wrote:
 >>
 >>>Hi,
 >>>
 >>>Is there a Tabbed Pane widget for GEF Draw 2d? I can only find
 >
 > ScrollPane.
 >
 >>>Thanks
 >>>
 >>>
 >>
 >
 >
 |  |  |  | 
| 
| Re: GEF draw2D Tabbed Pane [message #58116 is a reply to message #58016] | Sat, 25 January 2003 18:13   |  | 
| Eclipse User  |  |  |  |  | Originally posted by: truenoto.yahoo.com 
 what can I pass in to setContents()of FigureCanvas ?
 I can't get an IFigure  from TabFolder
 
 Thank you.
 
 
 "Eric Bordeau" <ebordeau@us.ibm.com> wrote in message
 news:b0uber$lpg$1@rogue.oti.com...
 > You have to call setContents(IFigure) on the FigureCanvas before you can
 get anything back from
 > getContents().
 >
 > Eric
 >
 >
 >
 > Takumi Fujiwara wrote:
 > > Eric,
 > >
 > > I try creating a TabFolder for testing, and wrap it with a FigureCanvas.
 > >
 > > But how can I setup the content of that FigureCanvas. If I  call return
 > > FigureCanvas.getContents(), it returns null;
 > >
 > >
 > >
 > >
 > >
 > > <<<< my test code >>>>>>>>>>>>>>>>>>>>>
 > >
 > > Display display = Display.getCurrent();
 > >
 > > final Shell shell = new Shell (display);
 > >
 > > final TabFolder tabFolder = new TabFolder (shell, SWT.BORDER);
 > >
 > > for (int i=0; i<6; i++) {
 > >
 > > TabItem item = new TabItem (tabFolder, SWT.NULL);
 > >
 > > item.setText ("TabItem " + i);
 > >
 > > org.eclipse.swt.widgets.Button button = new
 org.eclipse.swt.widgets.Button
 > > (tabFolder, SWT.PUSH);
 > >
 > > button.setText ("Page " + i);
 > >
 > > item.setControl (button);
 > >
 > > }
 > >
 > > tabFolder.setSize (100, 100);
 > >
 > >
 > > FigureCanvas fc = new FigureCanvas(tabFolder);
 > >
 > >
 > >
 > > "Eric Bordeau" <ebordeau@us.ibm.com> wrote in message
 > > news:b0jqqq$n6b$1@rogue.oti.com...
 > >
 > >>No, but could you use an SWT TabFolder?  You could put a separate
 > >
 > > LightweightSystem or FigureCanvas
 > >
 > >>on each page.
 > >>
 > >>Eric
 > >>
 > >>
 > >>Takumi Fujiwara wrote:
 > >>
 > >>>Hi,
 > >>>
 > >>>Is there a Tabbed Pane widget for GEF Draw 2d? I can only find
 > >
 > > ScrollPane.
 > >
 > >>>Thanks
 > >>>
 > >>>
 > >>
 > >
 > >
 >
 |  |  |  | 
| 
| Re: GEF draw2D Tabbed Pane [message #58165 is a reply to message #58116] | Sat, 25 January 2003 21:15   |  | 
| Eclipse User  |  |  |  |  | I'm sorry.  I misunderstood you.  Originally, I suggested you create a TabFolder and put a FigureCanvas on each separate tab...
 
 Shell shell = new Shell();
 FigureCanvas[] fc = new FigureCanvas[6];
 TabFolder tabFolder = new TabFolder(shell, SWT.BORDER);
 for (int i=0; i<6; i++) {
 TabItem item = new TabItem(tabFolder, SWT.NONE);
 item.setText("TabItem " + i);
 fc[i] = new FigureCanvas(tabFolder);
 fc[i].setContents(new Figure());
 item.setControl(fc[i]);
 }
 
 Now you have an array of FigureCanvases to manipulate.
 
 Eric
 
 
 
 Takumi Fujiwara wrote:
 > what can I pass in to setContents()of FigureCanvas ?
 > I can't get an IFigure  from TabFolder
 >
 > Thank you.
 >
 >
 > "Eric Bordeau" <ebordeau@us.ibm.com> wrote in message
 > news:b0uber$lpg$1@rogue.oti.com...
 >
 >>You have to call setContents(IFigure) on the FigureCanvas before you can
 >
 > get anything back from
 >
 >>getContents().
 >>
 >>Eric
 >>
 >>
 >>
 >>Takumi Fujiwara wrote:
 >>
 >>>Eric,
 >>>
 >>>I try creating a TabFolder for testing, and wrap it with a FigureCanvas.
 >>>
 >>>But how can I setup the content of that FigureCanvas. If I  call return
 >>>FigureCanvas.getContents(), it returns null;
 >>>
 >>>
 >>>
 >>>
 >>>
 >>><<<< my test code >>>>>>>>>>>>>>>>>>>>>
 >>>
 >>>Display display = Display.getCurrent();
 >>>
 >>>final Shell shell = new Shell (display);
 >>>
 >>>final TabFolder tabFolder = new TabFolder (shell, SWT.BORDER);
 >>>
 >>>for (int i=0; i<6; i++) {
 >>>
 >>>TabItem item = new TabItem (tabFolder, SWT.NULL);
 >>>
 >>>item.setText ("TabItem " + i);
 >>>
 >>>org.eclipse.swt.widgets.Button button = new
 >
 > org.eclipse.swt.widgets.Button
 >
 >>>(tabFolder, SWT.PUSH);
 >>>
 >>>button.setText ("Page " + i);
 >>>
 >>>item.setControl (button);
 >>>
 >>>}
 >>>
 >>>tabFolder.setSize (100, 100);
 >>>
 >>>
 >>>FigureCanvas fc = new FigureCanvas(tabFolder);
 >>>
 >>>
 >>>
 >>>"Eric Bordeau" <ebordeau@us.ibm.com> wrote in message
 >>>news:b0jqqq$n6b$1@rogue.oti.com...
 >>>
 >>>
 >>>>No, but could you use an SWT TabFolder?  You could put a separate
 >>>
 >>>LightweightSystem or FigureCanvas
 >>>
 >>>
 >>>>on each page.
 >>>>
 >>>>Eric
 >>>>
 >>>>
 >>>>Takumi Fujiwara wrote:
 >>>>
 >>>>
 >>>>>Hi,
 >>>>>
 >>>>>Is there a Tabbed Pane widget for GEF Draw 2d? I can only find
 >>>
 >>>ScrollPane.
 >>>
 >>>
 >>>>>Thanks
 >>>>>
 >>>>>
 >>>>
 >>>
 >
 >
 |  |  |  | 
| 
| Re: GEF draw2D Tabbed Pane [message #58240 is a reply to message #56833] | Mon, 27 January 2003 09:22  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: hudsonr.us.i_b_m.com 
 It sounds like you want a lightweight TabFolder for use withing your
 diagram.
 No such figure exists, but you should have no trouble composing a couple of
 figures to create this behavior.  I would use a row of Clickables inside a
 Figure with a horizontal Toolbar layout.  Place this figure in the NORTH
 location of another Figure in a BorderLayout.  Then create a figure in
 StackLayout to host the pages, and place it in the CENTER location of the
 borderlayout.  when "action performed" happens on the clickable, use
 setVisible() to switch the visible page.
 
 "Takumi Fujiwara" <truenoto@yahoo.com> wrote in message
 news:b0jp74$m3r$1@rogue.oti.com...
 > Hi,
 >
 > Is there a Tabbed Pane widget for GEF Draw 2d? I can only find ScrollPane.
 >
 > Thanks
 >
 >
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.03749 seconds