public class BlockingLayerUI extends LayerUI<JComponent>
setAcceptAction(Action)acceptEvent(MouseEvent, JLayer)| Modifier and Type | Field and Description |
|---|---|
static String |
ACCEPT_ICON_PROPERTY |
protected Action |
acceptAction
Action to be treated when click on icon
|
protected Set<String> |
acceptedComponentNames
Extra components names to accept even in block mode
|
protected Set<Class<?>> |
acceptedComponentTypes
Extra components types to accept even in block mode
|
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 and Description |
|---|
BlockingLayerUI() |
addPropertyChangeListener, addPropertyChangeListener, doLayout, eventDispatched, firePropertyChange, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, paintImmediately, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, removePropertyChangeListener, removePropertyChangeListener, updateUIcontains, createUI, getAccessibleChild, getAccessibleChildrenCount, updatepublic 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
protected final Set<String> acceptedComponentNames
public void setAcceptedComponentNames(String... acceptedComponentNames)
public void setAcceptedComponentTypes(Class<?>... acceptedComponentTypes)
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 dirty)
public void applyPropertyChange(PropertyChangeEvent evt, JLayer<? extends JComponent> l)
applyPropertyChange in class LayerUI<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()
protected void processKeyEvent(KeyEvent e, JLayer<? extends JComponent> l)
processKeyEvent in class LayerUI<JComponent>protected void processMouseMotionEvent(MouseEvent e, JLayer<? extends JComponent> l)
processMouseMotionEvent in class LayerUI<JComponent>protected void processMouseEvent(MouseEvent e, JLayer<? extends JComponent> l)
processMouseEvent in class LayerUI<JComponent>protected void processMouseWheelEvent(MouseWheelEvent e, JLayer<? extends JComponent> l)
processMouseWheelEvent in class LayerUI<JComponent>protected boolean acceptEventOrConsumeIt(InputEvent e)
public void paint(Graphics g, JComponent c)
paint in class LayerUI<JComponent>public void installUI(JComponent c)
installUI in class LayerUI<JComponent>public void uninstallUI(JComponent c)
uninstallUI in class LayerUI<JComponent>protected void acceptEvent(MouseEvent e, JLayer<? extends JComponent> l)
protected BufferedImage getCurrentIcon()
protected BufferedImage prepareIcon(ImageIcon image)
protected void updateCanClickState(JLayer<? extends JComponent> l, MouseEvent e)
Copyright © 2008–2015 CodeLutin. All rights reserved.