package model.shapes; import javax.swing.*; import java.awt.*; /** * Null shape. * * @author Mathias Ricken */ public class NullShape implements IShape { /** * Create the factory that can create this kind of IShape. * @return factory to create this IShape */ public AShapeFactory makeFactory() { return new AShapeFactory(getClass().getName()) { // initializer block { setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); add(new JLabel("No settings.")); } /** * Create the IShape that matches the current parameters. * @return IShape */ public IShape makeShape() { return new NullShape(); }; }; } /** * Paint this shape. * @param g graphics object */ public void paint(Graphics g) { // nothing to do } }