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
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic interfacestatic classstatic classstatic classstatic class -
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Gridcreate(int... widths) Create a simple grid with the number of columns specified by the width parameter values.static Gridcreate(Grid.Position... positions) static Grid.Positionposition(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, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAllMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll
-
Constructor Details
-
Grid
public Grid()
-
-
Method Details
-
toString
- Overrides:
toStringin 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
-