-
- All Known Implementing Classes:
LayoutService
public interface ILayoutService- Author:
- Jeff Riggle
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddTab(ITabContent tab)Adds a tab to the document area.StringaddTab(String bluePrintName)Adds a tab to the document area based off of a blueprint id.StringaddTab(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.StringgetLayout()MDIPersistencegetMDIPersistenceModel()SDIPersistencegetSDIPersistenceModel()ITabContentgetTabContent(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.voidloadLayout(String layoutData)Restores a document area to a previous state based off of a String.voidloadPersistenceModel(MDIPersistence persistence)Restores a document area to a previous state based off of a @see MDIPersistence object.voidloadPersistenceModel(SDIPersistence persistence)Restores a document area to a previous state based off of a @see SDIPersistence object.voidregisterBluePrint(String bluePrintName, ITabContentBluePrint bluePrint)Registers a blue print.voidremoveAllTabs()Removes all tabs from the MDI document.voidremoveTab(ITabContent tabContent)Removes a tab from the MDI document.voidremoveTab(String tabId)Removes a tab from the MDI document.voidsavePersistence()Saves the current document area.voidsetSelector(ilusr.iroshell.documentinterfaces.sdi.SelectorNode node)voidunregisterBluePrint(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.MDIIllegalArgumentException
-
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 IllegalStateExceptionRemoves 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.MDITransformerConfigurationExceptionParserConfigurationException
-
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.SDITransformerConfigurationExceptionParserConfigurationException
-
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.
-
-