Example usage for com.google.gwt.gdata.client.calendar ColorProperty VALUE_RGB_2952A3

List of usage examples for com.google.gwt.gdata.client.calendar ColorProperty VALUE_RGB_2952A3

Introduction

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

Prototype

String VALUE_RGB_2952A3

To view the source code for com.google.gwt.gdata.client.calendar ColorProperty VALUE_RGB_2952A3.

Click Source Link

Document

RGB value 2952A3.

Usage

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

License:Apache License

/**
 * Create a calendar by inserting a calendar entry into
 * a calendar feed.//from   w w  w .j  a  v a  2 s .c  om
 * Set the calendar's title to an arbitrary string. Here
 * we prefix the title with 'GWT-Calendar-Client' so that
 * we can identify which calendars were created by this demo.
 * We also specify values for summary, time zone, location
 * and color.
 * On success and failure, display a status message.
 * 
 * @param calendarsFeedUri The uri of the calendars feed into 
 * which to insert the new calendar entry
 */
private void createCalendar(String calendarsFeedUri) {
    CalendarEntry entry = CalendarEntry.newInstance();
    entry.setTitle(Text.newInstance());
    entry.getTitle().setText("GWT-Calendar-Client: insert calendar");
    entry.setSummary(Text.newInstance());
    entry.getSummary().setText("This is a test calendar created by GWT Client");
    entry.setTimeZone(TimeZoneProperty.newInstance());
    entry.getTimeZone().setValue("America/Los_Angeles");
    Where where = Where.newInstance();
    where.setLabel("Mountain View, CA");
    where.setValueString("Mountain View, CA");
    entry.addLocation(where);
    entry.setHidden(HiddenProperty.newInstance());
    entry.getHidden().setValue(false);
    entry.setColor(ColorProperty.newInstance());
    entry.getColor().setValue(ColorProperty.VALUE_RGB_2952A3);
    showStatus("Creating calendar...", false);
    service.insertEntry(calendarsFeedUri, entry, new CalendarEntryCallback() {
        public void onFailure(CallErrorException caught) {
            showStatus("An error occurred while retrieving the Calendar feed: " + caught.getMessage(), true);
        }

        public void onSuccess(CalendarEntry result) {
            showStatus("Created a Calendar entry titled '" + result.getTitle().getText() + "'", false);
        }
    });
}