public class CDateField extends CBusinessField<DateDataElt>
Modifier and Type | Class and Description |
---|---|
static class |
CDateField.LockableDate
A utility class holding a date that can be locked
|
Modifier and Type | Field and Description |
---|---|
static java.text.SimpleDateFormat |
dateformat |
static java.text.SimpleDateFormat |
fulldateformat |
constraintsforcallback, isactive, property, showinbottomnotes, showintitle
Constructor and Description |
---|
CDateField(MessageReader reader,
CPageSignifPath parentpath)
creates a CDateField from a message from the server
|
Modifier and Type | Method and Description |
---|---|
CPageNode |
deepcopyWithCallback(Callback callback) |
void |
ForceAction(PageActionManager actionmanager,
CPageAction action)
adds an action from the upper node to this field
|
void |
forceUpdateData(DataElt dataelt) |
DataElt |
getDataElt(DataEltType type,
java.lang.String eltname,
java.lang.String objectfieldname)
Returns a filled data element of the specified data element type.
|
javafx.scene.Node |
getDisplayContent() |
DateDataElt |
getFieldDataElt() |
java.lang.String |
getFieldname() |
java.lang.String |
getHelper() |
java.lang.String |
getLabel() |
javafx.scene.Node |
getNode(PageActionManager actionmanager,
CPageData inputdata,
javafx.stage.Window parentwindow,
javafx.scene.control.TabPane[] parenttabpanes) |
int |
getPreferredTableRowHeight() |
javafx.scene.control.TableColumn<ObjectTableRow,?> |
getTableColumn(PageActionManager pageactionmanager,
boolean largedisplay,
int rowheight,
java.lang.String actionkeyforupdate)
get the column representing this field for display in an object array table
|
javafx.scene.control.TableColumn<CObjectGridLine<java.lang.String>,?> |
getTableColumnForGrid(PageActionManager pageactionmanager,
int preferedrowheight,
java.lang.String actionkeyforupdate,
java.lang.String maincolumnvalue,
java.lang.String secondarycolumnvalue,
boolean maincolumnvaluetitle) |
javafx.scene.control.TreeTableColumn<ObjectDataElt,java.util.Date> |
getTreeTableColumn(PageActionManager pageactionmanager,
java.lang.String actionkeyforupdate)
get the column representing this field for display in an object tree array
table
|
java.lang.String |
getValueForConstraint() |
boolean |
isEditable() |
boolean |
isRestrictionValid(java.lang.String restriction)
checks if a restriction is valid
|
void |
liftConstraint()
lift all constraints for this field
|
void |
mothball()
cleans the page node.
|
void |
overridesLabel(java.lang.String newlabel) |
void |
pingValue()
runs controls on current value, especially related to multifield constraints
|
boolean |
setConstraint(java.util.ArrayList<java.lang.String> restrainedvalues,
java.lang.String selected) |
void |
setContent(ObjectDataElt objectdata) |
addConstraintCallBack, getParentforfield, isShowinbottomnotes, isShowintitle, parseBusinessField, setActive, setParentforfield, toString
getParentpath, getPath, getSignificantpath, parseNode, setPageCatelog
public static java.text.SimpleDateFormat dateformat
public static java.text.SimpleDateFormat fulldateformat
public CDateField(MessageReader reader, CPageSignifPath parentpath) throws OLcRemoteException, java.io.IOException
reader
- message readerparentpath
- parent path of the widget in the pageOLcRemoteException
java.io.IOException
public java.lang.String getLabel()
getLabel
in class CBusinessField<DateDataElt>
public javafx.scene.Node getDisplayContent()
getDisplayContent
in class CBusinessField<DateDataElt>
public java.lang.String getHelper()
getHelper
in class CBusinessField<DateDataElt>
public javafx.scene.Node getNode(PageActionManager actionmanager, CPageData inputdata, javafx.stage.Window parentwindow, javafx.scene.control.TabPane[] parenttabpanes)
getNode
in class CPageNode
actionmanager
- the action manager on which to register all widgets
that trigger an actioninputdata
- the list of input data of the pageparentwindow
- the javafx window this widget will be drawn inparenttabpanes
- parenttabpanes that should be triggered a layout when
this component resizespublic DataElt getDataElt(DataEltType type, java.lang.String eltname, java.lang.String objectfieldname)
CPageNode
getDataElt
in class CPageNode
type
- requested type (will be tested by the widget to see if
valid)eltname
- the name that will be put to the data elementpublic void setContent(ObjectDataElt objectdata)
setContent
in class CBusinessField<DateDataElt>
objectdata
- get the content from an object data elementpublic DateDataElt getFieldDataElt()
getFieldDataElt
in class CBusinessField<DateDataElt>
public java.lang.String getFieldname()
getFieldname
in class CBusinessField<DateDataElt>
public boolean isEditable()
isEditable
in class CBusinessField<DateDataElt>
public void ForceAction(PageActionManager actionmanager, CPageAction action)
CBusinessField
ForceAction
in class CBusinessField<DateDataElt>
actionmanager
- page action manageraction
- actionpublic void forceUpdateData(DataElt dataelt)
forceUpdateData
in class CPageNode
dataelt
- adds data element to the nodepublic javafx.scene.control.TreeTableColumn<ObjectDataElt,java.util.Date> getTreeTableColumn(PageActionManager pageactionmanager, java.lang.String actionkeyforupdate)
CBusinessField
getTreeTableColumn
in class CBusinessField<DateDataElt>
pageactionmanager
- page action manageractionkeyforupdate
- if this field has a specific action key for update.
This is is case several actions can be triggered
from data changed in the object (not fully
operational)public javafx.scene.control.TableColumn<ObjectTableRow,?> getTableColumn(PageActionManager pageactionmanager, boolean largedisplay, int rowheight, java.lang.String actionkeyforupdate)
CBusinessField
getTableColumn
in class CBusinessField<DateDataElt>
pageactionmanager
- page action managerlargedisplay
- true if large displayrowheight
- the prefered row height, in number of rowsactionkeyforupdate
- if this field has a specific action key for update.
This is is case several actions can be triggered
from data changed in the object (not fully
operational)public CPageNode deepcopyWithCallback(Callback callback)
deepcopyWithCallback
in class CPageNode
callback
- the callback method, may be nullpublic int getPreferredTableRowHeight()
getPreferredTableRowHeight
in class CBusinessField<DateDataElt>
public void mothball()
CPageNode
public boolean isRestrictionValid(java.lang.String restriction)
CBusinessField
isRestrictionValid
in class CBusinessField<DateDataElt>
restriction
- the string encoding the restrictionpublic java.lang.String getValueForConstraint()
getValueForConstraint
in class CBusinessField<DateDataElt>
public boolean setConstraint(java.util.ArrayList<java.lang.String> restrainedvalues, java.lang.String selected)
setConstraint
in class CBusinessField<DateDataElt>
restrainedvalues
- the set of possible selections for this field. The
following will be performed:
selected
- the prefered value out of the restrained value. Will
force the field to the prefered value if entered if
provided with null, wil not select anyting, if
provided wih empty string "", will force to blankpublic void liftConstraint()
CBusinessField
liftConstraint
in class CBusinessField<DateDataElt>
public void pingValue()
CBusinessField
pingValue
in class CBusinessField<DateDataElt>
public javafx.scene.control.TableColumn<CObjectGridLine<java.lang.String>,?> getTableColumnForGrid(PageActionManager pageactionmanager, int preferedrowheight, java.lang.String actionkeyforupdate, java.lang.String maincolumnvalue, java.lang.String secondarycolumnvalue, boolean maincolumnvaluetitle)
getTableColumnForGrid
in class CBusinessField<DateDataElt>
preferedrowheight
- prefered height for row (note: not used for big
decimal, not implemented for other fieldsactionkeyforupdate
- update action keymaincolumnvalue
- the main column value to consider for this field
(i.e. display only if maincolumn value) of the
object is equals to this main column valuemaincolumnvaluetitle
- if true, title is the main column value (good for
only one field display). if wrong, title is the
current column title (good for several fields
displayspublic void overridesLabel(java.lang.String newlabel)
overridesLabel
in class CBusinessField<DateDataElt>
newlabel
- set a new label to this field