Class DefaultLayoutContext
java.lang.Object
org.gvsig.app.project.documents.layout.DefaultLayoutContext
- All Implemented Interfaces:
LayoutContext,org.gvsig.tools.observer.Observable,org.gvsig.tools.persistence.Persistent
Model of LayoutControl.
- Author:
- Vicente Caballero Navarro
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidIt adds a fframe to Arraylist of FFrames .voidaddFFrameSameProperties(IFFrame frame) It adds a fframe to Arraylist of FFrames with the same properties.voidaddObserver(org.gvsig.tools.observer.Observer o) voidaddTocObserver(TocModelObserver observer) voidClear the selection of FFrames.Get an Iterator over al elements in the layout.voiddeleteObserver(org.gvsig.tools.observer.Observer o) voidvoiddelFFrame(int index) Remove the fframe of index.voidRemove the fframe of parameter.voidRemove the fframes selected.voidRefresh all FFrames of Layout.IFFrame[]It returns all the fframes included them erased and modified in all its previous forms.getAT()Returns the AffineTransform that is applying in the Layout.It returns the print attributes of the Layout.getFFrame(int i) It obtains the FFrame from an index.IFFrame[]It obtains the Array with all the FFrames that have been added al Layout.Returns the EditableFeatureSource, is the control of all change in the FFrames of Layout.intReturns other number before the current fframes.intReturns other number behind the current fframes.booleangetRuler()Returns if is shown or not the rule of the Layout.IFFrame[]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.org.gvsig.fmap.mapcontext.MapContextGets the model of the TOC.booleanTrue when the document window has been opened at least once, false otherwise.booleanIt returns if has been applying in the fframes that are added to Layout the grid, or not.booleanIt returns if the Layout is in edition.booleanIt returns if has been showing the grid of Layout, or not.iterator()voidloadFromState(org.gvsig.tools.persistence.PersistentState state) voidCall all LayoutDrawListeners.voidTriggers a notification to the TocModel observers of typeinvalid reference
TocModelChangedNotification#MODEL_CHANGEDstatic voidvoidremoveTocObserver(TocModelObserver observer) voidvoidsaveToState(org.gvsig.tools.persistence.PersistentState state) voidsetAdjustToGrid(boolean b) It inserts if has been applying in the fframes that are added to Layout the grid, or not.voidsetAtributes(Attributes attributes) Inserts the print attributes of Layout.voidsetEditable(boolean b) It inserts if the Layout is in edition.voidsetGridVisible(boolean b) It inserts if draws the Grid in the Layout or not.voidsetHasDocBeenOpened(boolean hasBeenOpened) True when the document window has been opened at least once, false otherwise.voidsetNumBefore(int numBefore) voidsetNumBehind(int numBehind) voidsetRuler(boolean b) It inserts if is shown or not the rule of the Layout.voidsetTocModel(org.gvsig.fmap.mapcontext.MapContext tocModel) Sets the model of the TOC.voidIt orders the FFrames depending on its position specified by level.
-
Field Details
-
PERSISTENCE_DEFINITION_NAME
- See Also:
-
-
Constructor Details
-
DefaultLayoutContext
public DefaultLayoutContext()Create a new object of LayoutContext.
-
-
Method Details
-
getAT
Description copied from interface:LayoutContextReturns the AffineTransform that is applying in the Layout.- Specified by:
getATin interfaceLayoutContext- Returns:
- AffineTransform
-
getAttributes
Description copied from interface:LayoutContextIt returns the print attributes of the Layout.- Specified by:
getAttributesin interfaceLayoutContext- Returns:
- Attributes.
-
setAtributes
Description copied from interface:LayoutContextInserts the print attributes of Layout.- Specified by:
setAtributesin interfaceLayoutContext- Parameters:
attributes- Attributes.
-
getFFrames
Description copied from interface:LayoutContextIt obtains the Array with all the FFrames that have been added al Layout.- Specified by:
getFFramesin interfaceLayoutContext- Returns:
- Array with all the FFrames that have been added al Layout.
-
getFFrame
Description copied from interface:LayoutContextIt obtains the FFrame from an index.- Specified by:
getFFramein interfaceLayoutContext
-
updateFFrames
public void updateFFrames()Description copied from interface:LayoutContextIt orders the FFrames depending on its position specified by level.- Specified by:
updateFFramesin interfaceLayoutContext
-
delFFrameSelected
public void delFFrameSelected()Description copied from interface:LayoutContextRemove the fframes selected.- Specified by:
delFFrameSelectedin interfaceLayoutContext
-
clearSelection
public void clearSelection()Description copied from interface:LayoutContextClear the selection of FFrames.- Specified by:
clearSelectionin interfaceLayoutContext
-
delFFrame
public void delFFrame(int index) Description copied from interface:LayoutContextRemove the fframe of index.- Specified by:
delFFramein interfaceLayoutContext
-
delFFrame
Description copied from interface:LayoutContextRemove the fframe of parameter.- Specified by:
delFFramein interfaceLayoutContext- Parameters:
frame- FFrame to remove.
-
getFrameCommandsRecord
Description copied from interface:LayoutContextReturns the EditableFeatureSource, is the control of all change in the FFrames of Layout.- Specified by:
getFrameCommandsRecordin interfaceLayoutContext- Returns:
- EditableFatureSource.
-
addFFrame
Description copied from interface:LayoutContextIt adds a fframe to Arraylist of FFrames .- Specified by:
addFFramein interfaceLayoutContext- Parameters:
frame- 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.
-
addFFrameSameProperties
Description copied from interface:LayoutContextIt adds a fframe to Arraylist of FFrames with the same properties.- Specified by:
addFFrameSamePropertiesin interfaceLayoutContext- Parameters:
frame- fframe to add.
-
getNumBehind
public int getNumBehind()Description copied from interface:LayoutContextReturns other number behind the current fframes.- Specified by:
getNumBehindin interfaceLayoutContext- Returns:
- new Position behind.
-
getNumBefore
public int getNumBefore()Description copied from interface:LayoutContextReturns other number before the current fframes.- Specified by:
getNumBeforein interfaceLayoutContext- Returns:
- new Position before.
-
getAllFFrames
Description copied from interface:LayoutContextIt returns all the fframes included them erased and modified in all its previous forms.- Specified by:
getAllFFramesin interfaceLayoutContext- Returns:
- IFFrame[] Array of FFrames.
-
deepiterator
Description copied from interface:LayoutContextGet an Iterator over al elements in the layout.- Specified by:
deepiteratorin interfaceLayoutContext- Returns:
-
iterator
- Specified by:
iteratorin interfaceLayoutContext
-
getSelectedFFrames
Description copied from interface:LayoutContextGets the list of selected FFrames- Specified by:
getSelectedFFramesin interfaceLayoutContext- Returns:
- An Array of selected FFrames
-
getSelectedFFrames
Description copied from interface:LayoutContextGets the list of selected FFrames that are instance of the provided Class.- Specified by:
getSelectedFFramesin interfaceLayoutContext- Type Parameters:
T-- Parameters:
clazz- A class- Returns:
- An Array of selected FFrames
-
isEditable
public boolean isEditable()Description copied from interface:LayoutContextIt returns if the Layout is in edition.- Specified by:
isEditablein interfaceLayoutContext- Returns:
- True if Layout is in edition.
-
setEditable
public void setEditable(boolean b) Description copied from interface:LayoutContextIt inserts if the Layout is in edition.- Specified by:
setEditablein interfaceLayoutContext- Parameters:
b- True if Layout is in edition.
-
isAdjustingToGrid
public boolean isAdjustingToGrid()Description copied from interface:LayoutContextIt returns if has been applying in the fframes that are added to Layout the grid, or not.- Specified by:
isAdjustingToGridin interfaceLayoutContext- Returns:
- true if has been applying the grid.
-
setAdjustToGrid
public void setAdjustToGrid(boolean b) Description copied from interface:LayoutContextIt inserts if has been applying in the fframes that are added to Layout the grid, or not.- Specified by:
setAdjustToGridin interfaceLayoutContext- Parameters:
b- true if has been applying the grid.
-
setRuler
public void setRuler(boolean b) Description copied from interface:LayoutContextIt inserts if is shown or not the rule of the Layout.- Specified by:
setRulerin interfaceLayoutContext- Parameters:
b- True if is shown or not the rule of the Layout.
-
getRuler
public boolean getRuler()Description copied from interface:LayoutContextReturns if is shown or not the rule of the Layout.- Specified by:
getRulerin interfaceLayoutContext- Returns:
- True si se muestra la regla.
-
isGridVisible
public boolean isGridVisible()Description copied from interface:LayoutContextIt returns if has been showing the grid of Layout, or not.- Specified by:
isGridVisiblein interfaceLayoutContext- Returns:
- true if has been showing the grid of Layout.
-
setGridVisible
public void setGridVisible(boolean b) Description copied from interface:LayoutContextIt inserts if draws the Grid in the Layout or not.- Specified by:
setGridVisiblein interfaceLayoutContext- Parameters:
b- True if draws the Grid in the Layout.
-
fullRefresh
public void fullRefresh()Description copied from interface:LayoutContextRefresh all FFrames of Layout.- Specified by:
fullRefreshin interfaceLayoutContext
-
notifAllObservers
public void notifAllObservers()Description copied from interface:LayoutContextCall all LayoutDrawListeners.- Specified by:
notifAllObserversin interfaceLayoutContext
-
registerPersistent
public static void registerPersistent() -
loadFromState
public void loadFromState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException - Specified by:
loadFromStatein interfaceorg.gvsig.tools.persistence.Persistent- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-
saveToState
public void saveToState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException - Specified by:
saveToStatein interfaceorg.gvsig.tools.persistence.Persistent- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-
setNumBefore
public void setNumBefore(int numBefore) - Specified by:
setNumBeforein interfaceLayoutContext
-
setNumBehind
public void setNumBehind(int numBehind) - Specified by:
setNumBehindin interfaceLayoutContext
-
addObserver
public void addObserver(org.gvsig.tools.observer.Observer o) - Specified by:
addObserverin interfaceorg.gvsig.tools.observer.Observable
-
deleteObserver
public void deleteObserver(org.gvsig.tools.observer.Observer o) - Specified by:
deleteObserverin interfaceorg.gvsig.tools.observer.Observable
-
deleteObservers
public void deleteObservers()- Specified by:
deleteObserversin interfaceorg.gvsig.tools.observer.Observable
-
setTocModel
public void setTocModel(org.gvsig.fmap.mapcontext.MapContext tocModel) Description copied from interface:LayoutContextSets the model of the TOC. The LayoutPanel will create a TOC in the user interface if a tocModel has been set.- Specified by:
setTocModelin interfaceLayoutContext
-
notifyTocUpdated
Description copied from interface:LayoutContextTriggers a notification to the TocModel observers of typeinvalid reference
TocModelChangedNotification#MODEL_CHANGED- Specified by:
notifyTocUpdatedin interfaceLayoutContext
-
getTocModel
public org.gvsig.fmap.mapcontext.MapContext getTocModel()Description copied from interface:LayoutContextGets the model of the TOC. The LayoutPanel will create a TOC in the user interface if a tocModel has been set.- Specified by:
getTocModelin interfaceLayoutContext
-
addTocObserver
- Specified by:
addTocObserverin interfaceLayoutContext
-
removeTocObserver
- Specified by:
removeTocObserverin interfaceLayoutContext
-
removeTocObservers
public void removeTocObservers()- Specified by:
removeTocObserversin interfaceLayoutContext
-
hasDocBeenOpened
public boolean hasDocBeenOpened()True when the document window has been opened at least once, false otherwise. This is required to decide whether the page setting dialog has to be shown to the user, otherwise it would be shown every time the document is opened from project persistence- Specified by:
hasDocBeenOpenedin interfaceLayoutContext
-
setHasDocBeenOpened
public void setHasDocBeenOpened(boolean hasBeenOpened) True when the document window has been opened at least once, false otherwise. This is required to decide whether the page setting dialog has to be shown to the user, otherwise it would be shown every time the document is opened from project persistence- Specified by:
setHasDocBeenOpenedin interfaceLayoutContext
-