Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » tabitem features
tabitem features [message #99376] Tue, 22 July 2008 13:47 Go to next message
Emmanuel Marchal is currently offline Emmanuel MarchalFriend
Messages: 59
Registered: July 2009
Member
Hi,

I was wondering if there are any plans to implement decorators and
right-click menu on tabitem ?

thanks,

Emmanuel
Re: tabitem features [message #99550 is a reply to message #99376] Wed, 23 July 2008 11:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

I just checked with SWT. Right-Click (Mouse-Event) on TabItem are not
provided in SWT and will therefore not work in RWT, too. But maybe a
mouse listener on the TabFolder like in the following snippet does the
trick:

final Label[] label = new Label[ 1 ];
folder.addListener( SWT.MouseDown, new Listener() {
public void handleEvent( Event event ) {
if( label[ 0 ] != null ) {
label[ 0 ].dispose();
label[ 0 ] = null;
}
if( event.button == 3 ) {
label[ 0 ] = new Label( parent, SWT.NONE );
label[ 0 ].setText( "here we are: " + folder.getSelection()[ 0
].getText() );
label[ 0 ].pack();
label[ 0 ].setLocation( event.x, event.y );
label[ 0 ].moveAbove( folder );
}
}
});
folder.addListener( SWT.MouseUp, new Listener() {
public void handleEvent( Event event ) {
if( label[ 0 ] != null ) {
label[ 0 ].dispose();
label[ 0 ] = null;
}
}
});

Right mouse button down on the tabItem shows a label, mouse up removes
it.


Regarding decorators I'm not sure what you mean - decorators for TabItem
or decorators for text or images in general? The latter for example is
provided by DecorationOverlayIcon in the jface bundle.


Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: Emmanuel [mailto:emmanuel.marchal@n-side.be]
Bereitgestellt: Dienstag, 22. Juli 2008 15:47
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: tabitem features
Betreff: tabitem features

Hi,

I was wondering if there are any plans to implement decorators and
right-click menu on tabitem ?

thanks,

Emmanuel
Re: tabitem features [message #100202 is a reply to message #99550] Fri, 25 July 2008 12:32 Go to previous messageGo to next message
Emmanuel Marchal is currently offline Emmanuel MarchalFriend
Messages: 59
Registered: July 2009
Member
Hi, thanks for the snippet and your answers.

Is there any reasons why Menu was not implemented in SWT ? Could we hope
to have it in the future ?

About decorators, I already use them in a treeviewer. I have created an
decorator extension point with a enablement for a particular class that I
use in the content provider of my treeviewer. I also use the default
labelDecorator as decorator for this treeviewer
(PlatformUI.getWorkbench().getDecoratorManager().getLabelDec orator()).

I would like to the same with TabItems. But there is neither content
provider, nor labelDecorator in TabFolder. So my question is : how can I
decorate tabitem images ?

Thanks
Re: tabitem features [message #100519 is a reply to message #100202] Tue, 29 July 2008 08:31 Go to previous message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

regarding decorators, I didn't work with
DecorationOverlayIcon#createImage() yet, but I would give it a try. Once
created you can set the overlay image to the tabitem instance.


Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: Emmanuel [mailto:emmanuel.marchal@n-side.be]
Bereitgestellt: Freitag, 25. Juli 2008 14:32
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: tabitem features
Betreff: Re: tabitem features

Hi, thanks for the snippet and your answers.

Is there any reasons why Menu was not implemented in SWT ? Could we hope

to have it in the future ?

About decorators, I already use them in a treeviewer. I have created an

decorator extension point with a enablement for a particular class that
I
use in the content provider of my treeviewer. I also use the default
labelDecorator as decorator for this treeviewer
(PlatformUI.getWorkbench().getDecoratorManager().getLabelDec orator()).

I would like to the same with TabItems. But there is neither content
provider, nor labelDecorator in TabFolder. So my question is : how can I

decorate tabitem images ?

Thanks
Previous Topic:java.lang.IllegalArgumentException: An entry point named 'default' does not exis
Next Topic:a failture of org.eclipse.ui.part.ViewPart
Goto Forum:
  


Current Time: Fri Apr 26 11:14:44 GMT 2024

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

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

Back to the top