Example usage for com.intellij.openapi.ui DetailsComponent setContent

List of usage examples for com.intellij.openapi.ui DetailsComponent setContent

Introduction

In this page you can find the example usage for com.intellij.openapi.ui DetailsComponent setContent.

Prototype

public void setContent(@Nullable JComponent c) 

Source Link

Usage

From source file:com.android.tools.idea.gradle.variant.profiles.ProjectProfileSelectionDialog.java

License:Apache License

@NotNull
private JComponent createProjectStructurePanel() {
    createProjectStructureTree();//from  ww  w  . ja  v  a2  s.  com

    DetailsComponent details = new DetailsComponent();
    details.setText("Project Structure");
    details.setContent(createTreePanel(myProjectStructureTree));

    removeEmptyBorder(details);
    return details.getComponent();
}

From source file:com.android.tools.idea.gradle.variant.profiles.ProjectProfileSelectionDialog.java

License:Apache License

@NotNull
private JComponent createConflictsPanel() {
    createConflictTree();/*from  w w  w.  jav a2 s .  c  o  m*/

    myConflictDetails = new DetailsComponent();
    myConflictDetails.setText("Conflict Detail");
    myConflictDetails.setContent(createTreePanel(myConflictTree));
    removeEmptyBorder(myConflictDetails);

    createConflictsTable();

    myConflictsTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
        @Override
        public void valueChanged(ListSelectionEvent e) {
            if (e.getValueIsAdjusting()) {
                return;
            }
            showConflictDetail();
        }
    });
    Splitter splitter = new Splitter(true, .25f);
    splitter.setHonorComponentsMinimumSize(true);

    DetailsComponent details = new DetailsComponent();
    details.setText("Variant Selection Conflicts");
    details.setContent(ScrollPaneFactory.createScrollPane(myConflictsTable));
    removeEmptyBorder(details);
    splitter.setFirstComponent(details.getComponent());

    splitter.setSecondComponent(myConflictDetails.getComponent());

    return splitter;
}