Search in sources :

Example 1 with AnimatedRange

use of com.android.tools.adtui.AnimatedRange in project android by JetBrains.

the class AnimatedComponentImageDiffEntry method setUpBase.

private void setUpBase() {
    // TODO: add one more level to the hierarchy and move this to a base class that can be subclassed by generators of different components
    myContentPane = new JPanel(new BorderLayout());
    myContentPane.setSize(MAIN_COMPONENT_DIMENSION);
    myContentPane.setPreferredSize(MAIN_COMPONENT_DIMENSION);
    myCurrentTimeUs = TimeUnit.NANOSECONDS.toMicros(System.nanoTime());
    myRangeStartUs = myCurrentTimeUs;
    myRangeEndUs = myRangeStartUs + TOTAL_VALUES * TIME_DELTA_US;
    myXRange = new AnimatedRange(myRangeStartUs, myRangeEndUs);
    // We don't need to set a proper FPS to the choreographer, as we're interested in the final image only, not the animation.
    myChoreographer = new Choreographer(-1, myContentPane);
    myChoreographer.setUpdate(false);
    myComponents = new ArrayList<>();
    myComponents.add(myXRange);
}
Also used : Choreographer(com.android.tools.adtui.Choreographer) AnimatedRange(com.android.tools.adtui.AnimatedRange)

Example 2 with AnimatedRange

use of com.android.tools.adtui.AnimatedRange in project android by JetBrains.

the class CpuProfilerUiManager method setupDetailedViewUi.

@Override
public void setupDetailedViewUi(@NotNull JPanel toolbar, @NotNull JPanel detailPanel) {
    super.setupDetailedViewUi(toolbar, detailPanel);
    // TODO: Default dimension should not be needed. Find out why (Need to use a BorderLayout maybe?)
    myExecutionChart.setPreferredSize(DEFAULT_DIMENSION);
    myChoreographer.register(myExecutionChart);
    myTabbedPane.add("Execution Chart", myExecutionChart);
    // TODO: Default dimension should not be needed. Find out why (Need to use a BorderLayout maybe?)
    myFlameChart.setPreferredSize(DEFAULT_DIMENSION);
    myChoreographer.register(myFlameChart);
    myTabbedPane.add("Flame Chart", myFlameChart);
    myTabbedPane.add("Top-down stats", myTopdownJpanel);
    myTabbedPane.add("Bottom-up stats", myBottomupJPanel);
    detailPanel.add(myTabbedPane);
    myFlameChartRange = new AnimatedRange();
    myChoreographer.register(myFlameChartRange);
}
Also used : AnimatedRange(com.android.tools.adtui.AnimatedRange)

Aggregations

AnimatedRange (com.android.tools.adtui.AnimatedRange)2 Choreographer (com.android.tools.adtui.Choreographer)1