Package com.metsci.glimpse.docking.group
Interface ViewPlacementRule
-
public interface ViewPlacementRule
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectplaceView(GroupArrangement planArr, Set<String> existingViewIds, ViewPlacer<?> placer)It is fine for implementations to down-cast theplacerargument, as long as it is done with care.
-
-
-
Method Detail
-
placeView
Object placeView(GroupArrangement planArr, Set<String> existingViewIds, ViewPlacer<?> placer)
It is fine for implementations to down-cast theplacerargument, as long as it is done with care. Theplacerwill be an instance of a predictable subclass, based on theDockingGroupfrom which this rule is being invoked. For example, when invoked by aDockingGroupMultiframe, the rule will be given aViewPlacerMultiframe.Implementations should make exactly one call to one of the
placermethods, and return the result. For example:
NOTE: This method could use generics to declare that the return type should match the type parameter ofViewPlacementRule rule = ( planArr, existingViewIds, placer ) -> { DockerArrangementTile tile = ...; int viewNum = ...; return placer.addToTile( tile, viewNum ); };placer. However, Java does not allow lambda syntax when there are type parameters involved, so using generics would make this interface more cumbersome to work with.
-
-