|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.plaf.ComponentUI
org.jdesktop.jxlayer.plaf.LayerUI<V>
org.jdesktop.jxlayer.plaf.AbstractLayerUI<JComponent>
jaxx.runtime.swing.BlockingLayerUI
public class BlockingLayerUI
A JXLayer ui implementation that permits to block a component but still allow an action when clicking on the right-top icon painted on the layer. You can change the blocking and accepting icon. To hook an click on the layer's icon, you can :
setAcceptAction(Action)acceptEvent(java.awt.event.MouseEvent, org.jdesktop.jxlayer.JXLayer)
| Field Summary | |
|---|---|
static String |
ACCEPT_ICON_PROPERTY
|
protected Action |
acceptAction
Action to be treated when click on icon |
protected BufferedImage |
acceptIcon
Icon when you can click |
protected boolean |
block
Internal state when should block event and paint layer |
static String |
BLOCK_ICON_PROPERTY
|
static String |
BLOCK_PROPERTY
|
protected BufferedImage |
blockIcon
Icon when you can not click |
protected Color |
blockingColor
Optinal color to put fill background when blocking |
static String |
CAN_CLICK_PROPERTY
|
protected boolean |
canClick
Internal state to known when we can accept click |
protected boolean |
useIcon
A flag to enable or disable the use of the icon. |
| Constructor Summary | |
|---|---|
BlockingLayerUI()
|
|
| Method Summary | |
|---|---|
protected void |
acceptEvent(MouseEvent e,
org.jdesktop.jxlayer.JXLayer<JComponent> l)
|
BlockingLayerUI |
clone()
|
protected BufferedImage |
getAcceptIcon()
|
BufferedImage |
getBlockIcon()
|
protected BufferedImage |
getCurrentIcon()
|
boolean |
isCanClick()
|
protected void |
paintLayer(Graphics2D g2,
org.jdesktop.jxlayer.JXLayer<JComponent> l)
|
protected BufferedImage |
prepareIcon(ImageIcon image)
|
protected void |
processKeyEvent(KeyEvent e,
org.jdesktop.jxlayer.JXLayer<JComponent> l)
|
protected void |
processMouseEvent(MouseEvent e,
org.jdesktop.jxlayer.JXLayer<JComponent> l)
|
protected void |
processMouseMotionEvent(MouseEvent e,
org.jdesktop.jxlayer.JXLayer<JComponent> l)
|
void |
setAcceptAction(Action acceptAction)
|
void |
setAcceptIcon(ImageIcon acceptIcon)
|
void |
setBlock(boolean block)
|
void |
setBlockIcon(BufferedImage blockIcon)
|
void |
setBlockIcon(ImageIcon blockIcon)
|
void |
setBlockingColor(Color blockingColor)
|
void |
setCanClick(boolean canClick)
|
void |
setDirty(boolean isDirty)
|
void |
setUseIcon(boolean useIcon)
|
protected void |
updateCanClickState(org.jdesktop.jxlayer.JXLayer<JComponent> l,
MouseEvent e)
|
| Methods inherited from class org.jdesktop.jxlayer.plaf.AbstractLayerUI |
|---|
addLayerItemListener, addPropertyChangeListener, addPropertyChangeListener, configureGraphics, eventDispatched, fireLayerItemChanged, fireLayerItemChanged, firePropertyChange, getClip, getComposite, getLayerEventMask, getLayerItemListeners, getPropertyChangeListeners, getPropertyChangeListeners, getRenderingHints, getTransform, installUI, isAWTEventListenerEnabled, isDirty, isEnabled, paint, processFocusEvent, processMouseWheelEvent, registerAWTEventListener, removeLayerItemListener, removePropertyChangeListener, removePropertyChangeListener, setEnabled, setLayerEventMask, uninstallUI, unregisterAWTEventListener |
| Methods inherited from class org.jdesktop.jxlayer.plaf.LayerUI |
|---|
getAccessibleChild, getAccessibleChildrenCount, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, isEventEnabled, update, updateUI |
| Methods inherited from class javax.swing.plaf.ComponentUI |
|---|
contains, createUI, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CAN_CLICK_PROPERTY
public static final String ACCEPT_ICON_PROPERTY
public static final String BLOCK_ICON_PROPERTY
public static final String BLOCK_PROPERTY
protected Action acceptAction
protected BufferedImage blockIcon
protected BufferedImage acceptIcon
protected Color blockingColor
protected boolean canClick
protected boolean useIcon
protected boolean block
| Constructor Detail |
|---|
public BlockingLayerUI()
| Method Detail |
|---|
public void setAcceptAction(Action acceptAction)
public void setAcceptIcon(ImageIcon acceptIcon)
public void setBlockIcon(ImageIcon blockIcon)
public void setCanClick(boolean canClick)
public void setBlock(boolean block)
public void setDirty(boolean isDirty)
setDirty in class org.jdesktop.jxlayer.plaf.AbstractLayerUI<JComponent>public void setBlockIcon(BufferedImage blockIcon)
public void setBlockingColor(Color blockingColor)
public BufferedImage getBlockIcon()
protected BufferedImage getAcceptIcon()
public boolean isCanClick()
public void setUseIcon(boolean useIcon)
public BlockingLayerUI clone()
clone in class Object
protected void processKeyEvent(KeyEvent e,
org.jdesktop.jxlayer.JXLayer<JComponent> l)
processKeyEvent in class org.jdesktop.jxlayer.plaf.AbstractLayerUI<JComponent>
protected void processMouseMotionEvent(MouseEvent e,
org.jdesktop.jxlayer.JXLayer<JComponent> l)
processMouseMotionEvent in class org.jdesktop.jxlayer.plaf.AbstractLayerUI<JComponent>
protected void processMouseEvent(MouseEvent e,
org.jdesktop.jxlayer.JXLayer<JComponent> l)
processMouseEvent in class org.jdesktop.jxlayer.plaf.AbstractLayerUI<JComponent>
protected void paintLayer(Graphics2D g2,
org.jdesktop.jxlayer.JXLayer<JComponent> l)
paintLayer in class org.jdesktop.jxlayer.plaf.AbstractLayerUI<JComponent>
protected void acceptEvent(MouseEvent e,
org.jdesktop.jxlayer.JXLayer<JComponent> l)
protected BufferedImage getCurrentIcon()
protected BufferedImage prepareIcon(ImageIcon image)
protected void updateCanClickState(org.jdesktop.jxlayer.JXLayer<JComponent> l,
MouseEvent e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||