Search in sources :

Example 1 with DockableStateWillChangeEvent

use of com.vlsolutions.swing.docking.event.DockableStateWillChangeEvent in project omegat by omegat-org.

the class MainWindowUI method initDocking.

/**
 * Create docking desktop panel.
 */
public static DockingDesktop initDocking(final MainWindow mainWindow) {
    mainWindow.desktop = new DockingDesktop();
    mainWindow.desktop.addDockableStateWillChangeListener(new DockableStateWillChangeListener() {

        public void dockableStateWillChange(DockableStateWillChangeEvent event) {
            if (event.getFutureState().isClosed()) {
                event.cancel();
            }
        }
    });
    return mainWindow.desktop;
}
Also used : DockableStateWillChangeEvent(com.vlsolutions.swing.docking.event.DockableStateWillChangeEvent) DockingDesktop(com.vlsolutions.swing.docking.DockingDesktop) DockableStateWillChangeListener(com.vlsolutions.swing.docking.event.DockableStateWillChangeListener)

Aggregations

DockingDesktop (com.vlsolutions.swing.docking.DockingDesktop)1 DockableStateWillChangeEvent (com.vlsolutions.swing.docking.event.DockableStateWillChangeEvent)1 DockableStateWillChangeListener (com.vlsolutions.swing.docking.event.DockableStateWillChangeListener)1