|Re: How to set minimum size of column for GEF-Paletteviewer with ColumnsLayout? [message #1747113 is a reply to message #1746907]
||Wed, 09 November 2016 14:57
|| Matthias Wienand
Registered: March 2015
there is a workaround described in the thread from 2004 that you referenced:
Meanwhile, if you must have it, you can change ColumnsLayout so that its
default width (defaultConstraint.width) is the same as the palette width.
This workaround refers to the customization of the palette, where four different settings are available for the layout of the palette, of which you seem to be using the COLUMNS layout. This setting is respected within GroupEditPart, which creates a ColumnsLayout and manages its default constraints. Therefore, you can use paletteViewer#setEditPartFactory() to set a CustomPaletteEditPartFactory. Within the CustomPaletteEditPartFactory, you can create a CustomGroupEditPart instead of GroupEditPart. Finally, within CustomGroupEditPart, you can influence the ColumnsLayout that is created as well as its default constraints.
As all parts of the PaletteViewer can be customized via the MVC approach, you have full control over the palette. For an overview of the possible layouts within Draw2d, you can take a look at the Draw2d Examples .
Powered by FUDForum
. Page generated in 0.02391 seconds