public abstract class Repeater extends Object
border-width: 2px| Modifier and Type | Field and Description |
|---|---|
protected List<String> |
names
Property names for each iteration of repeater object
|
protected List<Term<?>> |
terms
Terms over which operation is repeated
|
protected int |
times
Number of times operation is repeated
|
protected Class<? extends CSSProperty> |
type
Which property is used to repeat
|
| Constructor and Description |
|---|
Repeater(int times)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
assignDefaults(Map<String,CSSProperty> properties,
Map<String,Term<?>> values)
Assigns the default values to all the properties.
|
void |
assignPropertyNames(String... propertyNames)
Assigns property names
|
void |
assignTerms(Term<?>... terms)
Assigns terms to repeater
|
protected abstract boolean |
operation(int iteration,
Map<String,CSSProperty> properties,
Map<String,Term<?>> values)
Repeating operation
|
boolean |
repeat(Map<String,CSSProperty> properties,
Map<String,Term<?>> values)
Repeats operations on terms
|
boolean |
repeatOverFourTermDeclaration(Declaration d,
Map<String,CSSProperty> properties,
Map<String,Term<?>> values)
Construct terms array to be used by repeated object from available terms
(in size 1 to 4) according to CSS rules.
|
protected int times
protected Class<? extends CSSProperty> type
public Repeater(int times)
times - Number of iterationsprotected abstract boolean operation(int iteration,
Map<String,CSSProperty> properties,
Map<String,Term<?>> values)
iteration - Currently passing iterationproperties - Properties map where to store properties typesvalues - Value map where to store properties valuestrue in case of success, false
elsewherepublic boolean repeat(Map<String,CSSProperty> properties, Map<String,Term<?>> values)
properties - Properties map where to store properties typesvalues - Values map where to store properties valuestrue in case of success, false
elsewherepublic boolean repeatOverFourTermDeclaration(Declaration d, Map<String,CSSProperty> properties, Map<String,Term<?>> values) throws IllegalArgumentException
margin: 2px 5px; creates virtual terms array with terms
2px 5px 2px 5px so top and bottom; left and right contains
the same margin
d - Declaration with termsproperties - Properties map where to store properties typesvalues - Value map where to store properties valuestrue in case of success, false
elsewhereIllegalArgumentException - In case when number of terms passed does not correspond to
iteration timespublic void assignPropertyNames(String... propertyNames) throws IllegalArgumentException
propertyNames - Names of properties for each iterationIllegalArgumentException - In case when number of properties names does not correspond
with number of iterationspublic void assignTerms(Term<?>... terms) throws IllegalArgumentException
terms - Terms to be assignedIllegalArgumentException - In case when number of terms does not correspond with number
of iterationsCopyright © 2014. All rights reserved.