use of com.sldeditor.filter.v2.function.temporal.TimePeriod in project sldeditor by robward-scisys.
the class FieldConfigTimePeriod method undoAction.
/**
* Undo action.
*
* @param undoRedoObject the undo/redo object
*/
@Override
public void undoAction(UndoInterface undoRedoObject) {
if (undoRedoObject != null) {
if (undoRedoObject.getOldValue() instanceof TimePeriod) {
TimePeriod oldValue = (TimePeriod) undoRedoObject.getOldValue();
populateDuration(start, oldValue.getStart());
populateDuration(end, oldValue.getEnd());
}
}
}
use of com.sldeditor.filter.v2.function.temporal.TimePeriod in project sldeditor by robward-scisys.
the class FieldConfigTimePeriod method setTestValue.
/**
* Sets the test value.
*
* @param fieldId the field id
* @param testValue the test value
*/
@Override
public void setTestValue(FieldIdEnum fieldId, String testValue) {
if (testValue != null) {
TimePeriod period = new TimePeriod();
period.decode(testValue);
populateField(period);
valueUpdated();
}
}
use of com.sldeditor.filter.v2.function.temporal.TimePeriod in project sldeditor by robward-scisys.
the class FieldConfigTimePeriod method populateExpression.
/**
* Populate expression.
*
* @param objValue the obj value
*/
/*
* (non-Javadoc)
*
* @see com.sldeditor.ui.detail.config.FieldConfigBase#populateExpression(java.lang.Object)
*/
@Override
public void populateExpression(Object objValue) {
TimePeriod timePeriod = new TimePeriod();
if (objValue instanceof String) {
timePeriod.decode((String) objValue);
} else if (objValue instanceof DefaultPeriod) {
timePeriod.decode((DefaultPeriod) objValue);
}
populateField(timePeriod);
}
Aggregations