Search in sources :

Example 1 with VmStatsTreeTableModel

use of com.android.tools.idea.editors.vmtrace.treemodel.VmStatsTreeTableModel in project android by JetBrains.

the class TraceViewPanel method createUIComponents.

private void createUIComponents() {
    MouseAdapter l = new MouseAdapter() {

        @Override
        public void mousePressed(MouseEvent e) {
            if (e.getSource() == myCloseLabel) {
                closeSearchComponent();
            } else if (e.getSource() == mySearchLabel) {
                showSearchComponent();
            } else if (e.getSource() == myZoomFitLabel) {
                myTraceViewCanvas.zoomFit();
            }
        }
    };
    myDefaultHeaderPanel = new EditorHeaderComponent();
    mySearchLabel = new JLabel(AllIcons.Actions.Search);
    mySearchLabel.addMouseListener(l);
    mySearchLabel.setToolTipText("Find (Ctrl + F)");
    myZoomFitLabel = new JLabel(AndroidIcons.ZoomFit);
    myZoomFitLabel.setToolTipText("Zoom Fit");
    myZoomFitLabel.addMouseListener(l);
    myFindPanel = new EditorHeaderComponent();
    myFindFieldWrapper = new NonOpaquePanel(new BorderLayout());
    mySearchField = createSearchField();
    myFindFieldWrapper.add(mySearchField);
    myCloseLabel = new JLabel(AllIcons.Actions.Cross);
    myCloseLabel.addMouseListener(l);
    myVmStatsTreeTableModel = new VmStatsTreeTableModel();
    myTreeTable = new TreeTable(myVmStatsTreeTableModel);
    myTraceViewCanvas = new TraceViewCanvasWrapper();
    JBScrollPane scrollPane = new JBScrollPane(myTreeTable);
    mySplitter = new JBSplitter(true, 0.75f);
    mySplitter.setShowDividerControls(true);
    mySplitter.setShowDividerIcon(true);
    mySplitter.setFirstComponent(myTraceViewCanvas);
    mySplitter.setSecondComponent(scrollPane);
}
Also used : NonOpaquePanel(com.intellij.ui.components.panels.NonOpaquePanel) TreeTable(com.intellij.ui.treeStructure.treetable.TreeTable) EditorHeaderComponent(com.intellij.openapi.editor.impl.EditorHeaderComponent) JBSplitter(com.intellij.ui.JBSplitter) JBScrollPane(com.intellij.ui.components.JBScrollPane) VmStatsTreeTableModel(com.android.tools.idea.editors.vmtrace.treemodel.VmStatsTreeTableModel)

Aggregations

VmStatsTreeTableModel (com.android.tools.idea.editors.vmtrace.treemodel.VmStatsTreeTableModel)1 EditorHeaderComponent (com.intellij.openapi.editor.impl.EditorHeaderComponent)1 JBSplitter (com.intellij.ui.JBSplitter)1 JBScrollPane (com.intellij.ui.components.JBScrollPane)1 NonOpaquePanel (com.intellij.ui.components.panels.NonOpaquePanel)1 TreeTable (com.intellij.ui.treeStructure.treetable.TreeTable)1