
package de.ivu.elect.jee.presentation.dynamicform;

import java.text.DateFormat;
import java.util.Locale;

public abstract class AbstractTimestampTimeProperty extends AbstractTemporalProperty {

  protected AbstractTimestampTimeProperty() {
    super();
  }

  @Override
  public PropertyType getDefaultType() {
    return PropertyType.INPUT_CALENDAR_TIME_ONLY;
  }

  @Override
  public boolean isShowTime() {
    return true;
  }

  @Override
  protected DateFormat createDateFormat(Locale locale) {
    // E.g. HH:mm (German) ELECT-3052 Sekunden entfernt
    int timeStyle = DateFormat.SHORT;

    return DateFormat.getTimeInstance(timeStyle, locale);
  }
}
