Skip to main content



      Home
Home » Eclipse Projects » GEF » GEF draw2D Tabbed Pane
GEF draw2D Tabbed Pane [message #56833] Tue, 21 January 2003 10:51 Go to next message
Eclipse UserFriend
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 #56886 is a reply to message #56833] Tue, 21 January 2003 11:18 Go to previous messageGo to next message
Eclipse UserFriend
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 #56936 is a reply to message #56886] Tue, 21 January 2003 14:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: truenoto.yahoo.com

In the figure in Logic Editor example, it uses ScrollPane like the
following. How can I put separate LightweightSystem or FigureCanvas on each
page? And how can I put tab in each tab pane?



ScrollPane scrollpane = new ScrollPane();

pane = new FreeformLayer();

pane.setLayoutManager(new FreeformLayout());

setLayoutManager(new StackLayout());

add(scrollpane);

scrollpane.setViewport(new FreeformViewport());

scrollpane.setView(pane);

setBackgroundColor(ColorConstants.buttonLightest);

setOpaque(true);





"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 #57993 is a reply to message #56886] Fri, 24 January 2003 20:17 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>
>
Previous Topic:Connection Layer
Next Topic:Simple Examples and a Mouse Listener
Goto Forum:
  


Current Time: Thu May 22 19:37:20 EDT 2025

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

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

Back to the top