public class DefaultLayoutContext extends Object implements LayoutContext
| Modifier and Type | Field and Description |
|---|---|
static String |
PERSISTENCE_DEFINITION_NAME |
| Constructor and Description |
|---|
DefaultLayoutContext()
Create a new object of LayoutContext.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFFrame(IFFrame frame,
boolean clearSelection,
boolean select)
It adds a fframe to Arraylist of FFrames .
|
void |
addFFrameSameProperties(IFFrame frame)
It adds a fframe to Arraylist of FFrames with the same properties.
|
void |
addObserver(Observer o) |
void |
addTocObserver(TocModelObserver observer) |
void |
clearSelection()
Clear the selection of FFrames.
|
Iterator |
deepiterator()
Get an Iterator over al elements in the layout.
|
void |
deleteObserver(Observer o) |
void |
deleteObservers() |
void |
delFFrame(IFFrame frame)
Remove the fframe of parameter.
|
void |
delFFrame(int index)
Remove the fframe of index.
|
void |
delFFrameSelected()
Remove the fframes selected.
|
void |
fullRefresh()
Refresh all FFrames of Layout.
|
IFFrame[] |
getAllFFrames()
It returns all the fframes included them erased and modified in all its
previous forms.
|
AffineTransform |
getAT()
Returns the AffineTransform that is applying in the Layout.
|
Attributes |
getAttributes()
It returns the print attributes of the Layout.
|
IFFrame |
getFFrame(int i)
It obtains the FFrame from an index.
|
IFFrame[] |
getFFrames()
It obtains the Array with all the FFrames that have been added al Layout.
|
FrameCommandsRecord |
getFrameCommandsRecord()
Returns the EditableFeatureSource, is the control of all change in the
FFrames of Layout.
|
int |
getNumBefore()
Returns other number before the current fframes.
|
int |
getNumBehind()
Returns other number behind the current fframes.
|
boolean |
getRuler()
Returns if is shown or not the rule of the Layout.
|
IFFrame[] |
getSelectedFFrames()
Gets the list of selected FFrames
|
<T> T[] |
getSelectedFFrames(Class<T> clazz)
Gets the list of selected FFrames that are instance of the provided
Class.
|
MapContext |
getTocModel()
Gets the model of the TOC.
|
boolean |
hasDocBeenOpened()
True when the document window has been opened at least once, false otherwise.
|
boolean |
isAdjustingToGrid()
It returns if has been applying in the fframes that are added to Layout
the grid, or not.
|
boolean |
isEditable()
It returns if the Layout is in edition.
|
boolean |
isGridVisible()
It returns if has been showing the grid of Layout, or not.
|
Iterator |
iterator() |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
notifAllObservers()
Call all LayoutDrawListeners.
|
void |
notifyTocUpdated(TocModelChangedNotification.Type type)
Triggers a notification to the TocModel observers of type
TocModelChangedNotification#MODEL_CHANGED |
static void |
registerPersistent() |
void |
removeTocObserver(TocModelObserver observer) |
void |
removeTocObservers() |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setAdjustToGrid(boolean b)
It inserts if has been applying in the fframes that are added to Layout
the grid, or not.
|
void |
setAtributes(Attributes attributes)
Inserts the print attributes of Layout.
|
void |
setEditable(boolean b)
It inserts if the Layout is in edition.
|
void |
setGridVisible(boolean b)
It inserts if draws the Grid in the Layout or not.
|
void |
setHasDocBeenOpened(boolean hasBeenOpened)
True when the document window has been opened at least once, false otherwise.
|
void |
setNumBefore(int numBefore) |
void |
setNumBehind(int numBehind) |
void |
setRuler(boolean b)
It inserts if is shown or not the rule of the Layout.
|
void |
setTocModel(MapContext tocModel)
Sets the model of the TOC.
|
void |
updateFFrames()
It orders the FFrames depending on its position specified by level.
|
public static final String PERSISTENCE_DEFINITION_NAME
public DefaultLayoutContext()
public AffineTransform getAT()
LayoutContextgetAT in interface LayoutContextpublic Attributes getAttributes()
LayoutContextgetAttributes in interface LayoutContextpublic void setAtributes(Attributes attributes)
LayoutContextsetAtributes in interface LayoutContextattributes - Attributes.public IFFrame[] getFFrames()
LayoutContextgetFFrames in interface LayoutContextpublic IFFrame getFFrame(int i)
LayoutContextgetFFrame in interface LayoutContextpublic void updateFFrames()
LayoutContextupdateFFrames in interface LayoutContextpublic void delFFrameSelected()
LayoutContextdelFFrameSelected in interface LayoutContextpublic void clearSelection()
LayoutContextclearSelection in interface LayoutContextpublic void delFFrame(int index)
LayoutContextdelFFrame in interface LayoutContextpublic void delFFrame(IFFrame frame)
LayoutContextdelFFrame in interface LayoutContextframe - FFrame to remove.public FrameCommandsRecord getFrameCommandsRecord()
LayoutContextgetFrameCommandsRecord in interface LayoutContextpublic void addFFrame(IFFrame frame, boolean clearSelection, boolean select)
LayoutContextaddFFrame in interface LayoutContextframe - fframe to add.clearSelection - True True if clean the selection of the fframes
already added and false if intends to maintain the same selection.select - Boolean that indicates if has to remain selected the FFrame
that is added or not.public void addFFrameSameProperties(IFFrame frame)
LayoutContextaddFFrameSameProperties in interface LayoutContextframe - fframe to add.public int getNumBehind()
LayoutContextgetNumBehind in interface LayoutContextpublic int getNumBefore()
LayoutContextgetNumBefore in interface LayoutContextpublic IFFrame[] getAllFFrames()
LayoutContextgetAllFFrames in interface LayoutContextpublic Iterator deepiterator()
LayoutContextdeepiterator in interface LayoutContextpublic Iterator iterator()
iterator in interface LayoutContextpublic IFFrame[] getSelectedFFrames()
LayoutContextgetSelectedFFrames in interface LayoutContextpublic <T> T[] getSelectedFFrames(Class<T> clazz)
LayoutContextgetSelectedFFrames in interface LayoutContextclazz - A classpublic boolean isEditable()
LayoutContextisEditable in interface LayoutContextpublic void setEditable(boolean b)
LayoutContextsetEditable in interface LayoutContextb - True if Layout is in edition.public boolean isAdjustingToGrid()
LayoutContextisAdjustingToGrid in interface LayoutContextpublic void setAdjustToGrid(boolean b)
LayoutContextsetAdjustToGrid in interface LayoutContextb - true if has been applying the grid.public void setRuler(boolean b)
LayoutContextsetRuler in interface LayoutContextb - True if is shown or not the rule of the Layout.public boolean getRuler()
LayoutContextgetRuler in interface LayoutContextpublic boolean isGridVisible()
LayoutContextisGridVisible in interface LayoutContextpublic void setGridVisible(boolean b)
LayoutContextsetGridVisible in interface LayoutContextb - True if draws the Grid in the Layout.public void fullRefresh()
LayoutContextfullRefresh in interface LayoutContextpublic void notifAllObservers()
LayoutContextnotifAllObservers in interface LayoutContextpublic static void registerPersistent()
public void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentPersistenceExceptionpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentPersistenceExceptionpublic void setNumBefore(int numBefore)
setNumBefore in interface LayoutContextpublic void setNumBehind(int numBehind)
setNumBehind in interface LayoutContextpublic void addObserver(Observer o)
addObserver in interface Observablepublic void deleteObserver(Observer o)
deleteObserver in interface Observablepublic void deleteObservers()
deleteObservers in interface Observablepublic void setTocModel(MapContext tocModel)
LayoutContextsetTocModel in interface LayoutContextpublic void notifyTocUpdated(TocModelChangedNotification.Type type)
LayoutContextTocModelChangedNotification#MODEL_CHANGEDnotifyTocUpdated in interface LayoutContextpublic MapContext getTocModel()
LayoutContextgetTocModel in interface LayoutContextpublic void addTocObserver(TocModelObserver observer)
addTocObserver in interface LayoutContextpublic void removeTocObserver(TocModelObserver observer)
removeTocObserver in interface LayoutContextpublic void removeTocObservers()
removeTocObservers in interface LayoutContextpublic boolean hasDocBeenOpened()
hasDocBeenOpened in interface LayoutContextpublic void setHasDocBeenOpened(boolean hasBeenOpened)
setHasDocBeenOpened in interface LayoutContext