public class AskNewSpatialHandler extends Object
Modifier and Type | Field and Description |
---|---|
protected AskNewSpatialUI |
ui |
Constructor and Description |
---|
AskNewSpatialHandler(AskNewSpatialUI ui) |
Modifier and Type | Method and Description |
---|---|
protected List<Cell> |
createNewCells(FisheryRegion newFisheryRegion,
FisheryRegion currentFisheryRegion)
Create new cells for new resolution and use old region
isLand() info. |
protected Map<Port,Cell> |
createNewPorts(List<Cell> newCells,
FisheryRegion newFisheryRegion,
FisheryRegion currentFisheryRegion)
Create new port filled with cell from new region.
|
protected Map<Zone,List<Cell>> |
createNewZones(List<Cell> newCells,
FisheryRegion newFisheryRegion,
FisheryRegion currentFisheryRegion)
Create new zones filled with cells from new region.
|
protected double |
intersectPercentage(Rectangle2D.Float r1,
Rectangle2D.Float r2,
Rectangle2D.Float intersect)
Intersection percentage between two rectangle (comparative to the min area of the two rectangle).
|
void |
performSpatialChange() |
protected AskNewSpatialUI ui
public AskNewSpatialHandler(AskNewSpatialUI ui)
public void performSpatialChange()
protected List<Cell> createNewCells(FisheryRegion newFisheryRegion, FisheryRegion currentFisheryRegion)
isLand()
info.newFisheryRegion
- new fichery regioncurrentFisheryRegion
- old fishery region (for matching)protected Map<Zone,List<Cell>> createNewZones(List<Cell> newCells, FisheryRegion newFisheryRegion, FisheryRegion currentFisheryRegion)
newCells
- new cellsnewFisheryRegion
- new regioncurrentFisheryRegion
- old regionprotected Map<Port,Cell> createNewPorts(List<Cell> newCells, FisheryRegion newFisheryRegion, FisheryRegion currentFisheryRegion)
newCells
- new cellsnewFisheryRegion
- new regioncurrentFisheryRegion
- old regionprotected double intersectPercentage(Rectangle2D.Float r1, Rectangle2D.Float r2, Rectangle2D.Float intersect)
r1
- first rectr2
- second rectintersect
- computed intersectionCopyright © 1999–2020 CodeLutin. All rights reserved.