Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable resize event on custom calendar event, is it possible?

Tags:

vaadin

I have problem with vaadin calendar add on.

Is it possible to create custom calendar event which will have disabled resize and drag event?

like image 476
dundomaroje Avatar asked Jun 01 '13 17:06

dundomaroje


1 Answers

I am not sure ,But try it . In ScheduleView.java File

Find cal.setDropHandler(new DropHandler() {

and replace that with following

 cal.setDropHandler(new DropHandler() {
            return false;
          }

        public AcceptCriterion getAcceptCriterion() {
            return AcceptAll.get();
        }

    });

same as for BasicEventMoveHandler

 cal.setHandler(new BasicEventMoveHandler() {
            @Override
            public void eventMove(MoveEvent event) {
                  return false;
                }
            }

            protected void setDates(MovieEvent event, Date start, Date end) {
                event.start = start;
                event.end = end;
            }
        });

Same For BasicEventResizeHandler

cal.setHandler(new BasicEventResizeHandler() {
            @Override
            public void eventResize(EventResize event) {
                   return false;
            }
        });

To run

Run the Maven install target and deploy the resulting WAR-file to your server.

like image 193
HybrisHelp Avatar answered Nov 19 '22 23:11

HybrisHelp