Skip to content

Commit ff98fae

Browse files
javier-godoyscardanzan
authored andcommitted
docs: align API names with implementation
1 parent cb34dc9 commit ff98fae

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

SPECIFICATIONS.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
The Easy Grid Add-on provides `EasyGrid<T>`, a Vaadin `Composite` component that wraps an internally created `Grid<T>`. It uses reflection to discover bean properties, maps them to appropriately typed and formatted columns, and provides a clean Java API for controlling column ordering and type-specific rendering.
66

7-
`EasyGrid<T>` is a component — it is added to the layout directly. Data binding and all other standard `Grid` features are accessed directly on the `EasyGrid` instance, which delegates them to the wrapped `Grid`. The wrapped `Grid` is accessible via `getGrid()` for any configuration not covered by the delegating API.
7+
`EasyGrid<T>` is a component — it is added to the layout directly. Data binding and all other standard `Grid` features are accessed directly on the `EasyGrid` instance, which delegates them to the wrapped `Grid`. The wrapped `Grid` is accessible via `getWrappedGrid()` for any configuration not covered by the delegating API.
88

99
For advanced cases where a custom `Grid` subclass must be supplied (e.g. `TreeGrid`), use `EasyGridWrapper<T, GRID>` instead — it accepts a caller-provided `GRID extends Grid<T>` and otherwise provides the same API.
1010

@@ -76,7 +76,7 @@ EasyGridWrapper<Person, TreeGrid<Person>> wrapper =
7676
wrapper.setItems(personService.findAll());
7777
add(wrapper);
7878
// access the wrapped grid for TreeGrid-specific configuration
79-
wrapper.getGrid().setItemHierarchyData(...);
79+
wrapper.getWrappedGrid().setItemHierarchyData(...);
8080
```
8181

8282
`EasyGrid` also provides a typed overload for columns not backed by a named bean property:
@@ -169,7 +169,7 @@ Column display configuration is resolved through a three-level tree, from most t
169169
| Level | API | Scope |
170170
|---|---|---|
171171
| **Column** | `EasyColumn` setters | One specific column |
172-
| **Instance** | `EasyGrid.forType(Class)` | All columns of that type in one grid |
172+
| **Instance** | `EasyGrid.typeConfiguration(Class)` | All columns of that type in one grid |
173173
| **Global** | `GlobalEasyGridConfiguration.forType(Class)` | All grids in the application |
174174

175175
Within each level the class hierarchy is walked before the tree falls through to the next level (scope-first). The full resolution order for a `Foo extends Entity` column is:
@@ -190,10 +190,10 @@ easyGrid.addColumn("active").setNullRepresentation("—");
190190
easyGrid.addColumn("salary").setTextAlign(ColumnTextAlign.END);
191191
```
192192

193-
**Instance level**`EasyGrid.forType(Class)` returns the instance-level `ColumnConfiguration` for a type. Changes apply to every column of that type on this grid:
193+
**Instance level**`EasyGrid.typeConfiguration(Class)` returns the instance-level `ColumnConfiguration` for a type. Changes apply to every column of that type on this grid:
194194

195195
```java
196-
easyGrid.forType(BigDecimal.class)
196+
easyGrid.typeConfiguration(BigDecimal.class)
197197
.setRendererFactory(NumberRenderers.of("%,.2f", Locale.US));
198198
```
199199

@@ -211,7 +211,7 @@ The `nullRepresentation` property controls what is displayed when a column value
211211

212212
```java
213213
// All columns in this grid show "–" for null
214-
easyGrid.forType(Object.class).setNullRepresentation("");
214+
easyGrid.typeConfiguration(Object.class).setNullRepresentation("");
215215

216216
// Only the "email" column shows "(none)" for null
217217
easyGrid.addColumn("email").setNullRepresentation("(none)");

0 commit comments

Comments
 (0)