com.day.cq.wcm.api.components
Class Toolbar

java.lang.Object
  extended by 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
static class Toolbar.Custom
           
static interface Toolbar.Item
           
static class Toolbar.Label
           
static class Toolbar.Separator
           
 
Constructor Summary
Toolbar()
          Creates an empty toolbar
Toolbar(Collection<? extends Toolbar.Item> items)
          Creates a new toolbar and adds the given items to it.
Toolbar(Toolbar.Item... items)
          Creates a new toolbar and adds the given items to it.
Toolbar(Toolbar toolbar)
          Creates an unmodifiable copy of the given toolbar.
 
Method Summary
 void add(int index, Toolbar.Item element)
           
 boolean add(Toolbar.Item o)
           
 boolean addAll(Collection<? extends Toolbar.Item> c)
           
 boolean addAll(int index, Collection<? extends Toolbar.Item> c)
           
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 boolean equals(Object o)
           
 Toolbar.Item get(int index)
           
 int hashCode()
           
 int indexOf(Object o)
           
 boolean isEmpty()
           
 Iterator<Toolbar.Item> iterator()
           
 int lastIndexOf(Object o)
           
 ListIterator<Toolbar.Item> listIterator()
           
 ListIterator<Toolbar.Item> listIterator(int index)
           
 Toolbar.Item remove(int index)
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 Toolbar.Item set(int index, Toolbar.Item element)
           
 int size()
           
 List<Toolbar.Item> subList(int fromIndex, int toIndex)
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 void write(org.apache.sling.commons.json.io.JSONWriter writer, String key)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

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(org.apache.sling.commons.json.io.JSONWriter writer,
                  String key)
           throws org.apache.sling.commons.json.JSONException
Throws:
org.apache.sling.commons.json.JSONException

size

public int size()
Specified by:
size in interface Collection<Toolbar.Item>
Specified by:
size in interface List<Toolbar.Item>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<Toolbar.Item>
Specified by:
isEmpty in interface List<Toolbar.Item>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<Toolbar.Item>
Specified by:
contains in interface List<Toolbar.Item>

iterator

public Iterator<Toolbar.Item> iterator()
Specified by:
iterator in interface Iterable<Toolbar.Item>
Specified by:
iterator in interface Collection<Toolbar.Item>
Specified by:
iterator in interface List<Toolbar.Item>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<Toolbar.Item>
Specified by:
toArray in interface List<Toolbar.Item>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<Toolbar.Item>
Specified by:
toArray in interface List<Toolbar.Item>

add

public boolean add(Toolbar.Item o)
Specified by:
add in interface Collection<Toolbar.Item>
Specified by:
add in interface List<Toolbar.Item>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<Toolbar.Item>
Specified by:
remove in interface List<Toolbar.Item>

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<Toolbar.Item>
Specified by:
containsAll in interface List<Toolbar.Item>

addAll

public boolean addAll(Collection<? extends Toolbar.Item> c)
Specified by:
addAll in interface Collection<Toolbar.Item>
Specified by:
addAll in interface List<Toolbar.Item>

addAll

public boolean addAll(int index,
                      Collection<? extends Toolbar.Item> c)
Specified by:
addAll in interface List<Toolbar.Item>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<Toolbar.Item>
Specified by:
removeAll in interface List<Toolbar.Item>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<Toolbar.Item>
Specified by:
retainAll in interface List<Toolbar.Item>

clear

public void clear()
Specified by:
clear in interface Collection<Toolbar.Item>
Specified by:
clear in interface List<Toolbar.Item>

equals

public boolean equals(Object o)
Specified by:
equals in interface Collection<Toolbar.Item>
Specified by:
equals in interface List<Toolbar.Item>
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<Toolbar.Item>
Specified by:
hashCode in interface List<Toolbar.Item>
Overrides:
hashCode in class Object

get

public Toolbar.Item get(int index)
Specified by:
get in interface List<Toolbar.Item>

set

public Toolbar.Item set(int index,
                        Toolbar.Item element)
Specified by:
set in interface List<Toolbar.Item>

add

public void add(int index,
                Toolbar.Item element)
Specified by:
add in interface List<Toolbar.Item>

remove

public Toolbar.Item remove(int index)
Specified by:
remove in interface List<Toolbar.Item>

indexOf

public int indexOf(Object o)
Specified by:
indexOf in interface List<Toolbar.Item>

lastIndexOf

public int lastIndexOf(Object o)
Specified by:
lastIndexOf in interface List<Toolbar.Item>

listIterator

public ListIterator<Toolbar.Item> listIterator()
Specified by:
listIterator in interface List<Toolbar.Item>

listIterator

public ListIterator<Toolbar.Item> listIterator(int index)
Specified by:
listIterator in interface List<Toolbar.Item>

subList

public List<Toolbar.Item> subList(int fromIndex,
                                  int toIndex)
Specified by:
subList in interface List<Toolbar.Item>


Copyright © 2008 Day Management AG. All Rights Reserved.