73 * <p>
74 * The default implementation paints the passed component as is.
75 *
76 * @param g the {@code Graphics} context in which to paint
77 * @param c the component being painted
78 */
79 public void paint(Graphics g, JComponent c) {
80 c.paint(g);
81 }
82
83 /**
84 * Processes {@code AWTEvent}s for {@code JLayer}
85 * and <b>all its descendants</b> to this {@code LayerUI} instance.
86 * <p>
87 * To enable the {@code AWTEvent}s of a particular type,
88 * you call {@link JLayer#setLayerEventMask}
89 * in {@link #installUI(javax.swing.JComponent)}
90 * and set the layer event mask to {@code 0}
91 * in {@link #uninstallUI(javax.swing.JComponent)} after that.
92 * By default this method calls the appropriate
93 * {@code process<event type>Event}
94 * method for the given class of event.
95 * <p>
96 * <b>Note:</b> Events are processed only for displayable {@code JLayer}s.
97 *
98 * @param e the event to be dispatched
99 * @param l the layer this LayerUI is set to
100 *
101 * @see JLayer#setLayerEventMask(long)
102 * @see Component#isDisplayable()
103 * @see #processComponentEvent
104 * @see #processFocusEvent
105 * @see #processKeyEvent
106 * @see #processMouseEvent
107 * @see #processMouseMotionEvent
108 * @see #processInputMethodEvent
109 * @see #processHierarchyEvent
110 * @see #processMouseWheelEvent
111 */
112 public void eventDispatched(AWTEvent e, JLayer<? extends V> l){
113 if (e instanceof FocusEvent) {
|
73 * <p>
74 * The default implementation paints the passed component as is.
75 *
76 * @param g the {@code Graphics} context in which to paint
77 * @param c the component being painted
78 */
79 public void paint(Graphics g, JComponent c) {
80 c.paint(g);
81 }
82
83 /**
84 * Processes {@code AWTEvent}s for {@code JLayer}
85 * and <b>all its descendants</b> to this {@code LayerUI} instance.
86 * <p>
87 * To enable the {@code AWTEvent}s of a particular type,
88 * you call {@link JLayer#setLayerEventMask}
89 * in {@link #installUI(javax.swing.JComponent)}
90 * and set the layer event mask to {@code 0}
91 * in {@link #uninstallUI(javax.swing.JComponent)} after that.
92 * By default this method calls the appropriate
93 * {@code process<event} {@code type>Event}
94 * method for the given class of event.
95 * <p>
96 * <b>Note:</b> Events are processed only for displayable {@code JLayer}s.
97 *
98 * @param e the event to be dispatched
99 * @param l the layer this LayerUI is set to
100 *
101 * @see JLayer#setLayerEventMask(long)
102 * @see Component#isDisplayable()
103 * @see #processComponentEvent
104 * @see #processFocusEvent
105 * @see #processKeyEvent
106 * @see #processMouseEvent
107 * @see #processMouseMotionEvent
108 * @see #processInputMethodEvent
109 * @see #processHierarchyEvent
110 * @see #processMouseWheelEvent
111 */
112 public void eventDispatched(AWTEvent e, JLayer<? extends V> l){
113 if (e instanceof FocusEvent) {
|