I’m working on laying out a perspective in SWT. To make things simple, it has no editor, just 1 or more views. There is a default view that should take the entire viewer area by default (can be maximized but doesn’t have to be) with no other viewers open. There are a small number (2-3) other views that can may or may not be opened by user input. When they are opened, the default view should take ~75% of the screen real estate and the others stacked to take ~25%.
I have a view that is always set to invisible called anchor. The default is related to this anchor as left. The other views are related to this anchor as stack.
This seems to work fine, expect for space. By default I can have 25% of the screen empty or I can have virtually no space allocated to the secondary views.
My questions:
- Is using the “anchor” a good pattern or is there something better?
- How would I make this conditional switch between one view open and multiple views?
Thanks!
M
I’m not quite sure if I got your question, but this is what I normally use:
This will create a layout with relative sizes, i.e. the workflow selection is on the left taking up 20% of the perspective width. The filter is below the workflow selection taking up 50% op the height and so on.
Maybe you can use this as a starting point.