-
- All Known Implementing Classes:
LayoutService
public interface ILayoutService
- Author:
- Jeff Riggle
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addTab(ITabContent tab)
Adds a tab to the document area.String
addTab(String bluePrintName)
Adds a tab to the document area based off of a blueprint id.String
addTab(String bluePrintName, String customData)
Adds a tab with custom data to the document area based off of a blueprint id.javafx.beans.property.SimpleObjectProperty<DocumentType>
documentType()
This can be used to see what document state the application is in.String
getLayout()
MDIPersistence
getMDIPersistenceModel()
SDIPersistence
getSDIPersistenceModel()
ITabContent
getTabContent(String id)
Gets the @see ITabContent for a tab id.List<String>
getTabIds(String bluePrintName)
Gets all tabs that are registered to a specific blue print name.void
loadLayout(String layoutData)
Restores a document area to a previous state based off of a String.void
loadPersistenceModel(MDIPersistence persistence)
Restores a document area to a previous state based off of a @see MDIPersistence object.void
loadPersistenceModel(SDIPersistence persistence)
Restores a document area to a previous state based off of a @see SDIPersistence object.void
registerBluePrint(String bluePrintName, ITabContentBluePrint bluePrint)
Registers a blue print.void
removeAllTabs()
Removes all tabs from the MDI document.void
removeTab(ITabContent tabContent)
Removes a tab from the MDI document.void
removeTab(String tabId)
Removes a tab from the MDI document.void
savePersistence()
Saves the current document area.void
setSelector(ilusr.iroshell.documentinterfaces.sdi.SelectorNode node)
void
unregisterBluePrint(String bluePrintName)
Unregisters a blue print.
-
-
-
Method Detail
-
registerBluePrint
void registerBluePrint(String bluePrintName, ITabContentBluePrint bluePrint)
Registers a blue print. This blue print can be used later withaddTab(String)
- Parameters:
bluePrintName
- The unique identifier for this blue print.bluePrint
- A @see ITabContentBluePrint that will be used to create tabs.
-
unregisterBluePrint
void unregisterBluePrint(String bluePrintName)
Unregisters a blue print.- Parameters:
bluePrintName
- The unique identifier for this blue print.
-
documentType
javafx.beans.property.SimpleObjectProperty<DocumentType> documentType()
This can be used to see what document state the application is in.- Returns:
- A SimpleObjectProperty of @see DocumentType.
-
setSelector
void setSelector(ilusr.iroshell.documentinterfaces.sdi.SelectorNode node) throws IllegalStateException
- Parameters:
node
- A @see Node to set as the selector node.- Throws:
IllegalStateException
- This will throw an IllegalStateException when the application is not inDocumentType.SDI
-
addTab
String addTab(String bluePrintName) throws IllegalArgumentException
Adds a tab to the document area based off of a blueprint id.- Parameters:
bluePrintName
- The blueprint to use in order to create this tab.- Returns:
- A unique identifier for the tab that was just created.
- Throws:
IllegalStateException
- This will throw an IllegalStateException when the application is not inDocumentType.MDI
IllegalArgumentException
-
addTab
String addTab(String bluePrintName, String customData) throws IllegalArgumentException
Adds a tab with custom data to the document area based off of a blueprint id.- Parameters:
bluePrintName
- The blueprint to use in order to create this tab.customData
- The custom data to create this tab with.- Returns:
- A unique identifier for the tab that was just created.
- Throws:
IllegalArgumentException
- This will throw an IllegalStateException when the application is not inDocumentType.MDI
-
addTab
void addTab(ITabContent tab)
Adds a tab to the document area.- Parameters:
tab
- A @see ITabContent to add to the document.
-
getTabContent
ITabContent getTabContent(String id)
Gets the @see ITabContent for a tab id.- Parameters:
id
- The id of the tab.- Returns:
- The @see ITabContent for a tab id.
-
getTabIds
List<String> getTabIds(String bluePrintName) throws IllegalStateException
Gets all tabs that are registered to a specific blue print name.- Parameters:
bluePrintName
- The blue print name to check for tab ids.- Returns:
- a List of tab ids associated with the passed blue print name.
- Throws:
IllegalStateException
- This will throw an IllegalStateException when the application is not inDocumentType.MDI
-
removeTab
void removeTab(String tabId) throws IllegalStateException
Removes a tab from the MDI document.- Parameters:
tabId
- The unique ID for the tab to remove.- Throws:
IllegalStateException
- This will throw an IllegalStateException when the application is not inDocumentType.MDI
-
removeTab
void removeTab(ITabContent tabContent) throws IllegalStateException
Removes a tab from the MDI document.- Parameters:
tabContent
- The @see ITabContent to remove.- Throws:
IllegalStateException
- This will throw an IllegalStateException when the application is not inDocumentType.MDI
-
removeAllTabs
void removeAllTabs() throws IllegalStateException
Removes all tabs from the MDI document.- Throws:
IllegalStateException
- This will throw an IllegalStateException when the application is not inDocumentType.MDI
-
getLayout
String getLayout()
- Returns:
- Gets a String representation of the document area. This can be used with
loadLayout(String)
to restore a layout.
-
getMDIPersistenceModel
MDIPersistence getMDIPersistenceModel() throws IllegalStateException, TransformerConfigurationException, ParserConfigurationException
- Returns:
- A @see MDIPersistence object representing the state of the document area.
- Throws:
IllegalStateException
- This will throw an IllegalStateException when the application is not inDocumentType.MDI
TransformerConfigurationException
ParserConfigurationException
-
getSDIPersistenceModel
SDIPersistence getSDIPersistenceModel() throws IllegalStateException, TransformerConfigurationException, ParserConfigurationException
- Returns:
- A @see SDIPersistence object representing the state of the document area.
- Throws:
IllegalStateException
- This will throw an IllegalStateException when the application is not inDocumentType.SDI
TransformerConfigurationException
ParserConfigurationException
-
savePersistence
void savePersistence()
Saves the current document area.
-
loadPersistenceModel
void loadPersistenceModel(MDIPersistence persistence) throws IllegalStateException
Restores a document area to a previous state based off of a @see MDIPersistence object.- Parameters:
persistence
- The document state to restore.- Throws:
IllegalStateException
- This will throw an IllegalStateException when the application is not inDocumentType.MDI
-
loadPersistenceModel
void loadPersistenceModel(SDIPersistence persistence) throws IllegalStateException
Restores a document area to a previous state based off of a @see SDIPersistence object.- Parameters:
persistence
- The document state to restore.- Throws:
IllegalStateException
- This will throw an IllegalStateException when the application is not inDocumentType.SDI
-
loadLayout
void loadLayout(String layoutData)
Restores a document area to a previous state based off of a String.- Parameters:
layoutData
- A layout string to restore.
-
-