2023-09-21 20:55:14 +03:00
|
|
|
package SapforTestingSystem.SapforTask;
|
2023-09-17 22:13:42 +03:00
|
|
|
import Common.Current;
|
|
|
|
|
import Common.UI.StatusEnum;
|
|
|
|
|
import Common.UI.Themes.VisualiserFonts;
|
|
|
|
|
|
|
|
|
|
import java.awt.*;
|
|
|
|
|
public enum MatchState implements StatusEnum {
|
|
|
|
|
Unknown,
|
|
|
|
|
Match,
|
|
|
|
|
NotMatch;
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
switch (this) {
|
|
|
|
|
case Unknown:
|
|
|
|
|
return "неизвестно";
|
|
|
|
|
case Match:
|
2023-11-06 22:20:18 +03:00
|
|
|
return "совпадений";
|
2023-09-17 22:13:42 +03:00
|
|
|
case NotMatch:
|
2023-11-06 22:20:18 +03:00
|
|
|
return "различий";
|
2023-09-17 22:13:42 +03:00
|
|
|
default:
|
|
|
|
|
return "?";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public Font getFont() {
|
|
|
|
|
switch (this) {
|
|
|
|
|
case Unknown:
|
|
|
|
|
return Current.getTheme().Fonts.get(VisualiserFonts.UnknownState);
|
|
|
|
|
case Match:
|
|
|
|
|
return Current.getTheme().Fonts.get(VisualiserFonts.GoodState);
|
|
|
|
|
case NotMatch:
|
|
|
|
|
return Current.getTheme().Fonts.get(VisualiserFonts.BadState);
|
|
|
|
|
default:
|
|
|
|
|
return StatusEnum.super.getFont();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|