jaxx.runtime.swing
Class BlockingLayerUI2
java.lang.Object
javax.swing.plaf.ComponentUI
org.jdesktop.jxlayer.plaf.LayerUI<V>
org.jdesktop.jxlayer.plaf.AbstractLayerUI<JComponent>
jaxx.runtime.swing.BlockingLayerUI2
- All Implemented Interfaces:
- Serializable
public class BlockingLayerUI2
- extends org.jdesktop.jxlayer.plaf.AbstractLayerUI<JComponent>
A JXLayer ui implementation that permits to block a component but still
allow an action when clicking everywhere on the layer.
Moreover, an icon can be added on the right-top icon painted and changed
when the mouse is over the layer.
You can change the blocking and accepting icon.
To hook an click on the layer's icon, you can :
- Since:
- 1.3
- Author:
- tchemit
- See Also:
- Serialized Form
| Methods inherited from class org.jdesktop.jxlayer.plaf.AbstractLayerUI |
configureGraphics, eventDispatched, getClip, getComposite, getLayerEventMask, getRenderingHints, getTransform, handlePropertyChangeEvent, installUI, isDirty, paint, processFocusEvent, processMouseWheelEvent, uninstallUI |
| Methods inherited from class org.jdesktop.jxlayer.plaf.LayerUI |
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getPreferredScrollableViewportSize, getPropertyChangeListeners, getPropertyChangeListeners, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, removePropertyChangeListener, removePropertyChangeListener, updateUI |
CAN_CLICK_PROPERTY
public static final String CAN_CLICK_PROPERTY
- See Also:
- Constant Field Values
ACCEPT_ICON_PROPERTY
public static final String ACCEPT_ICON_PROPERTY
- See Also:
- Constant Field Values
BLOCK_ICON_PROPERTY
public static final String BLOCK_ICON_PROPERTY
- See Also:
- Constant Field Values
acceptAction
protected Action acceptAction
- Action to be treated when click on icon
blockIcon
protected BufferedImage blockIcon
- Icon when you can not click
acceptIcon
protected BufferedImage acceptIcon
- Icon when you can click
blockingColor
protected Color blockingColor
- Optinal color to put fill background when blocking
canClick
protected boolean canClick
- Internal state to known when we can accept click
BlockingLayerUI2
public BlockingLayerUI2()
setAcceptAction
public void setAcceptAction(Action acceptAction)
setAcceptIcon
public void setAcceptIcon(ImageIcon acceptIcon)
setBlockIcon
public void setBlockIcon(ImageIcon blockIcon)
setCanClick
public void setCanClick(boolean canClick)
setDirty
public void setDirty(boolean isDirty)
- Overrides:
setDirty in class org.jdesktop.jxlayer.plaf.AbstractLayerUI<JComponent>
setBlockingColor
public void setBlockingColor(Color blockingColor)
setBlockIcon
public void setBlockIcon(BufferedImage blockIcon)
getBlockIcon
public BufferedImage getBlockIcon()
getAcceptIcon
protected BufferedImage getAcceptIcon()
isCanClick
public boolean isCanClick()
clone
public BlockingLayerUI2 clone()
- Overrides:
clone in class Object
processKeyEvent
protected void processKeyEvent(KeyEvent e,
org.jdesktop.jxlayer.JXLayer<? extends JComponent> l)
- Overrides:
processKeyEvent in class org.jdesktop.jxlayer.plaf.AbstractLayerUI<JComponent>
processMouseMotionEvent
protected void processMouseMotionEvent(MouseEvent e,
org.jdesktop.jxlayer.JXLayer<? extends JComponent> l)
- Overrides:
processMouseMotionEvent in class org.jdesktop.jxlayer.plaf.AbstractLayerUI<JComponent>
processMouseEvent
protected void processMouseEvent(MouseEvent e,
org.jdesktop.jxlayer.JXLayer<? extends JComponent> l)
- Overrides:
processMouseEvent in class org.jdesktop.jxlayer.plaf.AbstractLayerUI<JComponent>
paintLayer
protected void paintLayer(Graphics2D g2,
org.jdesktop.jxlayer.JXLayer<? extends JComponent> l)
- Overrides:
paintLayer in class org.jdesktop.jxlayer.plaf.AbstractLayerUI<JComponent>
acceptEvent
protected void acceptEvent(MouseEvent e,
org.jdesktop.jxlayer.JXLayer<? extends JComponent> l)
getCurrentIcon
protected BufferedImage getCurrentIcon()
prepareIcon
protected BufferedImage prepareIcon(ImageIcon image)
updateCanClickState
protected void updateCanClickState(org.jdesktop.jxlayer.JXLayer<JComponent> l,
MouseEvent e)
Copyright © 2008-2011 CodeLutin. All Rights Reserved.