package _VisualDVM.ProjectData.SapforData.Arrays.UI;
import Common.MainModule_;
import Common.Visual.Fonts.VisualiserFonts;
import Common.Visual.Tables.EditorDBObject;
import _VisualDVM.Global;
import _VisualDVM.ProjectData.SapforData.Arrays.Templates.TemplateDimension;

import javax.swing.*;
public class DimensionStateChanger extends EditorDBObject<TemplateDimension> {
    @Override
    public Object getCellEditorValue() {
        return value;
    }
    @Override
    public void InitValue(JTable table, Object value_in, int row, int column) {
        value = (TemplateDimension) value_in;
    }
    @Override
    public void Action() {
        setFont(MainModule_.instance.getUI().getTheme().Fonts.get(VisualiserFonts.Hyperlink));
        value.SwitchState();
        setText(value.state.getMaskDescription());
        Global.mainModule.getUI().getVersionsWindow().getVariantsWindow().ShowFilteredVariantsCount();
    }
}
