Very basic presentation factory [message #818587] |
Sun, 11 March 2012 22:00 |
Mariusz Cwikla Messages: 15 Registered: January 2012 |
Junior Member |
|
|
Hello guys, I'm trying to modify standard UI just a little bit. I want to create a new panel on top of workbench window with some data. I tried to use Presentation factory & WindowComposer. I'm curious why workbench contents look a little different than in case when I don't use presentation factory.
Here is version without presentation factory (see 1.png)
It's standard RAP (you have nice looking parts, with blue frame, etc.). But when I use presentation factory with window composer, parts look ugly (see 2.png).
Here is code for my presentation factory it's really basic:
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.internal.provisional.action.CoolBarManager2;
import org.eclipse.jface.internal.provisional.action.ICoolBarManager2;
import org.eclipse.jface.internal.provisional.action.IToolBarContributionItem;
import org.eclipse.jface.internal.provisional.action.IToolBarManager2;
import org.eclipse.jface.internal.provisional.action.ToolBarContributionItem2;
import org.eclipse.jface.internal.provisional.action.ToolBarManager2;
import org.eclipse.rap.internal.design.example.managers.ContribItem;
import org.eclipse.rap.internal.design.example.managers.CoolBarManager;
import org.eclipse.rap.internal.design.example.managers.MenuBarManager;
import org.eclipse.rap.internal.design.example.managers.PartMenuManager;
import org.eclipse.rap.internal.design.example.managers.ToolBarManager;
import org.eclipse.rap.internal.design.example.managers.ViewToolBarManager;
import org.eclipse.rap.ui.interactiondesign.IWindowComposer;
import org.eclipse.rap.ui.interactiondesign.PresentationFactory;
public class MyPresentationFactory extends PresentationFactory {
public MyPresentationFactory() {
// TODO Auto-generated constructor stub
}
public ICoolBarManager2 createCoolBarManager() {
return new CoolBarManager();
}
public MenuManager createMenuBarManager() {
return new MenuBarManager();
}
public MenuManager createPartMenuManager() {
return new PartMenuManager();
}
public IToolBarContributionItem createToolBarContributionItem(final IToolBarManager toolBarManager, final String id) {
return new ContribItem(toolBarManager, id);
}
public IToolBarManager2 createToolBarManager() {
return new ToolBarManager();
}
public IToolBarManager2 createViewToolBarManager() {
return new ViewToolBarManager();
}
@Override
public IWindowComposer createWindowComposer() {
// my window composer just creates top bar with login, user, date, etc.)
return new WindowComposer();
}
}
I'm sure, that problem is caused by classes used in createXXX functions (they come from RAP demos).
Is there any easy way to add some custom composites to workbench without implementing whole presentation factory?
-
Attachment: 1.png
(Size: 82.25KB, Downloaded 219 times) -
Attachment: 2.png
(Size: 75.26KB, Downloaded 250 times)
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02288 seconds