Example usage for com.intellij.openapi.wm ToolWindowAnchor LEFT

List of usage examples for com.intellij.openapi.wm ToolWindowAnchor LEFT

Introduction

In this page you can find the example usage for com.intellij.openapi.wm ToolWindowAnchor LEFT.

Prototype

ToolWindowAnchor LEFT

To view the source code for com.intellij.openapi.wm ToolWindowAnchor LEFT.

Click Source Link

Usage

From source file:com.android.tools.adtui.workbench.FloatingToolWindow.java

License:Apache License

private void updateState(@NotNull AttachedToolWindow<T> correspondingWindow) {
    myCorrespondingToolWindow = correspondingWindow;
    ToolWindowAnchor anchor = correspondingWindow.isLeft() ? ToolWindowAnchor.LEFT : ToolWindowAnchor.RIGHT;
    myToolWindow.setAnchor(anchor, null);
}

From source file:com.android.tools.adtui.workbench.FloatingToolWindow.java

License:Apache License

private ToolWindowEx createToolWindow(@NotNull ToolWindowManager toolWindowManager,
        @NotNull ToolWindowDefinition<T> definition) {
    String id = definition.getTitle();
    ToolWindowEx window = (ToolWindowEx) toolWindowManager.getToolWindow(id);
    if (window == null) {
        ToolWindowAnchor anchor = definition.getSide().isLeft() ? ToolWindowAnchor.LEFT
                : ToolWindowAnchor.RIGHT;
        window = (ToolWindowEx) toolWindowManager.registerToolWindow(id, false, anchor, this, true);
        window.setIcon(definition.getIcon());
        window.setType(ToolWindowType.FLOATING, null);
        window.setAutoHide(false);/*w  w w .  j av a2  s  . c  o m*/
        setToolWindowContent(window);
        setAdditionalGearPopupActions(window);
        setAdditionalActions(window);
    }
    return window;
}

From source file:com.android.tools.idea.gradle.structure.configurables.BasePerspectiveConfigurable.java

License:Apache License

@Override
protected void reInitWholePanelIfNeeded() {
    if (!myToReInitWholePanel) {
        return;//from   w w w. ja  v a2 s. c  om
    }

    if (myTreeMinimized) {
        Splitter splitter = getSplitter();
        myCenterComponent = splitter.getSecondComponent();

        if (myCenterComponent == null) {
            super.reInitWholePanelIfNeeded();
            splitter = getSplitter();
            myCenterComponent = splitter.getSecondComponent();
        }
        myToReInitWholePanel = false;

        splitter.setSecondComponent(null);
        myWholePanel.remove(splitter);
        myWholePanel.add(myCenterComponent, BorderLayout.CENTER);
        revalidateAndRepaint(myWholePanel);
    } else {
        if (myWholePanel == null) {
            super.reInitWholePanelIfNeeded();
        }
        myToReInitWholePanel = false;

        Splitter splitter = getSplitter();
        if (myCenterComponent != null && myCenterComponent != splitter) {
            myWholePanel.remove(myCenterComponent);
            splitter.setSecondComponent(myCenterComponent);
            myWholePanel.add(splitter);
            revalidateAndRepaint(myWholePanel);
        }

        myCenterComponent = splitter;

        JComponent first = splitter.getFirstComponent();
        if (first instanceof JPanel && myHeader == null) {
            JPanel panel = (JPanel) first;
            myHeader = ToolWindowHeader.createAndAdd("Modules", AllIcons.Nodes.Module, panel,
                    ToolWindowAnchor.LEFT);
            myHeader.setPreferredFocusedComponent(myTree);
            myHeader.addMinimizeListener(() -> {
                modulesTreeMinimized();
                reInitWholePanelIfNeeded();
            });
        }
    }
}

From source file:com.android.tools.idea.profiling.view.EmptyManager.java

License:Apache License

@Override
protected ToolWindowAnchor getAnchor() {
    return ToolWindowAnchor.LEFT;
}

From source file:com.echologic.xfiles.XFiles.java

License:Open Source License

public void projectOpened() {
    ToolWindowManager manager = ToolWindowManager.getInstance(project);
    ToolWindow window = manager.registerToolWindow(TOOL_WINDOW_ID, new XFilesToolWindow(project),
            ToolWindowAnchor.LEFT);
    window.setTitle(project.getName());//w w  w  .  j a v a  2  s . co  m
    window.setIcon(XFilesIcons.XFILES_ICON);
}

From source file:com.eviware.soapui.intellij.plugin.SoapUIPlugin.java

License:Apache License

public void initToolWindow() {
    ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(myProject);

    ToolWindow toolWindow = toolWindowManager.registerToolWindow(WORKSPACE_WINDOW_ID, true,
            ToolWindowAnchor.LEFT);

    ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
    Content content = contentFactory.createContent(buildMainPanel(), "", false); // first arg is a JPanel
    toolWindow.getContentManager().addContent(content);

    logPanel = new JPanel(new BorderLayout());
    logPanel.add(SoapUI.getLogMonitor().getComponent(), BorderLayout.CENTER);

    toolWindowManager.registerToolWindow(LOG_WINDOW_ID, logPanel, ToolWindowAnchor.BOTTOM);
}

From source file:com.intellij.android.designer.AndroidDesignerCustomizations.java

License:Apache License

@NotNull
@Override
public ToolWindowAnchor getPaletteAnchor() {
    return ToolWindowAnchor.LEFT;
}

From source file:com.intellij.designer.LightToolWindow.java

License:Apache License

private boolean isLeft() {
    return myAnchor == ToolWindowAnchor.LEFT;
}

From source file:com.intellij.designer.LightToolWindowManager.java

License:Apache License

public final ActionGroup createGearActions() {
    DefaultActionGroup group = new DefaultActionGroup("In Editor Mode", true);

    if (myLeftEditorModeAction == null) {
        myLeftEditorModeAction = createToggleAction(ToolWindowAnchor.LEFT);
    }//from  w ww  .  jav a2 s  . c  o m
    group.add(myLeftEditorModeAction);

    if (myRightEditorModeAction == null) {
        myRightEditorModeAction = createToggleAction(ToolWindowAnchor.RIGHT);
    }
    group.add(myRightEditorModeAction);

    return group;
}

From source file:com.intellij.designer.ToggleEditorModeAction.java

License:Apache License

@Override
public void setSelected(AnActionEvent e, boolean state) {
    if (state) {/*from   w  ww  .j  a v a2s  .c  om*/
        myManager.setEditorMode(myAnchor);

        LightToolWindowManager manager = getOppositeManager();
        if (manager.getEditorMode() == myAnchor) {
            manager.setEditorMode(
                    myAnchor == ToolWindowAnchor.LEFT ? ToolWindowAnchor.RIGHT : ToolWindowAnchor.LEFT);
        }
    } else {
        myManager.setEditorMode(null);
    }
}