Package com.day.cq.wcm.api.components
Class Toolbar
- java.lang.Object
-
- com.day.cq.wcm.api.components.Toolbar
-
- All Implemented Interfaces:
java.lang.Iterable<Toolbar.Item>
,java.util.Collection<Toolbar.Item>
,java.util.List<Toolbar.Item>
public class Toolbar extends java.lang.Object implements java.util.List<Toolbar.Item>
Toolbar
...
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Toolbar.Button
Represents a toolbar buttonstatic class
Toolbar.Custom
static interface
Toolbar.Item
static class
Toolbar.Label
static class
Toolbar.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(java.util.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 void
add(int index, Toolbar.Item element)
boolean
add(Toolbar.Item o)
boolean
addAll(int index, java.util.Collection<? extends Toolbar.Item> c)
boolean
addAll(java.util.Collection<? extends Toolbar.Item> c)
void
clear()
boolean
contains(java.lang.Object o)
boolean
containsAll(java.util.Collection<?> c)
boolean
equals(java.lang.Object o)
Toolbar.Item
get(int index)
int
hashCode()
int
indexOf(java.lang.Object o)
boolean
isEmpty()
java.util.Iterator<Toolbar.Item>
iterator()
int
lastIndexOf(java.lang.Object o)
java.util.ListIterator<Toolbar.Item>
listIterator()
java.util.ListIterator<Toolbar.Item>
listIterator(int index)
Toolbar.Item
remove(int index)
boolean
remove(java.lang.Object o)
boolean
removeAll(java.util.Collection<?> c)
boolean
retainAll(java.util.Collection<?> c)
Toolbar.Item
set(int index, Toolbar.Item element)
int
size()
java.util.List<Toolbar.Item>
subList(int fromIndex, int toIndex)
java.lang.Object[]
toArray()
<T> T[]
toArray(T[] a)
void
write(JSONWriter writer, java.lang.String key)
-
-
-
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(java.util.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, java.lang.String key) throws JSONException
- Throws:
JSONException
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<Toolbar.Item>
- Specified by:
size
in interfacejava.util.List<Toolbar.Item>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Collection<Toolbar.Item>
- Specified by:
isEmpty
in interfacejava.util.List<Toolbar.Item>
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
contains
in interfacejava.util.Collection<Toolbar.Item>
- Specified by:
contains
in interfacejava.util.List<Toolbar.Item>
-
iterator
public java.util.Iterator<Toolbar.Item> iterator()
- Specified by:
iterator
in interfacejava.util.Collection<Toolbar.Item>
- Specified by:
iterator
in interfacejava.lang.Iterable<Toolbar.Item>
- Specified by:
iterator
in interfacejava.util.List<Toolbar.Item>
-
toArray
public java.lang.Object[] toArray()
- Specified by:
toArray
in interfacejava.util.Collection<Toolbar.Item>
- Specified by:
toArray
in interfacejava.util.List<Toolbar.Item>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArray
in interfacejava.util.Collection<Toolbar.Item>
- Specified by:
toArray
in interfacejava.util.List<Toolbar.Item>
-
add
public boolean add(Toolbar.Item o)
- Specified by:
add
in interfacejava.util.Collection<Toolbar.Item>
- Specified by:
add
in interfacejava.util.List<Toolbar.Item>
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove
in interfacejava.util.Collection<Toolbar.Item>
- Specified by:
remove
in interfacejava.util.List<Toolbar.Item>
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAll
in interfacejava.util.Collection<Toolbar.Item>
- Specified by:
containsAll
in interfacejava.util.List<Toolbar.Item>
-
addAll
public boolean addAll(java.util.Collection<? extends Toolbar.Item> c)
- Specified by:
addAll
in interfacejava.util.Collection<Toolbar.Item>
- Specified by:
addAll
in interfacejava.util.List<Toolbar.Item>
-
addAll
public boolean addAll(int index, java.util.Collection<? extends Toolbar.Item> c)
- Specified by:
addAll
in interfacejava.util.List<Toolbar.Item>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAll
in interfacejava.util.Collection<Toolbar.Item>
- Specified by:
removeAll
in interfacejava.util.List<Toolbar.Item>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAll
in interfacejava.util.Collection<Toolbar.Item>
- Specified by:
retainAll
in interfacejava.util.List<Toolbar.Item>
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Collection<Toolbar.Item>
- Specified by:
clear
in interfacejava.util.List<Toolbar.Item>
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interfacejava.util.Collection<Toolbar.Item>
- Specified by:
equals
in interfacejava.util.List<Toolbar.Item>
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.util.Collection<Toolbar.Item>
- Specified by:
hashCode
in interfacejava.util.List<Toolbar.Item>
- Overrides:
hashCode
in classjava.lang.Object
-
get
public Toolbar.Item get(int index)
- Specified by:
get
in interfacejava.util.List<Toolbar.Item>
-
set
public Toolbar.Item set(int index, Toolbar.Item element)
- Specified by:
set
in interfacejava.util.List<Toolbar.Item>
-
add
public void add(int index, Toolbar.Item element)
- Specified by:
add
in interfacejava.util.List<Toolbar.Item>
-
remove
public Toolbar.Item remove(int index)
- Specified by:
remove
in interfacejava.util.List<Toolbar.Item>
-
indexOf
public int indexOf(java.lang.Object o)
- Specified by:
indexOf
in interfacejava.util.List<Toolbar.Item>
-
lastIndexOf
public int lastIndexOf(java.lang.Object o)
- Specified by:
lastIndexOf
in interfacejava.util.List<Toolbar.Item>
-
listIterator
public java.util.ListIterator<Toolbar.Item> listIterator()
- Specified by:
listIterator
in interfacejava.util.List<Toolbar.Item>
-
listIterator
public java.util.ListIterator<Toolbar.Item> listIterator(int index)
- Specified by:
listIterator
in interfacejava.util.List<Toolbar.Item>
-
subList
public java.util.List<Toolbar.Item> subList(int fromIndex, int toIndex)
- Specified by:
subList
in interfacejava.util.List<Toolbar.Item>
-
-