Customization of the MToolItem rendering [message #1387835] |
Wed, 25 June 2014 13:03  |
Eclipse User |
|
|
|
In my application I need to customize the way the MToolItem with MMenu is rendered. Rather than default SplitMenuButton with ContextMenu, I would like to have something like Button which opens a javafx.stage.Popup with MenuItems rendered in rows (rows ends on separator).
I managed to achieve that by registering custom renderer factory, which simply is a subclass of DefWorkbenchRendererFactory with overridden getToolItemRendererClass() and getToolItemMenuRendererClass() methods. The problem now is that in order to create custom renderers I need to copy much part of the code from DefToolItemRenderer and DefToolItemMenuRenderer in order to customize their behavior. The methods I need to change are private so I can't solve it by extending them.
My question is, if the way I do it is correct or there is some another approach I overlooked?
Thanks,
Jacek
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04308 seconds