Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2772)

Unified Diff: charted/lib/charts/chart_state.dart

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « charted/lib/charts/chart_series.dart ('k') | charted/lib/charts/chart_theme.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: charted/lib/charts/chart_state.dart
diff --git a/charted/lib/charts/chart_state.dart b/charted/lib/charts/chart_state.dart
deleted file mode 100644
index d807677fed8741c6718aea035a7479cac7f16bc3..0000000000000000000000000000000000000000
--- a/charted/lib/charts/chart_state.dart
+++ /dev/null
@@ -1,150 +0,0 @@
-//
-// Copyright 2014 Google Inc. All rights reserved.
-//
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file or at
-// https://developers.google.com/open-source/licenses/bsd
-//
-
-part of charted.charts;
-
-///
-/// Model to provide highlight, selection and visibility in a ChartArea.
-/// Selection and visibility
-///
-abstract class ChartState implements ChangeNotifier {
- static int COL_SELECTED = 0x001;
- static int COL_UNSELECTED = 0x002;
- static int COL_PREVIEW = 0x004;
- static int COL_HIDDEN = 0x008;
- static int COL_HIGHLIGHTED = 0x010;
- static int COL_UNHIGHLIGHTED = 0x020;
- static int COL_HOVERED = 0x040;
- static int VAL_HIGHLIGHTED = 0x080;
- static int VAL_UNHIGHLIGHTED = 0x100;
- static int VAL_HOVERED = 0x200;
-
- static const COL_SELECTED_CLASS = 'col-selected';
- static const COL_UNSELECTED_CLASS = 'col-unselected';
- static const COL_PREVIEW_CLASS = 'col-previewed';
- static const COL_HIDDEN_CLASS = 'col-hidden';
- static const COL_HIGHLIGHTED_CLASS = 'col-highlighted';
- static const COL_UNHIGHLIGHTED_CLASS = 'col-unhighlighted';
- static const COL_HOVERED_CLASS = 'col-hovered';
- static const VAL_HIGHLIGHTED_CLASS = 'row-highlighted';
- static const VAL_UNHIGHLIGHTED_CLASS = 'row-unhighlighted';
- static const VAL_HOVERED_CLASS = 'row-hovered';
-
- static const COLUMN_CLASS_NAMES = const[
- COL_SELECTED_CLASS, COL_UNSELECTED_CLASS, COL_PREVIEW_CLASS,
- COL_HIGHLIGHTED_CLASS, COL_UNHIGHLIGHTED_CLASS, COL_HIDDEN_CLASS,
- COL_HOVERED_CLASS];
-
- static const VALUE_CLASS_NAMES = const[
- COL_SELECTED_CLASS, COL_UNSELECTED_CLASS, COL_PREVIEW_CLASS,
- COL_HIGHLIGHTED_CLASS, COL_UNHIGHLIGHTED_CLASS, COL_HIDDEN_CLASS,
- COL_HOVERED_CLASS, VAL_HIGHLIGHTED_CLASS, VAL_UNHIGHLIGHTED_CLASS,
- VAL_HOVERED_CLASS];
-
- /// List of selected items.
- /// - Contains a column on CartesianArea if useRowColoring is false.
- /// - Row index in all other cases.
- Iterable<int> get selection;
-
- /// List of visible items.
- /// - Contains a column on CartesianArea if useRowColoring is false.
- /// - Row index in all other cases.
- Iterable<int> get hidden;
-
- /// Currently previewed row or column. Hidden items can be previewed
- /// by hovering on the corresponding label in Legend
- /// - Contains a column on CartesianArea if useRowColoring is false.
- /// - Row index in all other cases.
- int preview;
-
- /// Currently highlighted value, if any, represented as column and row.
- /// Highlight is result of a click on certain value.
- Iterable<Pair<int,int>> highlights;
-
- /// Currently hovered value, if any, represented as column and row.
- /// Hover is result of mouse moving over a certian value in chart.
- Pair<int,int> hovered;
-
- /// Ensure that a row or column is visible.
- bool unhide(int id);
-
- /// Ensure that a row or column is invisible.
- bool hide(int id);
-
- /// Returns current visibility of a row or column.
- bool isVisible(int id);
-
- /// Select a row or column.
- bool select(int id);
-
- /// Unselect a row or column.
- bool unselect(int id);
-
- /// Returns current selection state of a row or column.
- bool isSelected(int id);
-
- /// Select a row or column.
- bool highlight(int column, int row);
-
- /// Unselect a row or column.
- bool unhighlight(int column, int row);
-
- /// Returns current selection state of a row or column.
- bool isHighlighted(int column, int row);
-
- factory ChartState({bool isMultiSelect: false}) =>
- new DefaultChartStateImpl(isMultiSelect: isMultiSelect);
-}
-
-///
-/// Implementation of [ChangeRecord], that is used to notify changes to
-/// values in [ChartData].
-///
-class ChartSelectionChangeRecord implements ChangeRecord {
- final int add;
- final int remove;
- const ChartSelectionChangeRecord({this.add, this.remove});
-}
-
-///
-/// Implementation of [ChangeRecord], that is used to notify changes to
-/// values in [ChartData].
-///
-class ChartVisibilityChangeRecord implements ChangeRecord {
- final int unhide;
- final int hide;
- const ChartVisibilityChangeRecord({this.unhide, this.hide});
-}
-
-///
-/// Implementation of [ChangeRecord], that is used to notify changes to
-/// values in [ChartData].
-///
-class ChartHighlightChangeRecord implements ChangeRecord {
- final Pair<int,int> remove;
- final Pair<int,int> add;
- const ChartHighlightChangeRecord({this.add, this.remove});
-}
-
-///
-/// Implementation of [ChangeRecord], that is used to notify changes to
-/// values in [ChartData].
-///
-class ChartHoverChangeRecord implements ChangeRecord {
- final Pair<int,int> hovered;
- const ChartHoverChangeRecord(this.hovered);
-}
-
-///
-/// Implementation of [ChangeRecord], that is used to notify changes to
-/// values in [ChartData].
-///
-class ChartPreviewChangeRecord implements ChangeRecord {
- final int previewed;
- const ChartPreviewChangeRecord(this.previewed);
-}
« no previous file with comments | « charted/lib/charts/chart_series.dart ('k') | charted/lib/charts/chart_theme.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698