package visualization.components;

import java.awt.Graphics2D;
import java.awt.geom.Area;

import visualization.VisualComponent;

import background.systemVariables.SimpleVariable;

public class SimpleValueComponent extends VisualComponent {

	public SimpleValueComponent(SimpleVariable var) {
		super(var);		
	}
	
	@Override
	public Area getBorder(Graphics2D g, Boolean draw) {
		return dizajn.getDesignBorder(g, draw, variable.isActive(), x, y, dizajn.vizWidth, dizajn.vizHeight);
	}
		
	@Override
	public Area getValueShape(Graphics2D g, Boolean draw) {		
		if (variable.initialized) {
		return dizajn.getDesignValueShape(g, draw, variable, x, y);
		} else return new Area();
	}
	
	@Override
	public Area getNameShape(Graphics2D g, Boolean draw) {
        return dizajn.getDesignNameShape(g, draw, variable.name, x, y, dizajn.vizWidth, dizajn.vizHeight);
	}


}
