|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.odlabs.wiquery.core.options.Options
public class Options
$Id$
Wraps a set of options possibly defined for a WiQuery Component
.
By default, Options are rendered as a JavaScript object like this:
{ option1: 'value1', option2: 'value2 }This rendering can be customized by creating a
IOptionsRenderer
.
Constructor Summary | |
---|---|
Options()
Build a new empty Options instance that does not bind to a component. |
|
Options(org.apache.wicket.Component owner)
Build a new empty Options instance that binds to a component |
Method Summary | |
---|---|
boolean |
containsKey(Object key)
Returns if the given option is defined or not. |
void |
detach()
|
String |
get(String key)
Returns the given option value as a String. |
Boolean |
getBoolean(String key)
Returns the given option value. |
IComplexOption |
getComplexOption(String key)
Returns the given option value. |
Double |
getDouble(String key)
Returns the given option value. |
Float |
getFloat(String key)
Returns the given option value. |
Integer |
getInt(String key)
Returns the given option value. |
CharSequence |
getJavaScriptOptions()
Returns the JavaScript statement corresponding to options. |
JsScope |
getJsScope(String key)
Returns the given option value. |
ICollectionItemOptions |
getListItemOptions(String key)
Returns the given option value. |
String |
getLiteral(String key)
Returns the given option value. |
Options |
getObject()
|
Short |
getShort(String key)
Returns the given option value. |
boolean |
isEmpty()
|
Options |
put(String key,
boolean value)
Put an boolean value for the given option name. |
Options |
put(String key,
double value)
Puts an double value for the given option name. |
Options |
put(String key,
float value)
Puts an float value for the given option name. |
Options |
put(String key,
ICollectionItemOptions value)
Puts a list of IListItemOption value for the given option name. |
Options |
put(String key,
IComplexOption value)
Puts a complex option value for the given option name. |
Options |
put(String key,
int value)
Puts an int value for the given option name. |
Options |
put(String key,
JsScope value)
Puts a JsScope value for the given option name. |
Options |
put(String key,
long value)
Puts a Long value for the given option name. |
Options |
put(String key,
short value)
Puts an short value for the given option name. |
Options |
put(String key,
String value)
Puts a String value for the given option name. |
Options |
putBoolean(String key,
org.apache.wicket.model.IModel<Boolean> value)
Put an boolean value for the given option name. |
Options |
putDouble(String key,
org.apache.wicket.model.IModel<Double> value)
Puts an IModel <Double> value for the given option name. |
Options |
putFloat(String key,
org.apache.wicket.model.IModel<Float> value)
Puts an IModel <Double> value for the given option name. |
Options |
putInteger(String key,
org.apache.wicket.model.IModel<Integer> value)
Puts an int value for the given option name. |
Options |
putLiteral(String key,
org.apache.wicket.model.IModel<String> value)
Puts a String value as a JavaScript literal for the given name. |
Options |
putLiteral(String key,
String value)
Puts a String value as a JavaScript literal for the given name. |
Options |
putLong(String key,
org.apache.wicket.model.IModel<Long> value)
Puts a Long value for the given option name. |
Options |
putShort(String key,
org.apache.wicket.model.IModel<Short> value)
Puts an short value for the given option name. |
Options |
putString(String key,
org.apache.wicket.model.IModel<String> value)
Puts a String value for the given option name. |
void |
removeOption(String key)
Removes an option for a given name. |
void |
setObject(Options object)
|
void |
setOwner(org.apache.wicket.Component owner)
|
void |
setRenderer(IOptionsRenderer optionsRenderer)
Sets the renderer to use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Options()
Options
instance that does not bind to a component. This
does not allow the usage of IComponentAssignedModels as option values.
public Options(org.apache.wicket.Component owner)
Options
instance that binds to a component
Method Detail |
---|
public void setOwner(org.apache.wicket.Component owner)
public boolean containsKey(Object key)
Returns if the given option is defined or not.
key
- the option name.public String get(String key)
Returns the given option value as a String.
key
- the option name.public Boolean getBoolean(String key)
Returns the given option value.
key
- the option name.public JsScope getJsScope(String key)
Returns the given option value.
key
- the option name.public IComplexOption getComplexOption(String key)
Returns the given option value.
key
- the option name.
public Double getDouble(String key)
Returns the given option value.
key
- the option name.public Float getFloat(String key)
Returns the given option value.
key
- the option name.public Integer getInt(String key)
Returns the given option value.
key
- the option name.public CharSequence getJavaScriptOptions()
public ICollectionItemOptions getListItemOptions(String key)
Returns the given option value.
key
- the option name.
public String getLiteral(String key)
Returns the given option value.
key
- the option name.public Short getShort(String key)
Returns the given option value.
key
- the option name.public boolean isEmpty()
public Options put(String key, boolean value)
Put an boolean value for the given option name.
key
- the option name.value
- the boolean value.public Options putBoolean(String key, org.apache.wicket.model.IModel<Boolean> value)
Put an boolean value for the given option name.
key
- the option name.value
- the boolean value.public Options put(String key, double value)
Puts an double value for the given option name.
key
- the option name.value
- the float double.public Options putDouble(String key, org.apache.wicket.model.IModel<Double> value)
Puts an IModel <Double> value for the given option name.
key
- the option name.value
- the float value.public Options put(String key, float value)
Puts an float value for the given option name.
key
- the option namevalue
- The float value
public Options putFloat(String key, org.apache.wicket.model.IModel<Float> value)
Puts an IModel <Double> value for the given option name.
key
- the option name.value
- the float double.public Options put(String key, ICollectionItemOptions value)
Puts a list of IListItemOption value for the given option name.
key
- the option name.value
- the IListItemOption list.public Options put(String key, IComplexOption value)
Puts a complex option value for the given option name.
key
- the option name.value
- the IComplexOption.public Options put(String key, int value)
Puts an int value for the given option name.
key
- the option name.value
- the int value.public Options putInteger(String key, org.apache.wicket.model.IModel<Integer> value)
Puts an int value for the given option name.
key
- the option name.value
- the int value.public Options put(String key, JsScope value)
Puts a JsScope
value for the given option name.
key
- the option name.value
- the JsScope
value.public Options put(String key, short value)
Puts an short value for the given option name.
key
- the option name.value
- the short value.public Options putShort(String key, org.apache.wicket.model.IModel<Short> value)
Puts an short value for the given option name.
key
- the option name.value
- the short value.public Options put(String key, String value)
Puts a String
value for the given option name.
key
- the option name.value
- the String
value.public Options putString(String key, org.apache.wicket.model.IModel<String> value)
Puts a String
value for the given option name.
key
- the option name.value
- the String
value.public Options put(String key, long value)
Puts a Long
value for the given option name.
key
- the option name.value
- the Long
value.public Options putLong(String key, org.apache.wicket.model.IModel<Long> value)
Puts a Long
value for the given option name.
key
- the option name.value
- the Long
value.public Options putLiteral(String key, String value)
Puts a String
value as a JavaScript literal for the given name.
Note that the JavaScript resulting from this options will be 'value'
key
- the option name.value
- the LiteralOption
value.public Options putLiteral(String key, org.apache.wicket.model.IModel<String> value)
Puts a String
value as a JavaScript literal for the given name.
Note that the JavaScript resulting from this options will be 'value'
key
- the option name.value
- the LiteralOption
value.public void removeOption(String key)
Removes an option for a given name.
key
- the option's key to remove.public void setRenderer(IOptionsRenderer optionsRenderer)
public Options getObject()
getObject
in interface org.apache.wicket.model.IModel<Options>
public void setObject(Options object)
setObject
in interface org.apache.wicket.model.IModel<Options>
public void detach()
detach
in interface org.apache.wicket.model.IDetachable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |