Class Grid
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<Grid.Position>
,Collection<Grid.Position>
,List<Grid.Position>
,RandomAccess
Helper class that represents a Bootstrap grid layout: a number of columns (
Grid.Position
) with
one or more specifiers (eg. hidden, pull-right, width for different devices etc).
The static convenience methods create(int...)
help you easily create basic grids.
Example more complex grid layout:
Grid.create( Grid.position( Device.MD.hidden(), Device.LG.width( Width.QUARTER ).asOffset() ), Grid.position( Device.SM.width( Width.THREE_QUARTERS ) ) );Would result in:
Grid{[hidden-md col-lg-offset-3],[col-sm-9]}
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static interface
static class
static class
static class
static class
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Grid
create
(int... widths) Create a simple grid with the number of columns specified by the width parameter values.static Grid
create
(Grid.Position... positions) static Grid.Position
position
(Grid.DeviceGridLayout... layouts) toString()
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods inherited from interface java.util.List
containsAll
-
Constructor Details
-
Grid
public Grid()
-
-
Method Details
-
toString
- Overrides:
toString
in classAbstractCollection<Grid.Position>
-
create
Create a simple grid with the number of columns specified by the width parameter values. Columns will only have values registered forGrid.Device.MD
.- Parameters:
widths
- for the columns- Returns:
- grid
-
create
-
position
-