package ervu_business_metrics.component.chart.label;

import ervu_business_metrics.model.Font;
import ervu_business_metrics.model.chart.round.label.ChartLabelModel;

import ru.cg.webbpm.modules.database.api.dao.option.LoadOptions;
import ru.cg.webbpm.modules.standard_annotations.editor.ColorEditor;

/**
 * @author Vitaly Chekushkin
 */
public abstract class AbstractRoundLabelConfiguration implements RoundLabelConfiguration {

  public Font font;

  @ColorEditor
  public String color;

  @Override
  public ChartLabelModel getLabelModel(LoadOptions loadOptions) {
    return new ChartLabelModel(
        getLabel(loadOptions),
        color,
        font
    );
  }

  abstract protected String getLabel(LoadOptions loadOptions);
}
