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

import javax.swing.*;
public class DimensionRenderer extends RendererCell<TemplateDimension> {
    @Override
    public TemplateDimension Init(JTable table, Object value_in, int row, int column) {
        return (TemplateDimension) value_in;
    }
    @Override
    public void Display() {
        if (value != null) {
            setText(value.state.getMaskDescription());
            setFont(value.isBlocked() ? MainModule_.instance.getUI().getTheme().Fonts.get(VisualiserFonts.Disabled) :
                    MainModule_.instance.getUI().getTheme().Fonts.get(VisualiserFonts.Hyperlink));
        }
    }
}
