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);
}
Aggregations