public class MapBoxModel extends java.lang.Object implements IsEmpty, Persistent, Cloneable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PERSISTENCE_DEFINITION_NAME |
static int |
POSITION_AT_BOTOM_OF_CELL |
static int |
POSITION_AT_TOP_OF_CELL |
static int |
POSITION_IN_CELL |
static int |
POSITION_ON_LEFT_EDGE_OF_CELL |
static int |
POSITION_ON_RIGHT_EDGE_OF_CELL |
static int |
POSITION_OUT_OF_MAPBOX |
Constructor and Description |
---|
MapBoxModel() |
MapBoxModel(java.awt.geom.Dimension2D dimension,
int columns,
int rows) |
MapBoxModel(java.awt.geom.Dimension2D dimension,
java.util.List<Cell> cells) |
Modifier and Type | Method and Description |
---|---|
void |
add(Cell c) |
void |
addColumn(Cell cell)
Adds a column to the right of the cell column passed as a parameter
|
void |
addRow(Cell cell)
Adds a row below the row to which the cell passed as a parameter belongs
|
java.lang.Object |
clone()
Creates a copy of the object.
|
void |
combine(java.util.List<Cell> theCells) |
void |
dump(java.util.List<Cell> theCells) |
Cell |
getCell(double x,
double y) |
java.util.List<Cell> |
getCells() |
java.util.List<Cell> |
getCells(java.awt.geom.Rectangle2D r) |
<any> |
getRelativePosition(java.awt.geom.Point2D p,
double tolerance) |
void |
insertColumn(Cell cell)
Insert a column to the left of the cell column passed as a parameter
|
void |
insertRow(Cell cell) |
boolean |
isEmpty() |
Cell |
join(java.util.List<Cell> theCells) |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
moveHorizontalLine(double y0,
double y1) |
void |
moveVerticalLine(double x0,
double x1) |
static void |
registerPersistent() |
void |
removeCells(java.util.List<Cell> theCells) |
void |
removeCells(java.awt.Rectangle r) |
void |
removeColumn(Cell cell) |
void |
removeRow(Cell cell) |
void |
resize(java.awt.geom.Dimension2D dimension) |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
sort() |
void |
splitCellHorizontally(Cell theCell) |
void |
splitCellsHorizontally(java.util.List<Cell> theCells) |
void |
splitCellsVertically(java.util.List<Cell> theCells) |
void |
splitCellVertically(Cell theCell) |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isEmpty, isEmpty, isEmptyQuietly
cloneQuietly, cloneQuietly
public static final java.lang.String PERSISTENCE_DEFINITION_NAME
public static final int POSITION_OUT_OF_MAPBOX
public static final int POSITION_IN_CELL
public static final int POSITION_AT_TOP_OF_CELL
public static final int POSITION_AT_BOTOM_OF_CELL
public static final int POSITION_ON_LEFT_EDGE_OF_CELL
public static final int POSITION_ON_RIGHT_EDGE_OF_CELL
public MapBoxModel()
public MapBoxModel(java.awt.geom.Dimension2D dimension, int columns, int rows)
public MapBoxModel(java.awt.geom.Dimension2D dimension, java.util.List<Cell> cells)
public Cell getCell(double x, double y)
public java.util.List<Cell> getCells()
public java.util.List<Cell> getCells(java.awt.geom.Rectangle2D r)
public void add(Cell c)
public void insertRow(Cell cell)
public void insertColumn(Cell cell)
cell
- public void addRow(Cell cell)
cell
- public void addColumn(Cell cell)
cell
- public void dump(java.util.List<Cell> theCells)
public void sort()
public void combine(java.util.List<Cell> theCells)
public void splitCellHorizontally(Cell theCell)
public void splitCellsHorizontally(java.util.List<Cell> theCells)
public void splitCellVertically(Cell theCell)
public void splitCellsVertically(java.util.List<Cell> theCells)
public void removeCells(java.util.List<Cell> theCells)
public void removeCells(java.awt.Rectangle r)
public void removeColumn(Cell cell)
public void removeRow(Cell cell)
public void resize(java.awt.geom.Dimension2D dimension)
public <any> getRelativePosition(java.awt.geom.Point2D p, double tolerance)
public void moveVerticalLine(double x0, double x1)
public void moveHorizontalLine(double y0, double y1)
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Cloneable
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if the instance of the object cannot
be cloned. As this is extending Cloneable
so its sure
it implements it, so this exception may be used for problems on specific
object instances.Object#clone()}.
public static void registerPersistent()
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException