A perspective presentation is a collection of parts with a layout. Each part
is parented to a main window, so you can create more than one presentation
on a set of parts and change the layout just by activating / deactivating a
presentation.
In addition, the user can change the position of any part by mouse
manipulation (drag & drop). If a part is removed, we leave a placeholder
behind to indicate where it goes should the part be added back.
describeLayout(StringBuffer buf) Writes a description of the layout to the given string buffer.
This is used for drag-drop test suites to determine if two layouts are the
same.
replacePlaceholderWithPart(LayoutPart part) Add a part to the presentation.
Note: unlike all other LayoutParts, PartPlaceholders will still point to
their parent container even when it is inactive.
Adds a part to the presentation. If a placeholder exists for the part
then swap the part in. Otherwise, add the part in the bottom right
corner of the presentation.
Writes a description of the layout to the given string buffer.
This is used for drag-drop test suites to determine if two layouts are the
same. Like a hash code, the description should compare as equal iff the
layouts are the same. However, it should be user-readable in order to
help debug failed tests. Although these are english readable strings,
they should not be translated or equality tests will fail.
Detached a part from the mainLayout. Presently this does not use placeholders
since the current implementation is not robust enough to remember a view's position
in more than one root container. For now the view is simply derefed and will dock
in the default position when attachPart is called.
By default parts detached this way are set to float on top of the workbench
without docking. It is assumed that people that want to drag a part back onto
the WorkbenchWindow will detach it via drag and drop.
Parameters: ref -
Returns the ratio that should be used when docking the given source
part onto the given target
Parameters: source - newly added part Parameters: target - existing part being dragged over the final size of the source part (wrt the current size of target)after it is docked
Returns whether the presentation is zoomed.
NOTE: As of 3.3 this method should always return 'false'
when using the new min/max behavior. It is only used for
legacy 'zoom' handling.
Returns whether changes to a part will affect zoom. There are a few
conditions for this .. - we are zoomed. - the part is contained in the
main window. - the part is not the zoom part - the part is not a fast
view - the part and the zoom part are not in the same editor workbook
- the part and the zoom part are not in the same view stack.
Add a part to the presentation.
Note: unlike all other LayoutParts, PartPlaceholders will still point to
their parent container even when it is inactive. This method relies on this
fact to locate the parent.
Captures the current bounds of all ViewStacks and the editor
area and puts them into an ID -> Rectangle map. This info is
used to cache the bounds so that we can correctly place minimized
stacks during a 'maximized' operation (where the iterative min's
affect the current layout while being performed.
willPartBeVisible
public boolean willPartBeVisible(String partId)(Code)
Returns true is not in a tab folder or if it is the top one in a tab
folder.
willPartBeVisible
public boolean willPartBeVisible(String partId, String secondaryId)(Code)