Package com.day.cq.wcm.api.components
Class Toolbar
- java.lang.Object
-
- com.day.cq.wcm.api.components.Toolbar
-
- All Implemented Interfaces:
Iterable<Toolbar.Item>,Collection<Toolbar.Item>,List<Toolbar.Item>
public class Toolbar extends Object implements List<Toolbar.Item>
Toolbar...
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classToolbar.ButtonRepresents a toolbar buttonstatic classToolbar.Customstatic interfaceToolbar.Itemstatic classToolbar.Labelstatic classToolbar.Separator
-
Constructor Summary
Constructors Constructor Description Toolbar()Creates an empty toolbarToolbar(Toolbar toolbar)Creates an unmodifiable copy of the given toolbar.Toolbar(Toolbar.Item... items)Creates a new toolbar and adds the given items to it.Toolbar(Collection<? extends Toolbar.Item> items)Creates a new toolbar and adds the given items to it.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, Toolbar.Item element)booleanadd(Toolbar.Item o)booleanaddAll(int index, Collection<? extends Toolbar.Item> c)booleanaddAll(Collection<? extends Toolbar.Item> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)booleanequals(Object o)Toolbar.Itemget(int index)inthashCode()intindexOf(Object o)booleanisEmpty()Iterator<Toolbar.Item>iterator()intlastIndexOf(Object o)ListIterator<Toolbar.Item>listIterator()ListIterator<Toolbar.Item>listIterator(int index)Toolbar.Itemremove(int index)booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)Toolbar.Itemset(int index, Toolbar.Item element)intsize()List<Toolbar.Item>subList(int fromIndex, int toIndex)Object[]toArray()<T> T[]toArray(T[] a)voidwrite(JSONWriter writer, String key)-
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
replaceAll, sort, spliterator
-
-
-
-
Constructor Detail
-
Toolbar
public Toolbar()
Creates an empty toolbar
-
Toolbar
public Toolbar(Toolbar.Item... items)
Creates a new toolbar and adds the given items to it.- Parameters:
items- items to add
-
Toolbar
public Toolbar(Collection<? extends Toolbar.Item> items)
Creates a new toolbar and adds the given items to it.- Parameters:
items- items to add
-
Toolbar
public Toolbar(Toolbar toolbar)
Creates an unmodifiable copy of the given toolbar.- Parameters:
toolbar- base toolbar
-
-
Method Detail
-
write
public void write(JSONWriter writer, String key) throws JSONException
- Throws:
JSONException
-
size
public int size()
- Specified by:
sizein interfaceCollection<Toolbar.Item>- Specified by:
sizein interfaceList<Toolbar.Item>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<Toolbar.Item>- Specified by:
isEmptyin interfaceList<Toolbar.Item>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<Toolbar.Item>- Specified by:
containsin interfaceList<Toolbar.Item>
-
iterator
public Iterator<Toolbar.Item> iterator()
- Specified by:
iteratorin interfaceCollection<Toolbar.Item>- Specified by:
iteratorin interfaceIterable<Toolbar.Item>- Specified by:
iteratorin interfaceList<Toolbar.Item>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<Toolbar.Item>- Specified by:
toArrayin interfaceList<Toolbar.Item>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfaceCollection<Toolbar.Item>- Specified by:
toArrayin interfaceList<Toolbar.Item>
-
add
public boolean add(Toolbar.Item o)
- Specified by:
addin interfaceCollection<Toolbar.Item>- Specified by:
addin interfaceList<Toolbar.Item>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<Toolbar.Item>- Specified by:
removein interfaceList<Toolbar.Item>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<Toolbar.Item>- Specified by:
containsAllin interfaceList<Toolbar.Item>
-
addAll
public boolean addAll(Collection<? extends Toolbar.Item> c)
- Specified by:
addAllin interfaceCollection<Toolbar.Item>- Specified by:
addAllin interfaceList<Toolbar.Item>
-
addAll
public boolean addAll(int index, Collection<? extends Toolbar.Item> c)- Specified by:
addAllin interfaceList<Toolbar.Item>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<Toolbar.Item>- Specified by:
removeAllin interfaceList<Toolbar.Item>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<Toolbar.Item>- Specified by:
retainAllin interfaceList<Toolbar.Item>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<Toolbar.Item>- Specified by:
clearin interfaceList<Toolbar.Item>
-
equals
public boolean equals(Object o)
- Specified by:
equalsin interfaceCollection<Toolbar.Item>- Specified by:
equalsin interfaceList<Toolbar.Item>- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceCollection<Toolbar.Item>- Specified by:
hashCodein interfaceList<Toolbar.Item>- Overrides:
hashCodein classObject
-
get
public Toolbar.Item get(int index)
- Specified by:
getin interfaceList<Toolbar.Item>
-
set
public Toolbar.Item set(int index, Toolbar.Item element)
- Specified by:
setin interfaceList<Toolbar.Item>
-
add
public void add(int index, Toolbar.Item element)- Specified by:
addin interfaceList<Toolbar.Item>
-
remove
public Toolbar.Item remove(int index)
- Specified by:
removein interfaceList<Toolbar.Item>
-
indexOf
public int indexOf(Object o)
- Specified by:
indexOfin interfaceList<Toolbar.Item>
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<Toolbar.Item>
-
listIterator
public ListIterator<Toolbar.Item> listIterator()
- Specified by:
listIteratorin interfaceList<Toolbar.Item>
-
listIterator
public ListIterator<Toolbar.Item> listIterator(int index)
- Specified by:
listIteratorin interfaceList<Toolbar.Item>
-
subList
public List<Toolbar.Item> subList(int fromIndex, int toIndex)
- Specified by:
subListin interfaceList<Toolbar.Item>
-
-