|
1 | 1 | # Plot Composition |
2 | | -All plots in Androidplot inherit from the abstract base class Plot which provides common behaviors |
3 | | -for all Plot implementations. |
| 2 | +All plots in Androidplot inherit from the abstract base class `Plot` which provides common behaviors |
| 3 | +for all `Plot` implementations. |
4 | 4 |
|
5 | 5 | # Widgets |
6 | | -Plots are composed of one or more Widgets. A Widget is an abstraction of a visual |
| 6 | +Plots are composed of one or more Widgets. A `Widget` is an abstraction of a visual |
7 | 7 | component that may be positioned and scaled within the visible area of a Plot. For example, |
8 | | -an XY Plot is typically composed of these 5 Widgets: |
| 8 | +an `XYPlot` is typically composed of these 5 `Widgets`: |
9 | 9 |
|
10 | 10 | * Title |
11 | 11 | * Graph |
12 | 12 | * Domain Label |
13 | 13 | * Range Label |
14 | | -* Legend |
| 14 | +* [Legend](legend.md) |
15 | 15 |
|
16 | | -All Plot implementations will contain at least one default Widget providing the core |
17 | | -behavior encapsulated by that Plot. In addition to moving and scaling these Widgets, developers may |
18 | | -also extend them and replace the Plot's default instance with the derived implenentation in order to |
| 16 | +All implementations of `Plot` will contain at least one default `Widget` providing the core |
| 17 | +behavior encapsulated by that `Plot`. In addition to moving and scaling a `Widget`, developers may |
| 18 | +also extend them and replace the `Plot` instance's default instance with the derived implementation in order to |
19 | 19 | get custom behavior. |
20 | 20 |
|
21 | 21 | # The LayoutManager |
22 | | -The LayoutManager provides the logic for visually positioning and scaling Widgets; all Plot implementations |
23 | | -contain an instance of LayoutManager that can be retrieved via `Plot.getLayoutManager()`. |
| 22 | +The `LayoutManager` provides the logic for visually positioning and scaling Widgets; all `Plot` implementations |
| 23 | +contain an instance of `LayoutManager` that can be retrieved via `Plot.getLayoutManager()`. |
24 | 24 |
|
25 | 25 | ## Z-Indexing |
26 | 26 | Z-indexing is a 2D drawing concept which associates each drawable entity with a value that determines |
27 | 27 | which elements get drawn onto the screen first, producing the visual effect that certain elements appear |
28 | 28 | on top of others. |
29 | 29 |
|
30 | 30 | While Androidplot uses the term "z-index" it's implemented internally as a linked list to prevent the possibility |
31 | | -of duplicate index values and therefore ensuring that the drawing order of Widgets is always explicit. |
| 31 | +of duplicate index values and therefore ensuring that `Widget` drawing order is always explicit. |
32 | 32 | The [Layerable](../androidplot-core/src/main/java/com/androidplot/util/Layerable.java) interface |
33 | | -defines methods used for manipulating the z-index of a Widget. |
| 33 | +defines methods used for manipulating the z-index of a `Widget`. |
34 | 34 |
|
35 | 35 | ## Adding & Removing Widgets |
36 | | -New Widgets can be added either to the front or back of the z-index using these methods: |
| 36 | +New `Widget` instances can be added either to the front or back of the z-index using these methods: |
37 | 37 |
|
38 | 38 | * `LayoutManager.addToTop(Widget)` |
39 | 39 | * `LayoutManager.addToBottom(Widget)` |
|
0 commit comments