use of com.intellij.util.EventDispatcher in project android by JetBrains.
the class NetworkProfilerVisualTest method createComponentsList.
@Override
protected List<Animatable> createComponentsList() {
long startTimeUs = myDataStore.getLatestTimeUs();
Range timeCurrentRangeUs = new Range(startTimeUs - RangeScrollbar.DEFAULT_VIEW_LENGTH_US, startTimeUs);
AnimatedTimeRange animatedTimeRange = new AnimatedTimeRange(timeCurrentRangeUs, 0);
EventDispatcher<ProfilerEventListener> dummyDispatcher = EventDispatcher.create(ProfilerEventListener.class);
mySegment = new NetworkSegment(timeCurrentRangeUs, myDataStore, dummyDispatcher);
myDetailedView = new NetworkDetailedView();
myDetailedView.setVisible(false);
generateNetworkCaptureData(startTimeUs);
myCaptureSegment = new NetworkCaptureSegment(timeCurrentRangeUs, new TestNetworkCaptureModel(), httpData -> myDetailedView.setVisible(true), dummyDispatcher);
myRadioSegment = new NetworkRadioSegment(timeCurrentRangeUs, myDataStore, dummyDispatcher);
List<Animatable> animatables = new ArrayList<>();
animatables.add(animatedTimeRange);
mySegment.createComponentsList(animatables);
myCaptureSegment.createComponentsList(animatables);
myRadioSegment.createComponentsList(animatables);
animatables.add(myCaptureSegment);
return animatables;
}
use of com.intellij.util.EventDispatcher in project android by JetBrains.
the class CpuProfilerVisualTest method createComponentsList.
@Override
protected List<Animatable> createComponentsList() {
long startTimeUs = mDataStore.getLatestTimeUs();
Range timeCurrentRangeUs = new Range(startTimeUs - RangeScrollbar.DEFAULT_VIEW_LENGTH_US, startTimeUs);
AnimatedTimeRange animatedTimeRange = new AnimatedTimeRange(timeCurrentRangeUs, 0);
//TODO Update test data for CpuUsageSegment to be exactly what it was.
EventDispatcher<ProfilerEventListener> dummyDispatcher = EventDispatcher.create(ProfilerEventListener.class);
mCPULevel2Segment = new CpuUsageSegment(timeCurrentRangeUs, mDataStore, dummyDispatcher);
mThreadsSegment = new ThreadsSegment(timeCurrentRangeUs, mDataStore, dummyDispatcher, (threads) -> {
// TODO: show L3 segment with the charts corresponding to threads selected.
// Hide any charts corresponding to unselected threads and hide L3 segment in case no threads are selected
});
List<Animatable> animatables = new ArrayList<>();
animatables.add(animatedTimeRange);
animatables.add(mThreadsSegment);
mCPULevel2Segment.createComponentsList(animatables);
mThreadsSegment.createComponentsList(animatables);
return animatables;
}
Aggregations