package _VisualDVM.ComponentsServer.Component;
import Common.Visual.Fonts.VisualiserFonts;
import Common.Visual.StatusEnum;
public enum ComponentState implements StatusEnum {
    Undefined,
    Actual,
    Needs_update,
    Not_found,
    Old_version,
    Needs_publish,
    Unknown_version;
    @Override
    public VisualiserFonts getFont() {
        switch (this) {
            case Actual:
                return VisualiserFonts.GoodState;
            case Not_found:
            case Unknown_version:
            case Old_version:
                return VisualiserFonts.BadState;
            case Needs_update:
                return VisualiserFonts.ProgressState;
            case Needs_publish:
                return VisualiserFonts.BlueState;
            default:
                return StatusEnum.super.getFont();
        }
    }
    public String getDescription() {
        switch (this) {
            case Actual:
                return "актуален";
            case Not_found:
                return "не найден";
            case Old_version:
                return "устаревшая версия";
            case Needs_update:
                return "найдено обновление";
            case Needs_publish:
                return "ожидает публикации";
            case Unknown_version:
                return "не удалось определить версию";
            default:
                return StatusEnum.super.getDescription();
        }
    }
}
