001package org.gwtbootstrap3.extras.fullcalendar.client.ui; 002 003/* 004 * #%L 005 * GwtBootstrap3 006 * %% 007 * Copyright (C) 2013 - 2014 GwtBootstrap3 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023import com.google.gwt.core.client.JavaScriptObject; 024 025/** 026 * @author Jeff Isenhart 027 * @see http://arshaw.com/fullcalendar/docs/text/buttonText/ 028 */ 029public class ButtonText implements IsJavaScriptObject { 030 031 private JavaScriptObject text; 032 033 public ButtonText() { 034 newInstance(); 035 } 036 037 private native void newInstance() /*-{ 038 //default vals... 039 var theInstance = this; 040 theInstance.@org.gwtbootstrap3.extras.fullcalendar.client.ui.ButtonText::text = {}; 041 theInstance.@org.gwtbootstrap3.extras.fullcalendar.client.ui.ButtonText::text.buttonText = 042 { 043 today: 'today', 044 month: 'month', 045 week: 'week', 046 day: 'day' 047 }; 048 }-*/; 049 050 public native void setToday(String today) /*-{ 051 var theInstance = this; 052 theInstance.@org.gwtbootstrap3.extras.fullcalendar.client.ui.ButtonText::text.buttonText.today = today; 053 }-*/; 054 055 public native void setMonth(String month) /*-{ 056 var theInstance = this; 057 theInstance.@org.gwtbootstrap3.extras.fullcalendar.client.ui.ButtonText::text.buttonText.month = month; 058 }-*/; 059 060 public native void setWeek(String week) /*-{ 061 var theInstance = this; 062 theInstance.@org.gwtbootstrap3.extras.fullcalendar.client.ui.ButtonText::text.buttonText.week = week; 063 }-*/; 064 065 public native void setDay(String day) /*-{ 066 var theInstance = this; 067 theInstance.@org.gwtbootstrap3.extras.fullcalendar.client.ui.ButtonText::text.buttonText.day = day; 068 }-*/; 069 070 @Override 071 public JavaScriptObject toJavaScript() { 072 return text; 073 } 074}