Author: tchemit Date: 2010-03-08 15:03:48 +0100 (Mon, 08 Mar 2010) New Revision: 1762 Log: reformat code Modified: trunk/jaxx-runtime/src/main/java/jaxx/runtime/swing/BlockingLayerUI.java Modified: trunk/jaxx-runtime/src/main/java/jaxx/runtime/swing/BlockingLayerUI.java =================================================================== --- trunk/jaxx-runtime/src/main/java/jaxx/runtime/swing/BlockingLayerUI.java 2010-03-07 18:09:19 UTC (rev 1761) +++ trunk/jaxx-runtime/src/main/java/jaxx/runtime/swing/BlockingLayerUI.java 2010-03-08 14:03:48 UTC (rev 1762) @@ -34,6 +34,7 @@ import javax.swing.ImageIcon; import javax.swing.JComponent; import org.jdesktop.jxlayer.JXLayer; +import org.jdesktop.jxlayer.plaf.AbstractLayerUI; /** * @@ -45,39 +46,45 @@ * To hook an click on the layer's icon, you can : * * <ul><li>pass an Action via method {@link #setAcceptAction(Action)}</li> - * <li>override the method {@link #acceptEvent(java.awt.event.MouseEvent, org.jdesktop.jxlayer.JXLayer)}</li> + * <li>override the method {@link #acceptEvent(MouseEvent, JXLayer)}</li> * </ul> * * @author tony * @since 1.2 */ -public class BlockingLayerUI extends org.jdesktop.jxlayer.plaf.AbstractLayerUI<JComponent> { +public class BlockingLayerUI extends AbstractLayerUI<JComponent> { public static final String CAN_CLICK_PROPERTY = "canClick"; public static final String ACCEPT_ICON_PROPERTY = "acceptIcon"; public static final String BLOCK_ICON_PROPERTY = "blockIcon"; public static final String BLOCK_PROPERTY = "block"; - private static final long serialVersionUID = 1L; +// private static final long serialVersionUID = 1L; + /** * Action to be treated when click on icon */ protected Action acceptAction; + /** * Icon when you can not click */ protected BufferedImage blockIcon; + /** * Icon when you can click */ protected BufferedImage acceptIcon; + /** * Optinal color to put fill background when blocking */ protected Color blockingColor; + /** * Internal state to known when we can accept click */ protected boolean canClick; + /** * A flag to enable or disable the use of the icon. * @@ -87,6 +94,7 @@ * By default, this is active. */ protected boolean useIcon = true; + /** * Internal state when should block event and paint layer */