@Override public void actionPerformed(ActionEvent e) { if (e.getSource() == left) { weeknum -= 1; gls.notifyListeners(ChangeType.PREVWEEK, null); } else if (e.getSource() == right) { weeknum += 1; gls.notifyListeners(ChangeType.NEXTWEEK, null); } else { ArrayList<Object> a = new ArrayList<Object>(); a.add(e.getSource()); gls.notifyListeners(ChangeType.APPBUTTON, a); } }
public void addGuiListener(GUIListener l) { gls.add(l); }