|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.tacos.formatter.NumberJsFormatter
public class NumberJsFormatter
Javascript formatting renderer for numbers. The following parameters are allowed in the initializer:
Parameter Name | Description | Default |
---|---|---|
signed | "true" if the sign must be specified. "false" if it can't, and "[true,false]" if either way is possible. | [true,false] |
separator | Thousands separator. | component's locale grouping separator. |
places | Mandatory decimal places. Null if decimals are optional. | null |
decimal | Decimal separator. | Component's locale decimal separator. |
forceSeparator | "true" if the separator must be specified when editing the number. | false |
roundedPlaces | Number of decimal places to round to. Null if no rounding is required. | null |
Field Summary | |
---|---|
static String |
FORMATTER_SCRIPT_RESOURCE
Classpath for formatter script. |
Constructor Summary | |
---|---|
NumberJsFormatter()
Default constructor, required by BeanFactory . |
|
NumberJsFormatter(String initializer)
Constructor with initializer, required by BeanFactory . |
Method Summary | |
---|---|
String |
getDecimal()
|
String |
getForceSeparator()
|
String |
getPlaces()
|
String |
getRoundedPlaces()
|
String |
getSeparator()
|
String |
getSigned()
|
void |
renderContributions(org.apache.tapestry.IRequestCycle cycle,
org.apache.tapestry.engine.IScriptSource scriptSource,
org.apache.tapestry.IComponent comp,
String uniqueId)
Renders the formatter contributions (usually JavaScript functions). |
void |
setDecimal(String decimal)
|
void |
setForceSeparator(String forceSeparator)
|
void |
setPlaces(String places)
|
void |
setRoundedPlaces(String roundedPlaces)
|
void |
setSeparator(String separator)
|
void |
setSigned(String signed)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String FORMATTER_SCRIPT_RESOURCE
Constructor Detail |
---|
public NumberJsFormatter()
BeanFactory
.
public NumberJsFormatter(String initializer)
BeanFactory
.
Method Detail |
---|
public void renderContributions(org.apache.tapestry.IRequestCycle cycle, org.apache.tapestry.engine.IScriptSource scriptSource, org.apache.tapestry.IComponent comp, String uniqueId)
renderContributions
in interface JsFormatter
cycle
- Tapestry request cycle.scriptSource
- Tapestry script source.comp
- the component.uniqueId
- optional unique Id to override the component's id.public String getDecimal()
public void setDecimal(String decimal)
decimal
- The decimal to set.public String getForceSeparator()
public void setForceSeparator(String forceSeparator)
forceSeparator
- The forceSeparator to set.public String getPlaces()
public void setPlaces(String places)
places
- The places to set.public String getRoundedPlaces()
public void setRoundedPlaces(String roundedPlaces)
roundedPlaces
- The roundedPlaces to set.public String getSeparator()
public void setSeparator(String separator)
separator
- The separator to set.public String getSigned()
public void setSigned(String signed)
signed
- The signed to set.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |