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

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

Introduction

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

Prototype

public synchronized void setSize(@NotNull @NonNls String key, Dimension size, Project project) 

Source Link

Usage

From source file:com.intellij.debugger.ui.StatementEvaluationDialog.java

License:Apache License

public void dispose() {
    try {/*  w  w w. ja  v a  2 s. co  m*/
        final DebuggerEditorImpl editor = getEditor();
        final DimensionService dimensionService = DimensionService.getInstance();
        dimensionService.setSize(STATEMENT_EDITOR_DIMENSION_KEY, editor.getSize(null), getProject());
        dimensionService.setSize(EVALUATION_PANEL_DIMENSION_KEY, getEvaluationPanel().getSize(), getProject());
    } finally {
        super.dispose();
    }
}

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

License:Apache License

public void saveUiState() {
    saveProportions();/*from  w ww.j  av  a2  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());
        }
    }
}