Search in sources :

Example 6 with DefaultDataSeries

use of com.android.tools.adtui.model.DefaultDataSeries in project android by JetBrains.

the class StateChartVisualTest method createComponentsList.

@Override
protected List<Animatable> createComponentsList() {
    long nowUs = TimeUnit.NANOSECONDS.toMicros(System.nanoTime());
    mTimeGlobalRangeUs = new Range(nowUs, nowUs + TimeUnit.SECONDS.toMicros(60));
    mAnimatedTimeRange = new AnimatedTimeRange(mTimeGlobalRangeUs, 0);
    DefaultDataSeries<MockFruitState> networkSeries = new DefaultDataSeries<>();
    DefaultDataSeries<MockStrengthState> radioSeries = new DefaultDataSeries<>();
    RangedSeries<MockFruitState> networkData = new RangedSeries<>(mTimeGlobalRangeUs, networkSeries);
    RangedSeries<MockStrengthState> radioData = new RangedSeries<>(mTimeGlobalRangeUs, radioSeries);
    mNetworkStatusChart = new StateChart<>(getFruitStateColor());
    mNetworkStatusChart.addSeries(networkData);
    mNetworkDataEntries.add(networkSeries);
    mRadioStateChart = new StateChart<>(getStrengthColor());
    mRadioStateChart.addSeries(radioData);
    mRadioDataEntries.add(radioSeries);
    return Arrays.asList(mAnimatedTimeRange, mNetworkStatusChart, mRadioStateChart);
}
Also used : AnimatedTimeRange(com.android.tools.adtui.AnimatedTimeRange) DefaultDataSeries(com.android.tools.adtui.model.DefaultDataSeries) Range(com.android.tools.adtui.model.Range) AnimatedTimeRange(com.android.tools.adtui.AnimatedTimeRange) RangedSeries(com.android.tools.adtui.model.RangedSeries)

Aggregations

DefaultDataSeries (com.android.tools.adtui.model.DefaultDataSeries)6 Range (com.android.tools.adtui.model.Range)5 StateChart (com.android.tools.adtui.chart.StateChart)3 RangedSeries (com.android.tools.adtui.model.RangedSeries)3 JBColor (com.intellij.ui.JBColor)3 java.awt (java.awt)3 ItemEvent (java.awt.event.ItemEvent)3 Arrays (java.util.Arrays)3 List (java.util.List)3 javax.swing (javax.swing)3 NotNull (org.jetbrains.annotations.NotNull)3 com.android.tools.adtui (com.android.tools.adtui)2 AnimatedTimeRange (com.android.tools.adtui.AnimatedTimeRange)2 AdtUiUtils (com.android.tools.adtui.common.AdtUiUtils)2 RangedContinuousSeries (com.android.tools.adtui.model.RangedContinuousSeries)2 ComponentAdapter (java.awt.event.ComponentAdapter)2 ComponentEvent (java.awt.event.ComponentEvent)2 EnumMap (java.util.EnumMap)2 Animatable (com.android.tools.adtui.Animatable)1 AnimatedComponent (com.android.tools.adtui.AnimatedComponent)1