Class AskNewSpatialHandler
java.lang.Object
fr.ifremer.isisfish.ui.input.spatial.AskNewSpatialHandler
Handler for new fishery region resolution dialog.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateNewCells
(FisheryRegion newFisheryRegion, FisheryRegion currentFisheryRegion) Create new cells for new resolution and use old regionisLand()
info.createNewPorts
(List<Cell> newCells, FisheryRegion newFisheryRegion, FisheryRegion currentFisheryRegion) Create new port filled with cell from new region.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
-
Field Details
-
ui
-
-
Constructor Details
-
AskNewSpatialHandler
-
-
Method Details
-
performSpatialChange
public void performSpatialChange() -
createNewCells
protected List<Cell> createNewCells(FisheryRegion newFisheryRegion, FisheryRegion currentFisheryRegion) Create new cells for new resolution and use old regionisLand()
info.- Parameters:
newFisheryRegion
- new fichery regioncurrentFisheryRegion
- old fishery region (for matching)- Returns:
- new cells
-
createNewZones
protected Map<Zone,List<Cell>> createNewZones(List<Cell> newCells, FisheryRegion newFisheryRegion, FisheryRegion currentFisheryRegion) Create new zones filled with cells from new region.- Parameters:
newCells
- new cellsnewFisheryRegion
- new regioncurrentFisheryRegion
- old region- Returns:
- map between current zone and new cell for this zone
-
createNewPorts
protected Map<Port,Cell> createNewPorts(List<Cell> newCells, FisheryRegion newFisheryRegion, FisheryRegion currentFisheryRegion) Create new port filled with cell from new region.- Parameters:
newCells
- new cellsnewFisheryRegion
- new regioncurrentFisheryRegion
- old region- Returns:
- map between current ports and new cell for this zone
-
intersectPercentage
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).- Parameters:
r1
- first rectr2
- second rectintersect
- computed intersection- Returns:
- intersection percentage
-