1 /* 2 Copyright aswing.org, see the LICENCE.txt. 3 */ 4 5 import org.aswing.geom.Rectangle; 6 import org.aswing.Component; 7 import org.aswing.Insets; 8 import org.aswing.graphices.Graphics; 9 10 /** 11 * Interface describing an object capable of rendering a border around the edges of a component. 12 * 13 * <p>Note that one Border most just can paint to one Component. 14 * Because the paintBorder method most should clear the last paintings. 15 * 16 * @author iiley 17 */ 18 interface org.aswing.border.Border{ 19 20 /** 21 * Paints the border on component in a bounds with the graphics. 22 * If this if the first time to paint on the specified component, there 23 * may need some install operation, for example create MCs on the 24 * specified mc if needed. 25 * @param c the component for which this border is being painted 26 * @param g the paint graphics 27 * @param bounds the bounds of border 28 * @see #uninstallBorder 29 */ 30 public function paintBorder(c:Component, g:Graphics, bounds:Rectangle):Void; 31 32 /** 33 * Removes things in the border object related to the component. 34 * For example remove the MCs created at the first paint time if needed. 35 * <p> 36 * There is not installIcon method, so you must install icon related things 37 * at the first time of <code>paintIcon</code>, for example for example attach a MC if needed. 38 * @param c the component where the border whould uninstall from 39 * @see #paintBorder 40 */ 41 public function uninstallBorder(c:Component):Void; 42 43 /** 44 * Returns the insets of the border. 45 * @param c the component for which this border insets value applies 46 * @param bounds the bounds of the border would paint in. 47 * @return the insets of the border 48 */ 49 public function getBorderInsets(c:Component, bounds:Rectangle):Insets; 50 } 51