View unanswered posts | View active topics It is currently Wed May 24, 2017 5:15 am

Reply to topic  [ 2 posts ] 
 How can I recognize the end of a actitity change? 
Author Message

Joined: Wed Jul 11, 2012 6:20 pm
Posts: 1
Post How can I recognize the end of a actitity change?

I have the problem to find out when the change (move,change of starttime/ endtime, ) of a activity is ready.

When I use a ActivityInteractionListener, I cannot find out the end of user action only the beginning.
I would like to store the changed data to database.

  private class ActivityInteractionListener implements InteractionListener {
        public void interactionOccured(InteractionEvent e) {
            final Object o = e.getInteractor().getInteracted();

            System.out.println("CMD: " +e.getCommand().getValue());
            if (o instanceof ActivityView && e.getSourceEvent() instanceof MouseEvent) {
                final ActivityView actView = (ActivityView) o;
                final DefaultDateArea dateArea = (DefaultDateArea) actView.getContainer();

                JPopupMenu pop = new JPopupMenu();
                final Point p = ((MouseEvent) e.getSourceEvent()).getPoint();
                Object commandValue = e.getCommand().getValue();
                if (DefaultDateArea.AE_POPUP_TRIGGER.equals(commandValue)) {
                    boolean hasTime = actView.getModel().getBaseDateRange().getHasTime();
                    String menuText = hasTime ? "Make All Day Event" : "Make Regular Event";
                    pop.add(menuText).addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            Activity act = ((ActivityView) o).getModel();
                            MutableDateRange dr = act.getDateRangeClone();

                            try {
                            } catch (PropertyVetoException e1) {


          , p.x, p.y);


Thank you for the helb.

Greetings olaf

Wed Jul 11, 2012 6:36 pm
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: How can I recognize the end of a actitity change?
Hello Olaf,

Please submit a support ticket from

Wed Jul 11, 2012 6:41 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.