Package org.openpnp.model
Class BoardLocation
- java.lang.Object
-
- org.openpnp.model.AbstractModelObject
-
- org.openpnp.model.Abstract2DLocatable<T>
-
- org.openpnp.model.PlacementsHolderLocation<BoardLocation>
-
- org.openpnp.model.BoardLocation
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.util.EventListener
,Identifiable
,Definable<BoardLocation>
public class BoardLocation extends PlacementsHolderLocation<BoardLocation>
A container for a Board that gives the board a physical Location relative to its parent. It also holds a coordinate transformation that is used to convert the board's local coordinates to its parent's coordinates. In addition, it contains information on where the Board's definition is stored in the file system.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openpnp.model.PlacementsHolderLocation
PlacementsHolderLocation.PlacementsTransformStatus
-
Nested classes/interfaces inherited from class org.openpnp.model.Abstract2DLocatable
Abstract2DLocatable.Side
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ID_PREFIX
-
Fields inherited from class org.openpnp.model.PlacementsHolderLocation
checkFiducials, fileName, ID_DELIMITTER, locallyEnabled, localToParentTransform, parent, placementsHolder, placementsTransformStatus
-
Fields inherited from class org.openpnp.model.Abstract2DLocatable
definition, dirty, id, location, side
-
Fields inherited from class org.openpnp.model.AbstractModelObject
propertyChangeSupport
-
-
Constructor Summary
Constructors Constructor Description BoardLocation()
Default constructorBoardLocation(Board board)
Constructs a BoardLocation for the specified BoardBoardLocation(BoardLocation boardLocation)
Constructs a deep copy of the specified BoardLocation
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
commit()
Called immediately after de-serializationvoid
dump(java.lang.String leader)
Provides a formated dump to the log fileBoard
getBoard()
java.util.Map<java.lang.String,java.lang.Boolean>
getPlaced()
Deprecated.placement status is now saved with the jobjava.awt.geom.AffineTransform
getPlacementTransform()
protected void
persist()
Called just prior to serializationvoid
setBoard(Board board)
Sets the board associated with this BoardLocationvoid
setPlacementTransform(java.awt.geom.AffineTransform placementTransform)
Sets the transform that converts the Board's local coordinates to those of its parentjava.lang.String
toString()
-
Methods inherited from class org.openpnp.model.PlacementsHolderLocation
dispose, flipSide, getFileName, getGlobalLocation, getGlobalSide, getLocalToGlobalTransform, getLocalToParentTransform, getParent, getPlacementsHolder, getPlacementsTransformStatus, getUniqueId, isCheckFiducials, isDescendantOf, isDescendantOfJob, isEnabled, isLocallyEnabled, isParentBranchEnabled, setCheckFiducials, setFileName, setGlobalLocation, setGlobalSide, setLocallyEnabled, setLocalToGlobalTransform, setLocalToParentTransform, setLocation, setParent, setPlacementsHolder, setPlacementsTransformStatus
-
Methods inherited from class org.openpnp.model.Abstract2DLocatable
getDefinition, getId, getLocation, getSide, isDefinition, isDirty, setDefinition, setDirty, setId, setSide
-
Methods inherited from class org.openpnp.model.AbstractModelObject
addPropertyChangeListener, addPropertyChangeListener, dumpListeners, fireIndexedPropertyChange, firePropertyChange, isListener, isListener, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openpnp.spi.Definable
propertyChange
-
-
-
-
Field Detail
-
ID_PREFIX
public static final java.lang.String ID_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BoardLocation
public BoardLocation()
Default constructor
-
BoardLocation
public BoardLocation(BoardLocation boardLocation)
Constructs a deep copy of the specified BoardLocation- Parameters:
boardLocation
-
-
BoardLocation
public BoardLocation(Board board)
Constructs a BoardLocation for the specified Board- Parameters:
board
- - the specified board
-
-
Method Detail
-
commit
protected void commit()
Called immediately after de-serialization- Overrides:
commit
in classPlacementsHolderLocation<BoardLocation>
-
persist
protected void persist()
Called just prior to serialization
-
getBoard
public Board getBoard()
- Returns:
- - the Board associated with this BoardLocation
-
setBoard
public void setBoard(Board board)
Sets the board associated with this BoardLocation- Parameters:
board
- - the board to set
-
getPlaced
@Deprecated public java.util.Map<java.lang.String,java.lang.Boolean> getPlaced()
Deprecated.placement status is now saved with the job- Returns:
- the placement status
-
getPlacementTransform
public java.awt.geom.AffineTransform getPlacementTransform()
- Returns:
- - the transform that converts the Board's local coordinates to those of its parent
-
setPlacementTransform
public void setPlacementTransform(java.awt.geom.AffineTransform placementTransform)
Sets the transform that converts the Board's local coordinates to those of its parent- Parameters:
placementTransform
- - the transform to set
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
dump
public void dump(java.lang.String leader)
Provides a formated dump to the log file- Parameters:
leader
- - prefix to indent the dump
-
-