public abstract class FFrame extends java.lang.Object implements IFFrame
Modifier and Type | Field and Description |
---|---|
protected java.awt.Rectangle |
e |
protected FrameFactory |
frameFactory |
static java.awt.Image |
iEResize |
static java.awt.Image |
iNResize |
protected java.awt.geom.AffineTransform |
lastAT |
protected LayoutManager |
layoutManager |
protected static Logger |
LOG |
protected java.awt.geom.Rectangle2D.Double |
m_BoundBox |
protected int |
m_Selected |
protected java.awt.Rectangle |
n |
protected java.awt.Rectangle |
ne |
protected java.awt.Rectangle |
no |
protected int |
num |
protected java.awt.Rectangle |
o |
protected ObservableHelper |
observers |
static java.lang.String |
PERSISTENCE_DEFINITION_NAME |
protected java.awt.Rectangle |
s |
protected java.awt.Rectangle |
se |
protected java.awt.Rectangle |
so |
Constructor and Description |
---|
FFrame() |
Modifier and Type | Method and Description |
---|---|
void |
addObserver(Observer o) |
java.lang.Object |
clone()
Creates a copy of the object.
|
boolean |
contains(java.awt.geom.Point2D p)
Devuelve true, si el punto que se pasa como par�metro esta contenido
dentro del boundingbox del fframe.
|
void |
deleteObserver(Observer o) |
void |
deleteObservers() |
void |
dispose()
Disposes the current object, to allow it to close and dispose any used
resources.
|
protected void |
doSetSelected(int selectedStatus) |
abstract void |
draw(java.awt.Graphics2D g,
java.awt.geom.AffineTransform at,
java.awt.geom.Rectangle2D r,
java.awt.image.BufferedImage imgBase)
Draws the FFrame on the provided Graphics, according to the
provided affine transform and the visible rectangle.
|
void |
drawDraft(java.awt.Graphics2D g)
Dibuja sobre el graphics el rect�ngulo del fframe en modo borrador.
|
void |
drawEmpty(java.awt.Graphics2D g)
Draws the FFrame rectangle on the provided Graphics2D, only showing the
FFrame name on an empty rectangle.
|
void |
drawHandlers(java.awt.Graphics2D g)
Dibuja los handlers sobre el boundingBox en el graphics que se pasa como
par�metro.
|
void |
drawSymbolTag(java.awt.Graphics2D g)
Dibuja sobre el graphics que se pasa como par�metro el icono que
representa que contiene un tag.
|
void |
frameAdded()
This method is called when the FFrame has been
added to the Layout
|
void |
frameRemoved()
This method is called when the FFrame has been
removed from the Layout
|
java.awt.geom.Rectangle2D.Double |
getBoundBox()
Returns the bounding box in centimeters of this FFrame, using paper
coordinates
|
java.awt.geom.Rectangle2D.Double |
getBoundingBox(java.awt.geom.AffineTransform at)
Returns the bounding box (in pixels) of this FFrame, based on the provided
AffineTransform.
|
int |
getContains(java.awt.geom.Point2D p)
Checks whether the provided point is contained within the FFrame
rectangle.
|
Document |
getDocument() |
FrameFactory |
getFrameFactory() |
java.awt.geom.Rectangle2D |
getLastMoveRect()
Devuelve el rect�ngulo que representa el �ltimo generado al desplazar
o modificar el tama�o del fframe.
|
LayoutContext |
getLayoutContext() |
int |
getLevel()
Devuelve el nivel en el que se encuentra el FFrame.
|
java.awt.Image |
getMapCursor(java.awt.geom.Point2D p)
Devuelve el Cursor adecuado seg�n como est� contenido el punto, si es
para desplazamiento, o cambio de tama�o.
|
java.awt.geom.Rectangle2D |
getMovieRect(int difx,
int dify)
Devuelve el rect�ngulo a partir del desplazamiento en el eje x y el
desplazamiento en el eje y.
|
java.awt.geom.Rectangle2D |
getMovieRect(int difx,
int dify,
boolean prop)
Devuelve el rectángulo a partir del desplazamiento en el eje x y el
desplazamiento en el eje y.
|
double |
getRotation()
Gets the rotation of the frame, measured in arc degrees
|
protected java.awt.geom.AffineTransform |
getRotationAT()
Gets the affine transform used to rotate the graphics when rotation is not 0
|
int |
getSelected()
Returns an integer representing the type of selection applied to the
FFrame.
|
java.lang.String |
getTag()
Devuelve el tag.
|
protected java.awt.geom.Rectangle2D |
getVisibleRect(java.awt.geom.Rectangle2D visibleLayoutDocRect,
java.awt.geom.Rectangle2D frame)
Gets the visible rectangle of the frame, taking rotation into
consideration.
|
static void |
initializeIcons()
Initilizes the static icons
|
boolean |
intersects(java.awt.geom.Rectangle2D rv,
java.awt.geom.Rectangle2D r)
Devuelve true si el rect�ngulo primero es null o si es distinto de null
e intersecta.
|
boolean |
isSelected()
Gets the selection status of the frame
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
static void |
registerPersistent() |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setBoundBox(java.awt.geom.Rectangle2D r)
Sets the bounding box in centimeters of this FFrame, using paper
coordinates.
|
void |
setDocument(Document document) |
void |
setFrameFactory(FrameFactory flf) |
void |
setLayoutContext(LayoutContext layoutContext) |
void |
setLevel(int l)
Inserta el nivel al que se encuentra el FFrame.
|
void |
setNum(int i)
Rellena con el n�mero de FFrame.
|
void |
setRotation(double rotation)
Sets the rotation of the frame, measured in arc degrees
|
void |
setSelected(boolean selected)
Sets the selected status of the frame.
|
void |
setSelected(java.awt.geom.Point2D p,
java.awt.event.MouseEvent e)
Sets the type of selection performed on the frame, based on the position
of the provided Point compared with the boundaries of the FFrame.
|
void |
setTag(java.lang.String s)
Rellena el tag del FFrame.
|
void |
updateRect(java.awt.geom.Rectangle2D r,
java.awt.geom.AffineTransform at)
Actualiza el BoundBox del FFrame a partir de su rect�ngulo en pixels y
la matriz de transformaci�n.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getNameFFrame
print
cloneQuietly, cloneQuietly
public static final java.lang.String PERSISTENCE_DEFINITION_NAME
protected static final Logger LOG
protected java.awt.geom.Rectangle2D.Double m_BoundBox
protected java.awt.geom.AffineTransform lastAT
protected int m_Selected
protected java.awt.Rectangle n
protected java.awt.Rectangle ne
protected java.awt.Rectangle e
protected java.awt.Rectangle se
protected java.awt.Rectangle s
protected java.awt.Rectangle so
protected java.awt.Rectangle o
protected java.awt.Rectangle no
protected int num
protected FrameFactory frameFactory
public static java.awt.Image iEResize
public static java.awt.Image iNResize
protected LayoutManager layoutManager
protected ObservableHelper observers
public void drawHandlers(java.awt.Graphics2D g)
drawHandlers
in interface IFFrame
g
- Graphics sobre el que dibujar.public void setSelected(java.awt.geom.Point2D p, java.awt.event.MouseEvent e)
setSelected
in interface IFFrame
p
- Point which should be evaluated to establish if the FFrame must
be selected or note
- Mouse event that triggered this method call#isSelected()}, {@link #getSelected()}
public void updateRect(java.awt.geom.Rectangle2D r, java.awt.geom.AffineTransform at)
updateRect
in interface IFFrame
r
- Rect�ngulo.at
- Matriz de transformaci�n.public java.awt.geom.Rectangle2D getMovieRect(int difx, int dify)
getMovieRect
in interface IFFrame
difx
- desplazamiento sobre el eje x.dify
- desplazamiento sobre el eje y.public java.awt.geom.Rectangle2D getMovieRect(int difx, int dify, boolean prop)
IFFrame
getMovieRect
in interface IFFrame
difx
- desplazamiento sobre el eje x.dify
- desplazamiento sobre el eje y.prop
- true para un desplazamiento proporcionalpublic java.awt.geom.Rectangle2D getLastMoveRect()
getLastMoveRect
in interface IFFrame
public int getSelected()
IFFrame.NOSELECT
,
IFFrame.NO
, IFFrame.N
, IFFrame.NE
,
IFFrame.O
, IFFrame.RECT
, IFFrame.E
,
IFFrame.SO
, IFFrame.S
, IFFrame.SE
.getSelected
in interface IFFrame
#isSelected()}, {@link #setSelected(boolean)}
public boolean isSelected()
isSelected
in interface IFFrame
true
if the frame is selected,
false
otherwise#getSelected()}, {@link #setSelected(boolean)}
public boolean contains(java.awt.geom.Point2D p)
public int getContains(java.awt.geom.Point2D p)
IFFrame
getContains
in interface IFFrame
p
- Point to compareIFFrame.NOSELECT
,
IFFrame.NO
, IFFrame.N
, IFFrame.NE
,
IFFrame.O
, IFFrame.RECT
, IFFrame.E
,
IFFrame.SO
, IFFrame.S
, IFFrame.SE
.public java.awt.Image getMapCursor(java.awt.geom.Point2D p)
getMapCursor
in interface IFFrame
p
- punto a comprobar.public abstract void draw(java.awt.Graphics2D g, java.awt.geom.AffineTransform at, java.awt.geom.Rectangle2D r, java.awt.image.BufferedImage imgBase)
public java.awt.geom.Rectangle2D.Double getBoundingBox(java.awt.geom.AffineTransform at)
getBoundingBox
in interface IFFrame
at
- Affine transform to apply to the sheet coordinates to get the
bounding box in pixels.public void setBoundBox(java.awt.geom.Rectangle2D r)
setBoundBox
in interface IFFrame
r
- Rectangle in centimeterspublic java.awt.geom.Rectangle2D.Double getBoundBox()
getBoundBox
in interface IFFrame
public void setSelected(boolean selected)
setSelected
in interface IFFrame
selected
- true
to select the frame, false
to
unselect it#isSelected()}, {@link #getSelected()}
protected void doSetSelected(int selectedStatus)
public void drawDraft(java.awt.Graphics2D g)
public void setNum(int i)
public void drawEmpty(java.awt.Graphics2D g)
g
- The graphics to draw onpublic boolean intersects(java.awt.geom.Rectangle2D rv, java.awt.geom.Rectangle2D r)
intersects
in interface IFFrame
rv
- Rect�ngulor
- Rect�ngulopublic void setTag(java.lang.String s)
public java.lang.String getTag()
public void drawSymbolTag(java.awt.Graphics2D g)
drawSymbolTag
in interface IFFrame
g
- Graphics sobre el que dibujar el icono.public void setRotation(double rotation)
setRotation
in interface IFFrame
rotation
- Rotation to apply to the frameprotected java.awt.geom.AffineTransform getRotationAT()
public double getRotation()
getRotation
in interface IFFrame
public int getLevel()
public void setLevel(int l)
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 void setFrameFactory(FrameFactory flf)
setFrameFactory
in interface IFFrame
public FrameFactory getFrameFactory()
getFrameFactory
in interface IFFrame
public static void initializeIcons()
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
public void addObserver(Observer o)
addObserver
in interface Observable
public void deleteObserver(Observer o)
deleteObserver
in interface Observable
public void deleteObservers()
deleteObservers
in interface Observable
public void dispose()
Disposable
NOTE:After calling this method, the object may not be usable anymore.
dispose
in interface Disposable
public void frameRemoved()
IFFrame
frameRemoved
in interface IFFrame
public void frameAdded()
IFFrame
frameAdded
in interface IFFrame
public LayoutContext getLayoutContext()
getLayoutContext
in interface IFFrame
public void setLayoutContext(LayoutContext layoutContext)
setLayoutContext
in interface IFFrame
public Document getDocument()
getDocument
in interface IFFrame
public void setDocument(Document document)
setDocument
in interface IFFrame
protected java.awt.geom.Rectangle2D getVisibleRect(java.awt.geom.Rectangle2D visibleLayoutDocRect, java.awt.geom.Rectangle2D frame)
visibleLayoutDocRect
- The visible area of the layout documentframe
- The bounding box of this frame