blob: 025e9bb40ed1f9e1201eca5b8a3c400c9b388d91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
package com.vaadin.event;
import java.lang.reflect.Method;
import com.vaadin.event.MouseEvents.ClickEvent;
import com.vaadin.terminal.gwt.client.MouseEventDetails;
import com.vaadin.tools.ReflectTools;
import com.vaadin.ui.Component;
public interface LayoutEvents {
public interface LayoutClickListener extends ComponentEventListener {
public static final Method clickMethod = ReflectTools.findMethod(
LayoutClickListener.class, "layoutClick",
LayoutClickEvent.class);
/**
* Layout has been clicked
*
* @param event
* Component click event.
*/
public void layoutClick(LayoutClickEvent event);
}
/**
* An event fired when the layout has been clicked. The event contains
* information about the target layout (component) and the child component
* that was clicked. If no child component was found it is set to null.
*
*/
public static class LayoutClickEvent extends ClickEvent {
private Component childComponent;
public LayoutClickEvent(Component source,
MouseEventDetails mouseEventDetails, Component childComponent) {
super(source, mouseEventDetails);
this.childComponent = childComponent;
}
public Component getChildComponent() {
return childComponent;
}
}
}
|