PlotViewport class
The visible x window (trials) of one or more linked TrajectoryPlots,
as (first, last) x coordinates; null shows every trial.
Share one between plots, as with their hover notifier, so that zooming
or panning one moves them all. The window is kept inside the series
(see window); each method takes the series' length for that.
Changing it repaints the plots without rebuilding them.
- Inheritance
-
- Object
- ChangeNotifier
- ValueNotifier<
(double, double)?> - PlotViewport
Constructors
- PlotViewport([(double, double)? value])
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ (double, double)?
-
The current value stored in this notifier.
getter/setter pairinherited
- zoomed → bool
-
Whether a part of the series is shown.
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dispose(
) → void -
Discards any resources used by the object.
inherited
-
follow(
double x, int length) → void -
Move the window so that trial
xis visible (when zoomed), e.g. to follow playback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
pan(
double dx, int length) → void -
Move the window by
dxtrials (when zoomed). -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
reset(
) → void - Show every trial.
-
show(
double first, double last, int length) → void -
Show
first..last, widened to minSpan around its centre and moved inside the series; the whole series resets to null. -
toString(
) → String -
A string representation of this object.
inherited
-
window(
int length) → (double, double) -
The visible window of a series of
length. -
zoom(
double factor, double anchor, int length) → void -
Scale the window by
factor(< 1 zooms in) about the trialanchor, which stays where it is on screen.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited