use of org.jivesoftware.MainWindowListener in project Spark by igniterealtime.
the class LayoutPlugin method initialize.
public void initialize() {
final MainWindow mainWindow = SparkManager.getMainWindow();
SparkManager.getMainWindow().addMainWindowListener(new MainWindowListener() {
public void shutdown() {
LayoutSettingsManager.getLayoutSettings().setMainWindowBounds(mainWindow.getBounds());
if (mainWindow.isDocked()) {
LayoutSettingsManager.getLayoutSettings().setSplitPaneDividerLocation(mainWindow.getSplitPane().getDividerLocation());
} else {
LayoutSettingsManager.getLayoutSettings().setSplitPaneDividerLocation(-1);
}
LayoutSettingsManager.saveLayoutSettings();
}
public void mainWindowActivated() {
}
public void mainWindowDeactivated() {
}
});
}
Aggregations