/ftr-gwt-demo/src/main/java/eu/future/earth/gwt/client/date/DefaultWholeDayField.java

http://ftr-gwt-library.googlecode.com/ · Java · 53 lines · 25 code · 12 blank · 16 comment · 2 complexity · 26a6392d1fe796fccf61a8557d8a0028 MD5 · raw file

  1. /*
  2. * Copyright 2007 Future Earth, info@future-earth.eu
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy of
  6. * the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations under
  14. * the License.
  15. */
  16. package eu.future.earth.gwt.client.date;
  17. import java.util.Calendar;
  18. import java.util.GregorianCalendar;
  19. import eu.future.earth.gwt.client.DemoCss;
  20. public class DefaultWholeDayField extends AbstractWholeDayField<DefaultEventData> {
  21. public DefaultWholeDayField(DateRenderer<DefaultEventData> renderer, DefaultEventData data) {
  22. super(renderer, data);
  23. helper.setTime(data.getStartTime());
  24. if (helper.get(Calendar.DAY_OF_WEEK) == Calendar.MONDAY) {
  25. super.setEventStyleName(DemoCss.EVENT_HEADER_MONDAY);
  26. }
  27. setTitle(data.getData());
  28. }
  29. public int getContentHeight() {
  30. return contentHeight;
  31. }
  32. private int contentHeight = 15;
  33. public void setContentHeight(int contentHeight) {
  34. this.contentHeight = contentHeight;
  35. }
  36. GregorianCalendar helper = new GregorianCalendar();
  37. @Override
  38. public void repaintTime() {
  39. // TODO Auto-generated method stub
  40. }
  41. }