Search in sources :

Example 1 with CpuMonitorView

use of com.android.tools.idea.monitor.cpu.CpuMonitorView in project android by JetBrains.

the class MonitorContentFactory method createMonitorContent.

public static void createMonitorContent(@NotNull final Project project, @NotNull DeviceContext deviceContext, @NotNull RunnerLayoutUi layoutUi) {
    BaseMonitorView[] monitors = new BaseMonitorView[] { new CpuMonitorView(project, deviceContext), new MemoryMonitorView(project, deviceContext), new NetworkMonitorView(project, deviceContext), new GpuMonitorView(project, deviceContext) };
    MonitorPanel monitorPanel = new MonitorPanel(monitors);
    JBScrollPane monitorScrollPane = new JBScrollPane(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    monitorScrollPane.setViewportView(monitorPanel);
    monitorScrollPane.getVerticalScrollBar().setUnitIncrement(10);
    monitorScrollPane.getHorizontalScrollBar().setUnitIncrement(10);
    Content monitorContent = layoutUi.createContent("Monitors", monitorScrollPane, "Monitors", null, null);
    monitorContent.setCloseable(false);
    layoutUi.addContent(monitorContent);
}
Also used : NetworkMonitorView(com.android.tools.idea.monitor.network.NetworkMonitorView) GpuMonitorView(com.android.tools.idea.monitor.gpu.GpuMonitorView) MemoryMonitorView(com.android.tools.idea.monitor.memory.MemoryMonitorView) Content(com.intellij.ui.content.Content) CpuMonitorView(com.android.tools.idea.monitor.cpu.CpuMonitorView) JBScrollPane(com.intellij.ui.components.JBScrollPane)

Aggregations

CpuMonitorView (com.android.tools.idea.monitor.cpu.CpuMonitorView)1 GpuMonitorView (com.android.tools.idea.monitor.gpu.GpuMonitorView)1 MemoryMonitorView (com.android.tools.idea.monitor.memory.MemoryMonitorView)1 NetworkMonitorView (com.android.tools.idea.monitor.network.NetworkMonitorView)1 JBScrollPane (com.intellij.ui.components.JBScrollPane)1 Content (com.intellij.ui.content.Content)1