protected IFigure createFigure() {
OutputFigure figure;
if (getModel() == null)
return null;
if (getModel() instanceof OrGate)
figure = new OrGateFigure();
else if (getModel() instanceof AndGate)
figure = new AndGateFigure();
else if (getModel() instanceof XORGate)
figure = new XOrGateFigure();
else