|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.xma.mdl.WModel
at.spardat.xma.mdl.simple.SimpleWM
at.spardat.xma.mdl.simple.SimpleWMClient
Implementation of IWModelClient.
| Field Summary |
| Fields inherited from class at.spardat.xma.mdl.simple.SimpleWM |
type_, value_ |
| Fields inherited from class at.spardat.xma.mdl.WModel |
S_NULL |
| Constructor Summary | |
SimpleWMClient(short id,
byte type,
PageClient pm)
Constructor |
|
| Method Summary | |
boolean |
doUITransfer()
The user of this class may forget to assign a correct formatter. |
at.spardat.enterprise.fmt.IFmt |
getFmt()
Returns a clone of the associated Formatter or null if none is associated. |
protected at.spardat.enterprise.fmt.IFmt |
getFmtInternal()
Returns the formatter for internal, read-only access. |
java.lang.String |
getFormattedString()
Provides a string that results from applying the formatter to the internally stored value. |
PageClient |
getPageModelC()
Returns the PageClient this WidgetModelC belongs to. |
UIDelegateClient |
getUIDelegate()
Returns the attached UIDelegateClient. |
boolean |
handle(ModelChangeEvent event)
This method does not simply apply the ChangeEvent to this, but also notifies the UIDelegateClient to allow it to synchronize the UI. |
boolean |
isEditable()
Returns true if this model's widget may be modified by the end-user. |
boolean |
isEnabled()
Returns true, if this model's widget is enabled. |
boolean |
isMandatory()
Returns the MANDATORY-property of the associated formatter. |
boolean |
isValidateIfUneditable()
Returns if this widget is validated in the editable=false state, too. |
boolean |
isValueValid()
Determines if the value contained in this Model is a valid one in terms of the associated formatter. |
void |
setEditable(boolean what)
Sets the editable-state of this models's widget. |
void |
setEnabled(boolean what)
Sets the enabled-state of this model's widget. |
void |
setFmt(at.spardat.enterprise.fmt.IFmt formatter)
Sets a new Formatter. |
void |
setMandatory(boolean what)
If there is a formatter attached, this method clones the old formatter, changes the MANDATORY-property of the formatter to the provided value, and sets the formatter. |
protected boolean |
settersShouldBeSloppy(Page page)
Determines if setters should ignore type violations. |
void |
setValidateIfUneditable(boolean what)
If this is set to true then the widget is validated in the editable=false state, too. |
| Methods inherited from class at.spardat.xma.mdl.simple.SimpleWM |
changed, clear, commit, describe, equalsCS, estimateMemory, externalize, getEncodedValue, getType, hasValue, internalize, isTrue, randomlyChange, rollback, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setInternal, toBigDecimal, toByte, toBYTE, toDate, toDouble, toDOUBLE, toFloat, toFLOAT, toInt, toINTEGER, toLong, toLONG, toShort, toSHORT, toString, toString |
| Methods inherited from class at.spardat.xma.mdl.WModel |
cleanUpAfterServerEvent, getId |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface at.spardat.xma.mdl.simple.ISimpleWM |
clear, set, set, set, set, set, set, set, set, set, set, set, set, set, set |
| Methods inherited from interface at.spardat.xma.mdl.IAtomic |
getEncodedValue, getType, hasValue, isTrue, toBigDecimal, toByte, toBYTE, toDate, toDouble, toDOUBLE, toFloat, toFLOAT, toInt, toINTEGER, toLong, toLONG, toShort, toSHORT, toString, toString |
| Constructor Detail |
public SimpleWMClient(short id,
byte type,
PageClient pm)
id - the unique id of a WidgetModeltype - a type constant of interface Types.pm - the Page this model belongs to| Method Detail |
public boolean isValueValid()
ISimpleWMClient
isValueValid in interface ISimpleWMClientISimpleWMClient.isValueValid()public at.spardat.enterprise.fmt.IFmt getFmt()
ISimpleWMClient
getFmt in interface ISimpleWMClientISimpleWMClient.getFmt()protected at.spardat.enterprise.fmt.IFmt getFmtInternal()
public void setFmt(at.spardat.enterprise.fmt.IFmt formatter)
ISimpleWMClient
setFmt in interface ISimpleWMClientformatter - to be set. It must be compatible to the type set in the superclass.
For type T_STRING, any formatter may be set. For the other types, the type of the
formatter must be compatible with the type specified in the superclass. For
instance, if the type is T_BCD, only instances of ABcdFmt are allowed.ISimpleWMClient.setFmt(at.spardat.enterprise.fmt.IFmt)public boolean doUITransfer()
public java.lang.String getFormattedString()
ISimpleWMClient
getFormattedString in interface ISimpleWMClientISimpleWMClient.getFormattedString()public UIDelegateClient getUIDelegate()
IWModelClient
getUIDelegate in interface IWModelClientpublic boolean handle(ModelChangeEvent event)
handle in class SimpleWMWModel.handle(ModelChangeEvent)public PageClient getPageModelC()
public boolean isEditable()
IWModelClient
isEditable in interface IWModelClientIWModelClient.isEditable()public boolean isEnabled()
IWModelClient
isEnabled in interface IWModelClientIWModelClient.isEnabled()public void setEditable(boolean what)
IWModelClientUsually, this method is called on all widget-models of a page to set the whole page to a read-only mode.
If this method is not called, the default is true.
setEditable in interface IWModelClientwhat - true if the model's widget should be editable, false otherwise.IWModelClient.setEditable(boolean)public void setEnabled(boolean what)
IWModelClient
setEnabled in interface IWModelClientwhat - the state to set.IWModelClient.setEnabled(boolean)public boolean isMandatory()
ISimpleWMClient
isMandatory in interface ISimpleWMClientISimpleWMClient.isMandatory()public void setMandatory(boolean what)
ISimpleWMClient
setMandatory in interface ISimpleWMClientISimpleWMClient.setMandatory(boolean)public void setValidateIfUneditable(boolean what)
ISimpleWMClient
setValidateIfUneditable in interface ISimpleWMClientwhat - at.spardat.xma.mdl.IWModelClient#setValidateIfUneditable()public boolean isValidateIfUneditable()
ISimpleWMClient
isValidateIfUneditable in interface ISimpleWMClientat.spardat.xma.mdl.IWModelClient#isValidateIfUneditable()protected boolean settersShouldBeSloppy(Page page)
SimpleWM
settersShouldBeSloppy in class SimpleWMSimpleWM.settersShouldBeSloppy(Page)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||