public void addListener(String event, final String name, final GUIEventListener listener) throws GUIException {
if ("rightclick".equals(event)) {
table.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent me) {
if (me.isPopupTrigger() && message == null) {
listener.eventOccured(new GUIEvent(Table.this, name, me));
}
}
public void mouseReleased(MouseEvent me) {
mousePressed(me);
}
});
} else if (event.equals("doubleclick")) {
table.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent me) {
if (me.getClickCount() == 2 && message == null) {
listener.eventOccured(new GUIEvent(Table.this, name, me));
}
}
});
} else {
super.addListener(event, name, listener);