Which renderer renders the MinMax buttons for the Part Stack? [message #965938] |
Wed, 31 October 2012 12:20  |
Eclipse User |
|
|
|
I am trying to find out which renderer renders the MinMax buttons on the Part-Stack.
I will try to hide this Buttons in a pure e4 Application, where no MinMax Addon is present.
I thougth it would be the org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer but did not find any code, responsible for Min/Max Buttons.
Which renderer is responsible for rendering the Part-Stack?
|
|
|
|
Re: Which renderer renders the MinMax buttons for the Part Stack? [message #968523 is a reply to message #966097] |
Fri, 02 November 2012 10:25  |
Eclipse User |
|
|
|
Thnx for help!
i did it this way: I introduced an own renderer, which on default disables the MinMax Buttons.
public class StackRendererIvu extends StackRenderer {
/**
* The Application model tag, which displays min/max Buttons in the right/upper corner of the
* CTabFolder.
*/
private static final String WINDOWTAG_MINMAX = "minmax";
private static final Logger LOG = LoggerFactory.getLogger(StackRendererIvu.class);
@Override
public Object createWidget(MUIElement element, Object parent) {
Object o = super.createWidget(element, parent);
// the super class, which is the native renderer - renders a CTabFolder for the MPartStack
try {
MPartStack stack = (MPartStack) element;
CTabFolder ctf = (CTabFolder) o;
if (!stack.getTags().contains(WINDOWTAG_MINMAX)) {
ctf.setMinimizeVisible(false);
ctf.setMaximizeVisible(false);
}
} catch (Exception e) {
LOG.warn("Failed to cast the Widget, which was rendered for a MPartStack to a CTabFolder");
}
return o;
}
}
This renderer I registerd as describe in Lar's tutorial, here:
http://www.vogella.com/articles/EclipseRCP/article.html#context_who
|
|
|
Powered by
FUDForum. Page generated in 0.24710 seconds