Search in sources :

Example 1 with DimensionService

use of com.intellij.openapi.util.DimensionService in project intellij-community by JetBrains.

the class GridCellImpl method saveUiState.

public void saveUiState() {
    saveProportions();
    for (Content each : myContents.getKeys()) {
        saveState(each, false);
    }
    for (Content each : myMinimizedContents) {
        saveState(each, true);
    }
    final DimensionService service = DimensionService.getInstance();
    final Dimension size = myContext.getContentManager().getComponent().getSize();
    service.setSize(getDimensionKey(), size, myContext.getProject());
    if (myContext.getWindow() != 0) {
        final Window frame = SwingUtilities.getWindowAncestor(myPlaceholder);
        if (frame != null) {
            service.setLocation(getDimensionKey(), frame.getLocationOnScreen());
        }
    }
}
Also used : Content(com.intellij.ui.content.Content) DimensionService(com.intellij.openapi.util.DimensionService)

Aggregations

DimensionService (com.intellij.openapi.util.DimensionService)1 Content (com.intellij.ui.content.Content)1