Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.flexdock.perspective
Class PerspectiveManager

    java.lang.Object
      org.flexdock.perspective.PerspectiveManager

All Implemented Interfaces:
  LayoutManager

    public class PerspectiveManager

extends Object
implements LayoutManager

Author:
  Mateusz Szczap

Field Summary
`static String` | `DEFAULT_PERSISTENCE_KEY_VALUE`
`static String` | `EMPTY_PERSPECTIVE`

Method Summary
`void` | `add(Perspective perspective)`
`void` | `add(Perspective perspective, boolean isDefault)`
`void` | `addListener(PerspectiveListener perspectiveListener)`
`LayoutNode` | `createLayout(DockingPort port)`
`Perspective` | `createPerspective(String perspectiveId)`
`boolean` | `display(Dockable dockable)`
`Perspective` | `getCurrentPerspective()`
`String` | `getCurrentPerspectiveName()`
`String` | `getDefaultPersistenceKey()`
`Perspective` | `getDefaultPerspective()`
`DockingState` | `getDockingState(Dockable dockable)`
`DockingState` | `getDockingState(Dockable dockable, boolean load)`
`DockingState` | `getDockingState(String dockable)`
`DockingState` | `getDockingState(String dockable, boolean load)`
`FloatManager` | `getFloatManager()`
`static PerspectiveManager` | `getInstance()`
`static RootWindow` | `getMainApplicationWindow()`
`static DockingPort` | `getMainDockingPort()`
`static PersistenceHandler` | `getPersistenceHandler()`
`Perspective` | `getPerspective(String perspectiveId)`
`PerspectiveListener[]` | `getPerspectiveListeners()`
`Perspective[]` | `getPerspectives()`
`static boolean` | `isRestoreFloatingOnLoad()`
`boolean` | `load()`
`boolean` | `load(String persistenceKey)`
`void` | `loadPerspective()`
`void` | `loadPerspective(String perspectiveId)`
`void` | `loadPerspective(String perspectiveId, boolean reset)`
`void` | `loadPerspective(String perspectiveId, Component window)`
`void` | `loadPerspective(String perspectiveId, Component window, boolean reset)`
`void` | `loadPerspective(String perspectiveId, DockingPort rootPort)`
`void` | `loadPerspective(String perspectiveId, DockingPort rootPort, boolean reset)`
`void` | `loadPerspectiveAsDefault(String perspectiveId)`
`void` | `loadPerspectiveAsDefault(String perspectiveId, boolean reset)`
`void` | `reload()`
`void` | `reload(Window w)` PerspectiveManager#getMainApplicationWindow returns the first window where #getOwner == null.
`void` | `reload(Window w, boolean reset)`
`void` | `remove(String perspectiveId)`
`void` | `removeListener(PerspectiveListener perspectiveListener)`
`void` | `reset()`
`void` | `reset(Component window)`
`void` | `reset(DockingPort rootPort)`
`boolean` | `restore(boolean loadFromStorage)`
`void` | `restore(Window w)`
`void` | `setCurrentPerspective(String perspectiveId)`
`void` | `setCurrentPerspective(String perspectiveId, boolean asDefault)`
`void` | `setDefaultPersistenceKey(String key)`
`void` | `setDefaultPerspective(String perspectiveId)`
`static void` | `setFactory(PerspectiveFactory factory)`
`static void` | `setPersistenceHandler(PersistenceHandler handler)`
`static void` | `setRestoreFloatingOnLoad(boolean restoreFloatingOnLoad)`
`boolean` | `store()`
`boolean` | `store(String persistenceKey)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### EMPTY_PERSPECTIVE

    public static final String EMPTY_PERSPECTIVE

See Also:
  Constant Field Values

### DEFAULT_PERSISTENCE_KEY_VALUE

    public static final String DEFAULT_PERSISTENCE_KEY_VALUE

See Also:
  Constant Field Values

Method Detail

### getInstance

    public static PerspectiveManager getInstance()

### setFactory

    public static void setFactory(PerspectiveFactory factory)

### setPersistenceHandler

    public static void setPersistenceHandler(PersistenceHandler handler)

### getPersistenceHandler

    public static PersistenceHandler getPersistenceHandler()

### add

    public void add(Perspective perspective)

### add

    public void add(Perspective perspective,
                    boolean isDefault)

### remove

    public void remove(String perspectiveId)

### getPerspective

    public Perspective getPerspective(String perspectiveId)

### createPerspective

    public Perspective createPerspective(String perspectiveId)

### getPerspectives

    public Perspective[] getPerspectives()

### addListener

    public void addListener(PerspectiveListener perspectiveListener)

### removeListener

    public void removeListener(PerspectiveListener perspectiveListener)

### getPerspectiveListeners

    public PerspectiveListener[] getPerspectiveListeners()

### setDefaultPerspective

    public void setDefaultPerspective(String perspectiveId)

### setCurrentPerspective

    public void setCurrentPerspective(String perspectiveId)

### getCurrentPerspectiveName

    public String getCurrentPerspectiveName()

### setCurrentPerspective

    public void setCurrentPerspective(String perspectiveId,
                                      boolean asDefault)

### getDefaultPerspective

    public Perspective getDefaultPerspective()

### getCurrentPerspective

    public Perspective getCurrentPerspective()

### getDockingState

    public DockingState getDockingState(Dockable dockable)

  Specified by:
    `getDockingState` in interface `LayoutManager`

### getDockingState

    public DockingState getDockingState(String dockable)

  Specified by:
    `getDockingState` in interface `LayoutManager`

### getDockingState

    public DockingState getDockingState(Dockable dockable,
                                        boolean load)

### getDockingState

    public DockingState getDockingState(String dockable,
                                        boolean load)

### getFloatManager

    public FloatManager getFloatManager()

  Specified by:
    `getFloatManager` in interface `LayoutManager`

### reset

    public void reset()

### reset

    public void reset(Component window)

### reset

    public void reset(DockingPort rootPort)

### reload

    public void reload(Window w)

  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

    public void reload(Window w,
                       boolean reset)

### restore

    public void restore(Window w)
                 throws IOException,
                        PersistenceException

  Throws:
    `IOException`
    `PersistenceException`

### reload

    public void reload()

### loadPerspective

    public void loadPerspective()

### loadPerspectiveAsDefault

    public void loadPerspectiveAsDefault(String perspectiveId)

### loadPerspectiveAsDefault

    public void loadPerspectiveAsDefault(String perspectiveId,
                                         boolean reset)

### loadPerspective

    public void loadPerspective(String perspectiveId)

### loadPerspective

    public void loadPerspective(String perspectiveId,
                                boolean reset)

### loadPerspective

    public void loadPerspective(String perspectiveId,
                                Component window)

### loadPerspective

    public void loadPerspective(String perspectiveId,
                                Component window,
                                boolean reset)

### loadPerspective

    public void loadPerspective(String perspectiveId,
                                DockingPort rootPort)

### loadPerspective

    public void loadPerspective(String perspectiveId,
                                DockingPort rootPort,
                                boolean reset)

### createLayout

    public LayoutNode createLayout(DockingPort port)

  Specified by:
    `createLayout` in interface `LayoutManager`

### display

    public boolean display(Dockable dockable)

  Specified by:
    `display` in interface `LayoutManager`

### store

    public boolean store()
                  throws IOException,
                         PersistenceException

  Specified by:
    `store` in interface `LayoutManager`
  Throws:
    `IOException`
    `PersistenceException`

### store

    public boolean store(String persistenceKey)
                  throws IOException,
                         PersistenceException

  Specified by:
    `store` in interface `LayoutManager`
  Throws:
    `IOException`
    `PersistenceException`

### load

    public boolean load()
                 throws IOException,
                        PersistenceException

  Specified by:
    `load` in interface `LayoutManager`
  Throws:
    `IOException`
    `PersistenceException`

### load

    public boolean load(String persistenceKey)
                 throws IOException,
                        PersistenceException

  Specified by:
    `load` in interface `LayoutManager`
  Throws:
    `IOException`
    `PersistenceException`

### isRestoreFloatingOnLoad

    public static boolean isRestoreFloatingOnLoad()

### setRestoreFloatingOnLoad

    public static void setRestoreFloatingOnLoad(boolean restoreFloatingOnLoad)

### getMainApplicationWindow

    public static RootWindow getMainApplicationWindow()

### getMainDockingPort

    public static DockingPort getMainDockingPort()

### restore

    public boolean restore(boolean loadFromStorage)
                    throws IOException,
                           PersistenceException

  Specified by:
    `restore` in interface `LayoutManager`
  Throws:
    `IOException`
    `PersistenceException`

### getDefaultPersistenceKey

    public String getDefaultPersistenceKey()

  Specified by:
    `getDefaultPersistenceKey` in interface `LayoutManager`

### setDefaultPersistenceKey

    public void setDefaultPersistenceKey(String key)

  Specified by:
    `setDefaultPersistenceKey` in interface `LayoutManager`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD