|
JDatePicker v4.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap
oracle.jbo.common.JboAbstractMap
oracle.adf.model.binding.DCControlBinding
oracle.jbo.uicli.binding.JUControlBinding
oracle.jbo.uicli.binding.JUCtrlValueBinding
oracle.jbo.uicli.binding.JUCtrlAttrsBinding
com.standbysoft.component.date.swing.jclient.DateEditComponentBinding
DateEditComponentBinding is a lightweight date model that implements binding a
com.standbysoft.component.date.swing.JDateEditComponent to an
attribute in a row of a BC4J ViewObject.
Row,
JDateField,
JDatePicker,
JDateEditComponent| Nested Class Summary |
| Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
| Field Summary |
| Fields inherited from class oracle.jbo.uicli.binding.JUCtrlValueBinding |
ATTR_ATTRIBUTE, ATTR_ATTRIBUTE_DEF, ATTR_ATTRIBUTE_DEFS, ATTR_ATTRIBUTE_VALUE, ATTR_ATTRIBUTE_VALUES, ATTR_ATTRIBUTES, ATTR_DISPLAY_HEIGHT, ATTR_DISPLAY_HINT, ATTR_DISPLAY_WIDTH, ATTR_FORMAT, ATTR_FORMATS, ATTR_INPUT_VALUE, ATTR_LABEL, ATTR_LABELS, ATTR_LABELSET, ATTR_MANDATORY, ATTR_PATH, ATTR_TOOLTIP, ATTR_UPDATEABLE, ATTR_VIEWABLE, mHasInputVal, mInputVal, SEP_LIST_DISPLAY |
| Fields inherited from class oracle.adf.model.binding.DCControlBinding |
ATTR_CURRENTROW, ATTR_DEF, ATTR_ERROR, ATTR_ERRORS, ATTR_FULLNAME, ATTR_ITER, ATTR_NAME, mAttributeListener, mInternalGet_KeyResolved, ROW_KEY_STR |
| Constructor Summary | |
DateEditComponentBinding(JDateEditComponent control,
oracle.jbo.uicli.binding.JUIteratorBinding iterBinding,
java.lang.String attrName)
Creates an instance of this binding object that binds a JDateEditComponent with an attribute for rows in a given Iterator binding. |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Handles the actionPerformed event generated by the associated TextControl. |
void |
addControlToPanel(java.lang.Object panel,
java.lang.Object layoutObject,
java.lang.Object layoutCons)
*** For internal framework use only *** |
void |
addDateListener(DateListener listener)
Registers a new date listener to the model. |
void |
clear(int field)
Clears a specified field, meaning that it contains no value. |
static DateModel |
createAttributeBinding(oracle.jbo.uicli.binding.JUFormBinding formBinding,
JDateEditComponent control,
java.lang.String voInstanceName,
java.lang.String voIterName,
java.lang.String voIterBindingName,
java.lang.String attrName)
This method is used by the JDeveloper designtime wizards for binding a date edit component with an attribute of rows of a ViewObject/RowIterator. |
void |
dateChanged(DateEvent evt)
Handles the dateChanged event generated by the associated JDateEditComponent. |
void |
dateFieldChanged(DateEvent evt)
Does nothing. |
void |
dateFieldCleared(DateEvent evt)
Does nothing. |
int |
get(int field)
Returns the value of a specified field. |
int |
getAutoCenturyYear()
Determines the reference year used to build the long year from a short one. |
java.lang.Object |
getControlModel(java.lang.Object control)
Gets the associated View's model object. |
java.util.Date |
getDate()
Returns the date wrapped by this model. |
int |
getMaximumAllowed(int field,
java.util.Date date)
Returns the highest acceptable value for a certain field. |
int |
getMinimumAllowed(int field,
java.util.Date date)
Returns the lowest acceptable value for a certain field. |
protected DateModel |
getModelImpl(JDateEditComponent control)
Returns the DateModel object that provides data for the given control. |
java.util.TimeZone |
getTimeZone()
Returns the time zone used by this model. |
java.lang.Object |
getValueAt(int attrIndex)
Fetches the date contained in the associated control. |
boolean |
isAutoCentury()
Determines whether century is automatically added to the year field if its value is less than 100. |
protected boolean |
isControlQueriable()
Returns true, so that JDateEditComponents can participate in a query in the Find Mode of the containing panel. |
boolean |
isDateValid()
Determines whether the date represented by this model is valid or not. |
boolean |
isSet(int field)
Determines whether a specified field is cleared or not. |
boolean |
isUsed(int field)
Determines whether a specified field is part of the date. |
void |
release(int flags)
|
void |
removeDateListener(DateListener listener)
Removes a specified date listener from this model. |
void |
set(int field,
int value)
Modifies the value of a specified date field. |
void |
setAutoCentury(boolean auto)
Specifies whether century is automatically added to the year field if its value is less than 100. |
void |
setAutoCenturyYear(int year)
Specifies the year used to build the long year when short years are used. |
void |
setControl(java.lang.Object ctrl)
Bind this binding to a control. |
void |
setDataValueAt(java.lang.Object value,
int attrIndex)
Applications should call this method to update the value of an attribute using this binding such that both the associated text control and the associated row attribute gets updated. |
void |
setDate(java.util.Date date)
Specifies a new date to be represented by this model that can later be modified field by field. |
void |
setTimeZone(java.util.TimeZone zone)
Specifies the time zone for this model. |
void |
setUsed(int field,
boolean used)
Specifies whether a certain field is used to construct the actual date represented here. |
void |
setValueAt(java.lang.Object value,
int attrIndex)
Sets the given Date representation of value into the associated date edit control. |
| Methods inherited from class oracle.jbo.uicli.binding.JUCtrlAttrsBinding |
createAttributeBinding, refreshControl, setControlEnabled, toString, updateNavigated, updateRangeScrolled, updateValuesFromRow, updateValuesFromRows |
| Methods inherited from class oracle.jbo.uicli.binding.JUCtrlValueBinding |
compareAndSetAttribute, displayInShortForm, ensureVariableManager, findAttributeDef, getAttribute, getAttribute, getAttribute, getAttributeCount, getAttributeDef, getAttributeDef, getAttributeDefs, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeFromRow, getAttributeIndexOf, getAttributeNames, getAttributes, getAttributes, getAttributeUIHelper, getAttributeValidators, getAttributeValidators, getAttributeValue, getAttributeValue, getAttributeValueFromRow, getAttributeValues, getAttributeValues, getControlType, getDisplayHeight, getDisplayHint, getDisplayWidth, getError, getErrors, getFormat, getFormats, getHint, getHint, getInputErrorsForRowKey, getInputValue, getInputValue, getInputValueHandler, getInputValueInRow, getLabel, getLabel, getLabels, getLabelSet, getLocaleContext, getMergedAttributeValues, getNullValueString, getPath, getTooltip, getTooltip, hasFormatInformation, hasVariables, initResources, internalGet, internalGetRow, internalHasPermission, isArrayIteratorType, isAttributeMandatory, isAttributeUpdateable, isAttributeUpdateable, isMandatory, isNewInputValue, isUpdateable, lookupAttributeDef, processInputException, processNewInputValue, put, resetInputState, resolvePath, setArrayIteratorType, setAttribute, setAttribute, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeInRow, setAttributeValue, setError, setInputValue, setInputValue, setInputValueHandler, setInputValueInRow, setNullValueString, stopEditing, updateRowDeleted, updateRowInserted, validateInputValue |
| Methods inherited from class oracle.jbo.uicli.binding.JUControlBinding |
getCurrentRow, getFormBinding, getIteratorBinding, reportException, setFormBinding |
| Methods inherited from class oracle.adf.model.binding.DCControlBinding |
addToDCExceptions, executeQuery, executeQueryIfNeeded, get, getAllRowsInRange, getApplicationModule, getBindingContainer, getControl, getDCIteratorBinding, getDef, getDefFullName, getDefName, getFullName, getLayoutObject, getName, getRowAtRangeIndex, getRowIterator, getTransaction, getViewObject, hashCode, internalHasPermission, internalSetName, needsEstimatedRowCount, removeFromDCExceptions, reportException, resetAttributeExceptionInRow, setBindingContainer, setListener, setListener, setName |
| Methods inherited from class oracle.jbo.common.JboAbstractMap |
entrySet, equals, internalPut |
| Methods inherited from class java.util.AbstractMap |
clear, clone, containsKey, containsValue, isEmpty, keySet, putAll, remove, size, values |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface oracle.adf.model.AttributeBinding |
getErrors, getInputValue, getLabel, isUpdateable, processNewInputValue, setInputValue, validateInputValue |
| Methods inherited from interface oracle.binding.ControlBinding |
getName, getPath, resolvePath, setListener |
| Methods inherited from interface oracle.adf.model.ControlBinding |
setListener |
| Methods inherited from interface oracle.jbo.StructureDef |
getDefFullName, getDefName, getFullName, getName |
| Constructor Detail |
public DateEditComponentBinding(JDateEditComponent control,
oracle.jbo.uicli.binding.JUIteratorBinding iterBinding,
java.lang.String attrName)
This binding object also registers itself as a DateModelListener so that when a date is selected into the JDateEditComponent, this binding object responds by saving the date in the control into the BC4J Row object. The same save operation occurs on focus out from the control, as it also registers a FocusAdapter that performs the set operation on the BC4J Row object for the given attribute when focus moves out of this control.
JDeveloper wizards use the createAttributeBinding() method that returns a
DateModel object to bind a ViewObject and attribute to a date control. An
example usage for binding to Deptno attribute of DeptView ViewObject
instance is like:
jDateField1.setDateModel(DateEditComponentBinding.createAttributeBinding(panelBinding, jDateField1, "PersonView", null, "PersonViewIter", "PersonDate"));
More details on the arguments can be found in the javadoc for the above
method.
control - JDateEditComponent which should be bound to an attribute of a
BC4J row.iterBinding - JUIteratorBinding object that contains a reference to the
RowIterator that contains Rows to display.attrName - Name of the attribute in the BC4J Row object to display.| Method Detail |
public void setControl(java.lang.Object ctrl)
protected DateModel getModelImpl(JDateEditComponent control)
protected boolean isControlQueriable()
An application could create a subclass of this binding object and return false from this method to prevent the associated control from participating in find mode. Additionally, a BC4J attribute itself can control whether that attribute can participate in Query or not. That property takes precedence over this method's return, if this method returns true. In other words, if this binding is bound to a CLOB attribute type and the attribute definition for that attribute indicates that it is not queriable, then the default behavior of JUPanelBinding in Find mode will be to disable this binding's control, even though this method returns true.
public void addControlToPanel(java.lang.Object panel,
java.lang.Object layoutObject,
java.lang.Object layoutCons)
public java.lang.Object getValueAt(int attrIndex)
attrIndex - ignored for this control bindingJDateComponent.getSelectedDate()
public void setValueAt(java.lang.Object value,
int attrIndex)
value - date to display in the associated date controlattrIndex - ignored for this control bindingJDateEditComponent.setSelectedDate(Date)
public void setDataValueAt(java.lang.Object value,
int attrIndex)
value - Value to display in the associated text control and to set in
the attribute.attrIndex - Ignored for this control binding.public void actionPerformed(java.awt.event.ActionEvent e)
public java.lang.Object getControlModel(java.lang.Object control)
public static DateModel createAttributeBinding(oracle.jbo.uicli.binding.JUFormBinding formBinding,
JDateEditComponent control,
java.lang.String voInstanceName,
java.lang.String voIterName,
java.lang.String voIterBindingName,
java.lang.String attrName)
formBinding - The containing JUPanelBinding in which the given iterator
binding would be found/created.control - The control instance to bind to a ViewObject's attribute.voInstanceName - Name of the instance of the ViewObject in a BC4J
ApplicationModule.voIterName - Runtime instance name of the iterator in the ViewObject
(optional).voIterBindingName - Instance name of the iterator binding that uniquely identifies
an iterator binding object used to read/write data in this
given JUPanelBinding instance.attrName - The name of the attribute of this ViewObject rows that
contains data to display/edit in the associated date edit control.
public void release(int flags)
release in interface oracle.binding.ControlBindingpublic boolean isDateValid()
DateModel
isDateValid in interface DateModeltrue if the date is valid; false otherwise
public int getMinimumAllowed(int field,
java.util.Date date)
DateModel
getMinimumAllowed in interface DateModelfield - field that is testeddate - context object that can offer additional information about the
other date fields
0
for the minute fieldDateModel.set(int, int)
public int getMaximumAllowed(int field,
java.util.Date date)
DateModel
getMaximumAllowed in interface DateModelfield - field that is testeddate - context object that can offer additional information about the
other date fields
59
for the minute fieldDateModel.set(int, int)public void setDate(java.util.Date date)
DateModelnull date will clear all the
basic fields like Calendar.YEAR, Calendar.MONTH,
Calendar.DATE, Calendar.HOUR, Calendar.MINUTE,
Calendar.SECOND and Calendar.MILLISECOND.
setDate in interface DateModeldate - date wrapped by the modelDateModel.clear(int)public java.util.Date getDate()
DateModelnull date is returned.
getDate in interface DateModelDateModel.setDate(Date),
DateModel.isSet(int)public void setTimeZone(java.util.TimeZone zone)
DateModelSpecifies the time zone for this model. This parameter is very important if you need to know the values of the date fields in a certain time zone. If no time zone is specified, then the default one is used.
The dates that come in and out of this model are standard (GMT) while the values of the date fields depend on the time zone. If the time zone is changed, so do the internal date fields in order to reflect this change.
setTimeZone in interface DateModelzone - new time zone for this modelDateModel.get(int)public java.util.TimeZone getTimeZone()
DateModel
getTimeZone in interface DateModelDateModel.setTimeZone(TimeZone)
public void set(int field,
int value)
DateModel
set in interface DateModelfield - date field that is modified. Possible values are: Calendar.YEAR,
Calendar.MONTH, Calendar.MINUTE, etc.value - the new date field value. Various implementations could handle
this value differently. Some may allow and some may not allow out of range values.DateModel.getMinimumAllowed(int, Date),
DateModel.getMaximumAllowed(int, Date)public int get(int field)
DateModel
get in interface DateModelfield - date field that is tested. Possible values are: Calendar.YEAR,
Calendar.MONTH, Calendar.MINUTE, etc.
DateModel.setTimeZone(TimeZone)public void clear(int field)
DateModel
clear in interface DateModelfield - field that is cleared. Possible values are: Calendar.YEAR,
Calendar.MONTH, Calendar.MINUTE, etc.DateModel.isSet(int)public boolean isSet(int field)
DateModel
isSet in interface DateModelfield - field that is tested. Possible values are: Calendar.YEAR,
Calendar.MONTH, Calendar.MINUTE, etc.
true if the field is not cleared; false otherwiseDateModel.clear(int)
public void setUsed(int field,
boolean used)
DateModelSpecifies whether a certain field is used to construct the actual date
represented here. When the date is evaluated, all the fields that it
uses (marked with this method as used) must contain a value. Otherwise,
the date is considered incomplete and it is in fact a null date.
This method is mainly intended for use by date editing components that restrict the represented date only to some of its fields.
setUsed in interface DateModelfield - specified field that is marked as used or unusedused - true if the field is part of the date; false otherwiseDateModel.clear(int),
DateModel.getDate()public boolean isUsed(int field)
DateModel
isUsed in interface DateModelfield - field that is tested
true if the field is part of the date; false otherwiseDateModel.setUsed(int, boolean)public void setAutoCentury(boolean auto)
DateModel
setAutoCentury in interface DateModelauto - true if century is automatically added;
false otherwiseDateModel.setAutoCenturyYear(int)public boolean isAutoCentury()
DateModel
isAutoCentury in interface DateModeltrue if century is automatically added;
false otherwise.DateModel.setAutoCentury(boolean)public void setAutoCenturyYear(int year)
DateModelSpecifies the year used to build the long year when short years are used. One can use short years which range from 0..99 when the autoCentury property is enabled. This means that instead of typing 1980 you can just use 80.
The short year is converted into a long year after it is compared with the last two digits of the autoCenturyYear year. Here are some examples that show how this mechanism works:
| short | autoCenturyYear | long |
|---|---|---|
| 30 | 1930 | 1930 |
| 56 | 1930 | 1956 |
| 11 | 1930 | 2011 |
setAutoCenturyYear in interface DateModelyear - reference year used to build the long year from a short oneDateModel.setAutoCentury(boolean)public int getAutoCenturyYear()
DateModel
getAutoCenturyYear in interface DateModelDateModel.setAutoCenturyYear(int)public void addDateListener(DateListener listener)
DateModel
addDateListener in interface DateModellistener - listener to be registeredpublic void removeDateListener(DateListener listener)
DateModel
removeDateListener in interface DateModellistener - listener to be removedpublic void dateChanged(DateEvent evt)
dateChanged in interface DateListenerevt - event that describes the date changepublic void dateFieldChanged(DateEvent evt)
dateFieldChanged in interface DateListenerevt - event that describes the field changepublic void dateFieldCleared(DateEvent evt)
dateFieldCleared in interface DateListenerevt - event that describes the field change
|
JDatePicker v4.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Visit www.jdatepicker.com for further information or send us your suggestions.
Copyright © 2003-2007 Stand By Soft Ltd. All Rights Reserved.