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

java.lang.Object
  extended by org.apache.sling.commons.json.JSONObject
      extended by com.day.cq.wcm.api.components.Toolbar.Button
All Implemented Interfaces:
Toolbar.Item
Enclosing class:
Toolbar

public static class Toolbar.Button
extends JSONObject
implements Toolbar.Item

Represents a toolbar button

Since:
5.3

Field Summary
 
Fields inherited from class org.apache.sling.commons.json.JSONObject
NULL
 
Constructor Summary
Toolbar.Button(String text, String handler)
           
Toolbar.Button(String text, String handler, boolean disabled, String tooltip)
           
 
Method Summary
 Toolbar.Button setDisabled(boolean disabled)
           
 Toolbar.Button setHandler(String handler)
           
 Toolbar.Button setText(String text)
           
 Toolbar.Button setTooltip(String tooltip)
           
 void write(JSONWriter writer)
          Serialize to JSON writer.
 
Methods inherited from class org.apache.sling.commons.json.JSONObject
accumulate, append, doubleToString, get, getBoolean, getDouble, getInt, getJSONArray, getJSONObject, getLong, getString, has, isNull, keys, length, names, numberToString, opt, optBoolean, optBoolean, optDouble, optDouble, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putOpt, quote, remove, toJSONArray, toString, toString, valueToString, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Toolbar.Button

public Toolbar.Button(String text,
                      String handler)

Toolbar.Button

public Toolbar.Button(String text,
                      String handler,
                      boolean disabled,
                      String tooltip)
Method Detail

setText

public Toolbar.Button setText(String text)

setHandler

public Toolbar.Button setHandler(String handler)

setTooltip

public Toolbar.Button setTooltip(String tooltip)

setDisabled

public Toolbar.Button setDisabled(boolean disabled)

write

public void write(JSONWriter writer)
           throws JSONException
Description copied from interface: Toolbar.Item
Serialize to JSON writer.

Specified by:
write in interface Toolbar.Item
Parameters:
writer - the writer
Throws:
JSONException - if a JSON error occurs.


Copyright © 2011-2013 Adobe Systems Incorporated. All Rights Reserved.