package eu.greenlightning.nsdg.elements;

import java.awt.Graphics2D;

public interface Element {

	int getWidth(Graphics2D g);
	int getHeight(Graphics2D g);
	void paint(Graphics2D g, int width, int height);

}

@@ -68,94 +68,1632 @@
 D;%0A%0A
-public interface Element %7B%0A%0A%09int getWidth(Graphics2D g);%0A%09int getHeight(Graphics2D g);
+/**%0A * An element of a Nassi-Shneiderman diagram.%0A * %3Cp%3E%0A * The element provides its width and height and can paint itself. Potential children must be laid out%0A * correctly, included in the width and height calculation and painted with the element.%0A */%0Apublic interface Element %7B%0A%0A%09/**%0A%09 * Calculates the minimum and preferred width of this element.%0A%09 * %3Cp%3E%0A%09 * If possible it should be painted at this width, but it might be enlarged to align with other elements.%0A%09 * Attempts to paint it at a smaller width might result in unspecified behavior and / or erroneous%0A%09 * painting.%0A%09 * %3Cp%3E%0A%09 * A %7B@link Graphics2D%7D object must be passed to this method to provide information about the context in%0A%09 * which it will be painted.%0A%09 * %0A%09 * @param g the %7B@link Graphics2D%7D object which will be used to paint this element%0A%09 */%0A%09int getWidth(Graphics2D g);%0A%0A%09/**%0A%09 * Calculates the minimum and preferred height of this element.%0A%09 * %3Cp%3E%0A%09 * If possible it should be painted at this height, but it might be enlarged to align with other elements.%0A%09 * Attempts to paint it at a smaller height might result in unspecified behavior and / or erroneous%0A%09 * painting.%0A%09 * %3Cp%3E%0A%09 * A %7B@link Graphics2D%7D object must be passed to this method to provide information about the context in%0A%09 * which it will be painted.%0A%09 * %0A%09 * @param g the %7B@link Graphics2D%7D object which will be used to paint this element%0A%09 */%0A%09int getHeight(Graphics2D g);%0A%0A%09/**%0A%09 * Paint this element in the given size. Note that the size must be at least as big as specified by%0A%09 * %7B@link #getWidth(Graphics2D)%7D and %7B@link #getHeight(Graphics2D)%7D to assure correct painting.%0A%09 */
 %0A%09vo

Comment Element.