|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
D - the type of element which can be written and read by this factoryP - the type of PerspectiveElement which can be written and read by this factoryL - the type of object that stores the contents of a D. If
clients cannot guarantee that always the same factory will be mapped
to the same identifier, then L should be set to Object
and the methods which receive a L should use
instanceof before casting the argument.public interface DockFactory<D extends DockElement,P extends PerspectiveElement,L>
A DockConverter which can not only store and load the contents of an
element, but also create a new DockElement with the content.
| Method Summary | |
|---|---|
void |
estimateLocations(L layout,
LocationEstimationMap children)
Tries to estimate the DockablePropertys of the children of the
station which is represented by layout. |
D |
layout(L layout,
java.util.Map<java.lang.Integer,Dockable> children,
PlaceholderStrategy placeholders)
Creates a new DockElement and changes the layout of the new
element such that is matches layout. |
D |
layout(L layout,
PlaceholderStrategy placeholders)
Creates a new DockElement and changes the layout of the new
element such that is matches layout. |
P |
layoutPerspective(L layout,
java.util.Map<java.lang.Integer,PerspectiveDockable> children)
Creates an element that can be used by a Perspective to create a layout
without creating any DockElements. |
void |
layoutPerspective(P perspective,
L layout,
java.util.Map<java.lang.Integer,PerspectiveDockable> children)
Updates the contents of perspective such that it reflects the contents of layout. |
| Methods inherited from interface bibliothek.gui.dock.layout.DockConverter |
|---|
getID, getLayout, getPerspectiveLayout, read, read, setLayout, setLayout, write, write |
| Method Detail |
|---|
void estimateLocations(L layout,
LocationEstimationMap children)
DockablePropertys of the children of the
station which is represented by layout.children.getChild( ... ), this
factory may also access the leafs in the tree of Dockables through
children.getSubChild(...).DockableProperty,
it is the callers responsibility to handle chains of stations.
layout - this stationchildren - the children of the station, this method should call
DockLayoutInfo.setLocation(DockableProperty) or LocationEstimationMap.setLocation(int, DockableProperty) and
LocationEstimationMap.setLocation(int, int, DockableProperty) for as many children as possible
D layout(L layout,
java.util.Map<java.lang.Integer,Dockable> children,
PlaceholderStrategy placeholders)
DockElement and changes the layout of the new
element such that is matches layout.
layout - the new layoutplaceholders - a strategy to detect invalid placeholders, can be null.
Factories loading only Dockables but no DockStations can safely ignore this argument.children - some children, note that the map may not contain all elements
which were present when the layout was created.
null if layout can't be used
D layout(L layout,
PlaceholderStrategy placeholders)
DockElement and changes the layout of the new
element such that is matches layout. This method should
not add any children to the element.
layout - the new layoutplaceholders - a strategy to detect invalid placeholders, can be null.
Factories loading only Dockables but no DockStations can safely ignore this argument.
null if layout can't be used
P layoutPerspective(L layout,
java.util.Map<java.lang.Integer,PerspectiveDockable> children)
Perspective to create a layout
without creating any DockElements. This method may return null only
if the client is guaranteed not to use a Perspective.
layout - the new layoutchildren - some children, note that the map may not contain all elements
which were present when the layout was created. Is null if the children of this
station are going to be ignored.
null, the return value of PerspectiveElement.getFactoryID() should
be equal to DockConverter.getID()
void layoutPerspective(P perspective,
L layout,
java.util.Map<java.lang.Integer,PerspectiveDockable> children)
perspective such that it reflects the contents of layout.
perspective - the perspective that is to be updatedlayout - the layout to applychildren - the new children of perspective, is null if the children of this
station are going to be ignored.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||