Example usage for com.google.gwt.gdata.client.calendar CalendarService newInstance

List of usage examples for com.google.gwt.gdata.client.calendar CalendarService newInstance

Introduction

In this page you can find the example usage for com.google.gwt.gdata.client.calendar CalendarService newInstance.

Prototype

public static native CalendarService newInstance(String applicationName) ;

Source Link

Document

Constructs a Calendar service.

Usage

From source file:com.google.gwt.gdata.sample.hellogdata.client.CalendarCreateCalendarDemo.java

License:Apache License

/**
 * Starts this demo./*from  w w w .  ja  va2 s  . c o  m*/
 */
private void startDemo() {
    service = CalendarService.newInstance("HelloGData_Calendar_CreateCalendarDemo_v2.0");
    if (User.getStatus(scope) == AuthSubStatus.LOGGED_IN) {
        Button startButton = new Button("Create a calendar");
        startButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                createCalendar("http://www.google.com/calendar/feeds/default/" + "owncalendars/full");
            }
        });
        mainPanel.setWidget(0, 0, startButton);
    } else {
        showStatus("You are not logged on to Google Calendar.", true);
    }
}

From source file:com.google.gwt.gdata.sample.hellogdata.client.CalendarCreateEventReminderDemo.java

License:Apache License

/**
 * Starts this demo.// w w w. j av a2  s.co  m
 */
private void startDemo() {
    service = CalendarService.newInstance("HelloGData_Calendar_CreateEventReminderDemo_v2.0");
    if (User.getStatus(scope) == AuthSubStatus.LOGGED_IN) {
        Button startButton = new Button("Create an event reminder");
        startButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                createEvent("http://www.google.com/calendar/feeds/default/private/full");
            }
        });
        mainPanel.setWidget(0, 0, startButton);
    } else {
        showStatus("You are not logged on to Google Calendar.", true);
    }
}

From source file:com.google.gwt.gdata.sample.hellogdata.client.CalendarCreateEventWithExtendedPropertyDemo.java

License:Apache License

/**
 * Starts this demo./*from  w w  w.j  a va  2 s .  c om*/
 */
private void startDemo() {
    service = CalendarService.newInstance("HelloGData_Calendar_CreateEventWithExtendedPropertyDemo_v2.0");
    if (User.getStatus(scope) == AuthSubStatus.LOGGED_IN) {
        Button startButton = new Button("Create an event with an extended property");
        startButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                createEvent("http://www.google.com/calendar/feeds/default/private/full");
            }
        });
        mainPanel.setWidget(0, 0, startButton);
    } else {
        showStatus("You are not logged on to Google Calendar.", true);
    }
}

From source file:com.google.gwt.gdata.sample.hellogdata.client.CalendarCreateRecurringEventDemo.java

License:Apache License

/**
 * Starts this demo./*from w w w  . jav  a 2 s . co  m*/
 */
private void startDemo() {
    service = CalendarService.newInstance("HelloGData_Calendar_CreateRecurringEventDemo_v2.0");
    if (User.getStatus(scope) == AuthSubStatus.LOGGED_IN) {
        Button startButton = new Button("Create an event");
        startButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                createEvent("http://www.google.com/calendar/feeds/default/private/full");
            }
        });
        mainPanel.setWidget(0, 0, startButton);
    } else {
        showStatus("You are not logged on to Google Calendar.", true);
    }
}

From source file:com.google.gwt.gdata.sample.hellogdata.client.CalendarCreateSingleEventDemo.java

License:Apache License

/**
 * Starts this demo./*from  w w  w  .j av a  2s .  c  o  m*/
 */
private void startDemo() {
    service = CalendarService.newInstance("HelloGData_Calendar_CreateSingleEventDemo_v1.0");
    if (User.getStatus(scope) == AuthSubStatus.LOGGED_IN) {
        Button startButton = new Button("Create an event");
        startButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                createEvent("http://www.google.com/calendar/feeds/default/private/full");
            }
        });
        mainPanel.setWidget(0, 0, startButton);
    } else {
        showStatus("You are not logged on to Google Calendar.", true);
    }
}

From source file:com.google.gwt.gdata.sample.hellogdata.client.CalendarDeleteCalendarDemo.java

License:Apache License

/**
 * Starts this demo.//ww  w  .  j av  a2  s .  co  m
 */
private void startDemo() {
    service = CalendarService.newInstance("HelloGData_Calendar_DeleteCalendarDemo_v2.0");
    if (User.getStatus(scope) == AuthSubStatus.LOGGED_IN) {
        Button startButton = new Button("Delete a calendar");
        startButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                getCalendars("http://www.google.com/calendar/feeds/default/" + "owncalendars/full");
            }
        });
        mainPanel.setWidget(0, 0, startButton);
    } else {
        showStatus("You are not logged on to Google Calendar.", true);
    }
}

From source file:com.google.gwt.gdata.sample.hellogdata.client.CalendarDeleteEventDemo.java

License:Apache License

/**
 * Starts this demo.//  w ww.j  a va  2s  . c o  m
 */
private void startDemo() {
    service = CalendarService.newInstance("HelloGData_Calendar_DeleteEventDemo_v2.0");
    if (User.getStatus(scope) == AuthSubStatus.LOGGED_IN) {
        Button startButton = new Button("Delete an event");
        startButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                queryCalendars("http://www.google.com/calendar/feeds/default/private/full");
            }
        });
        mainPanel.setWidget(0, 0, startButton);
    } else {
        showStatus("You are not logged on to Google Calendar.", true);
    }
}

From source file:com.google.gwt.gdata.sample.hellogdata.client.CalendarQueryEventsByDateDemo.java

License:Apache License

/**
 * Starts this demo./*from  w  w w . ja  va2s  .c o  m*/
 */
private void startDemo() {
    service = CalendarService.newInstance("HelloGData_Calendar_QueryEventsByDateDemo_v2.0");
    if (User.getStatus(scope) == AuthSubStatus.LOGGED_IN) {
        queryEvents("http://www.google.com/calendar/feeds/default/private/full");
    } else {
        showStatus("You are not logged on to Google Calendar.", true);
    }
}

From source file:com.google.gwt.gdata.sample.hellogdata.client.CalendarQueryEventsFullTextDemo.java

License:Apache License

/**
 * Starts this demo.//from w w w .  j  ava  2s  . c om
 */
private void startDemo() {
    service = CalendarService.newInstance("HelloGData_Calendar_QueryEventsFullTextDemo_v2.0");
    if (User.getStatus(scope) == AuthSubStatus.LOGGED_IN) {
        queryEvents("http://www.google.com/calendar/feeds/default/private/full");
    } else {
        showStatus("You are not logged on to Google Calendar.", true);
    }
}

From source file:com.google.gwt.gdata.sample.hellogdata.client.CalendarRetrieveCalendarsDemo.java

License:Apache License

/**
 * Starts this demo.//from www  .  j a  va 2 s .co  m
 */
private void startDemo() {
    service = CalendarService.newInstance("HelloGData_Calendar_RetrieveCalendarsDemo_v2.0");
    if (User.getStatus(scope) == AuthSubStatus.LOGGED_IN) {
        getCalendars("http://www.google.com/calendar/feeds/default/allcalendars/full");
    } else {
        showStatus("You are not logged on to Google Calendar.", true);
    }
}