public class CheckboardingField
extends java.lang.Object
Constructor and Description |
---|
CheckboardingField(java.awt.geom.Point2D loc,
double x,
double y,
int cellId)
Constructor, set members
|
CheckboardingField(java.awt.geom.Point2D loc,
double x,
double y,
int cellId,
int cellIdX,
int cellIdY) |
Modifier and Type | Method and Description |
---|---|
int |
getCellId()
get cell id
|
double |
getCellX()
set width of this field
|
double |
getCellY()
get height of this field
|
int |
getCoordX() |
int |
getCoordY() |
java.util.concurrent.atomic.AtomicInteger |
getCounter() |
java.awt.geom.Point2D |
getLocation() |
PlacementFrame.PlacementNode |
getNode()
get placement node of this field
|
int |
getNotMovedCounter() |
OverlapDirection |
getOverlapDirection() |
OverlapDirection |
getOverlapDirection(double xPos,
double yPos,
double x,
double y)
get the direction of overlapping
north: negativ overlapping in y direction
east: positiv overlapping in x direction south: positiv overlapping in y direction west: negativ overlapping in x direction mixes (northeast, ...): overlapping in x and y direction otherwise: none |
double |
getOverlappingFractionInX() |
double |
getOverlappingFractionInX(double xPos,
double yPos,
double x,
double y)
get overlapping in x direction
|
double |
getOverlappingFractionInY() |
double |
getOverlappingFractionInY(double xPos,
double yPos,
double x,
double y)
get overlapping in y direction
|
boolean |
isOverlapping(double xPos,
double yPos,
double x,
double y)
returns true, if object with location (xPos, yPos) and width x and height
y doesn't fit to the current field, otherwise false
|
boolean |
isOverlappingBiggerThreshold(double threshold) |
void |
placeCentralized(PlacementFrame.PlacementNode node) |
void |
setCellId(int cellId)
set the id of this cell, the id can be used for defining positions in the
checkboarding grid
|
void |
setCellX(double cellX)
get width of this field
|
void |
setCellY(double cellY)
set field height
|
void |
setCoordX(int coordX) |
void |
setCoordY(int coordY) |
void |
setCounter(java.util.concurrent.atomic.AtomicInteger counter) |
void |
setLocation(java.awt.geom.Point2D location)
set location
|
void |
setNode(PlacementFrame.PlacementNode node)
set placement node
|
void |
setNotMovedCounter(int notMovedCounter) |
public CheckboardingField(java.awt.geom.Point2D loc, double x, double y, int cellId)
loc
- x
- y
- cellId
- public CheckboardingField(java.awt.geom.Point2D loc, double x, double y, int cellId, int cellIdX, int cellIdY)
public int getCellId()
public double getCellX()
public double getCellY()
public int getCoordX()
public int getCoordY()
public java.util.concurrent.atomic.AtomicInteger getCounter()
public java.awt.geom.Point2D getLocation()
public PlacementFrame.PlacementNode getNode()
public int getNotMovedCounter()
public OverlapDirection getOverlapDirection()
public OverlapDirection getOverlapDirection(double xPos, double yPos, double x, double y)
xPos
- yPos
- x
- y
- public double getOverlappingFractionInX()
public double getOverlappingFractionInX(double xPos, double yPos, double x, double y)
xPos
- yPos
- x
- y
- public double getOverlappingFractionInY()
public double getOverlappingFractionInY(double xPos, double yPos, double x, double y)
xPos
- yPos
- x
- y
- public boolean isOverlapping(double xPos, double yPos, double x, double y)
xPos
- yPos
- x
- y
- public boolean isOverlappingBiggerThreshold(double threshold)
public void placeCentralized(PlacementFrame.PlacementNode node)
public void setCellId(int cellId)
cellId
- public void setCellX(double cellX)
cellX
- public void setCellY(double cellY)
cellY
- public void setCoordX(int coordX)
public void setCoordY(int coordY)
public void setCounter(java.util.concurrent.atomic.AtomicInteger counter)
public void setLocation(java.awt.geom.Point2D location)
location
- public void setNode(PlacementFrame.PlacementNode node)
node
- public void setNotMovedCounter(int notMovedCounter)