package _VisualDVM.ProjectData.SapforData.Arrays.UI;
import Common.Visual.UI_;
import Common.Visual.Tables.DBObjectEditor;
import Common.Visual.Fonts.VisualiserFonts;
import _VisualDVM.Visual.UI;
import _VisualDVM.ProjectData.SapforData.Arrays.Templates.TemplateDimension;

import javax.swing.*;
public class DimensionStateChanger extends DBObjectEditor<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(UI_.getTheme().Fonts.get(VisualiserFonts.Hyperlink));
        value.SwitchState();
        setText(value.state.getMaskDescription());
        UI.getVersionsWindow().getVariantsWindow().ShowFilteredVariantsCount();
    }
}
