Example usage for com.intellij.openapi.util DimensionService setLocation

List of usage examples for com.intellij.openapi.util DimensionService setLocation

Introduction

In this page you can find the example usage for com.intellij.openapi.util DimensionService setLocation.

Prototype

public synchronized void setLocation(String key, Point point) 

Source Link

Document

Store specified point under the key .

Usage

From source file:com.intellij.execution.ui.layout.impl.GridCellImpl.java

License:Apache License

public void saveUiState() {
    saveProportions();//  w w w. jav a  2 s  .c o  m

    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());
        }
    }
}