Package org.flexdock.perspective
Class PerspectiveManager
java.lang.Object
org.flexdock.perspective.PerspectiveManager
- All Implemented Interfaces:
LayoutManager
- Author:
- Mateusz Szczap
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Perspective perspective) voidadd(Perspective perspective, boolean isDefault) voidaddListener(PerspectiveListener perspectiveListener) createLayout(DockingPort port) createPerspective(String perspectiveId) booleangetDockingState(String dockable) getDockingState(String dockable, boolean load) getDockingState(Dockable dockable) getDockingState(Dockable dockable, boolean load) static PerspectiveManagerstatic RootWindowstatic DockingPortstatic PersistenceHandlergetPerspective(String perspectiveId) static booleanbooleanload()booleanvoidvoidloadPerspective(String perspectiveId) voidloadPerspective(String perspectiveId, boolean reset) voidloadPerspective(String perspectiveId, Component window) voidloadPerspective(String perspectiveId, Component window, boolean reset) voidloadPerspective(String perspectiveId, DockingPort rootPort) voidloadPerspective(String perspectiveId, DockingPort rootPort, boolean reset) voidloadPerspectiveAsDefault(String perspectiveId) voidloadPerspectiveAsDefault(String perspectiveId, boolean reset) voidreload()voidPerspectiveManager#getMainApplicationWindow returns the first window where #getOwner == null.voidvoidvoidremoveListener(PerspectiveListener perspectiveListener) voidreset()voidvoidreset(DockingPort rootPort) booleanrestore(boolean loadFromStorage) voidvoidsetCurrentPerspective(String perspectiveId) voidsetCurrentPerspective(String perspectiveId, boolean asDefault) voidvoidsetDefaultPerspective(String perspectiveId) static voidsetFactory(PerspectiveFactory factory) static voidsetPersistenceHandler(PersistenceHandler handler) static voidsetRestoreFloatingOnLoad(boolean restoreFloatingOnLoad) booleanstore()boolean
-
Field Details
-
EMPTY_PERSPECTIVE
- See Also:
-
DEFAULT_PERSISTENCE_KEY_VALUE
- See Also:
-
-
Method Details
-
getInstance
-
setFactory
-
setPersistenceHandler
-
getPersistenceHandler
-
add
-
add
-
remove
-
getPerspective
-
createPerspective
-
getPerspectives
-
addListener
-
removeListener
-
getPerspectiveListeners
-
setDefaultPerspective
-
setCurrentPerspective
-
getCurrentPerspectiveName
-
setCurrentPerspective
-
getDefaultPerspective
-
getCurrentPerspective
-
getDockingState
- Specified by:
getDockingStatein interfaceLayoutManager
-
getDockingState
- Specified by:
getDockingStatein interfaceLayoutManager
-
getDockingState
-
getDockingState
-
getFloatManager
- Specified by:
getFloatManagerin interfaceLayoutManager
-
reset
public void reset() -
reset
-
reset
-
reload
PerspectiveManager#getMainApplicationWindow returns the first window where #getOwner == null. This is especially a problem for apps with multiple frames. To display a perspective for a specified window it is highly recommended to use #reload(Window w) instead of #reload() which is the same as DockingManager#restoreLayout(). You can use #restoreLayout when the application does not need multiple independent docking windows. -
reload
-
restore
- Throws:
IOExceptionPersistenceException
-
reload
public void reload() -
loadPerspective
public void loadPerspective() -
loadPerspectiveAsDefault
-
loadPerspectiveAsDefault
-
loadPerspective
-
loadPerspective
-
loadPerspective
-
loadPerspective
-
loadPerspective
-
loadPerspective
-
createLayout
- Specified by:
createLayoutin interfaceLayoutManager
-
display
- Specified by:
displayin interfaceLayoutManager
-
store
- Specified by:
storein interfaceLayoutManager- Throws:
IOExceptionPersistenceException
-
store
- Specified by:
storein interfaceLayoutManager- Throws:
IOExceptionPersistenceException
-
load
- Specified by:
loadin interfaceLayoutManager- Throws:
IOExceptionPersistenceException
-
load
- Specified by:
loadin interfaceLayoutManager- Throws:
IOExceptionPersistenceException
-
isRestoreFloatingOnLoad
public static boolean isRestoreFloatingOnLoad() -
setRestoreFloatingOnLoad
public static void setRestoreFloatingOnLoad(boolean restoreFloatingOnLoad) -
getMainApplicationWindow
-
getMainDockingPort
-
restore
- Specified by:
restorein interfaceLayoutManager- Throws:
IOExceptionPersistenceException
-
getDefaultPersistenceKey
- Specified by:
getDefaultPersistenceKeyin interfaceLayoutManager
-
setDefaultPersistenceKey
- Specified by:
setDefaultPersistenceKeyin interfaceLayoutManager
-