Example usage for javax.swing JLayer setLayerEventMask

List of usage examples for javax.swing JLayer setLayerEventMask

Introduction

In this page you can find the example usage for javax.swing JLayer setLayerEventMask.

Prototype

public void setLayerEventMask(long layerEventMask) 

Source Link

Document

Enables the events from JLayer and all its descendants defined by the specified event mask parameter to be delivered to the LayerUI#eventDispatched(AWTEvent,JLayer) method.

Usage

From source file:Diva.java

@Override
public void installUI(JComponent c) {
    super.installUI(c);
    JLayer jlayer = (JLayer) c;
    jlayer.setLayerEventMask(AWTEvent.MOUSE_EVENT_MASK | AWTEvent.MOUSE_MOTION_EVENT_MASK);
}

From source file:Diva.java

@Override
public void uninstallUI(JComponent c) {
    JLayer jlayer = (JLayer) c;
    jlayer.setLayerEventMask(0);
    super.uninstallUI(c);
}