Examples of ThemeAppointmentStyle


Examples of com.bradrydzewski.gwt.calendar.client.ThemeAppointmentStyle

    // Is MultiDay?
    boolean multiDay = appointment.isMultiDay() || appointment.isAllDay();


    //Lookup the style from the map
    ThemeAppointmentStyle style = getViewAppointmentStyleForTheme(appointment);

    //Determine Style Name
    String styleName = APPOINTMENT_STYLE;
    if(multiDay) styleName+=APPOINTMENT_STYLE_MULTIDAY;
    if(selected) styleName+=APPOINTMENT_STYLE_SELECTED;
    widget.setStylePrimaryName(styleName);

    //If no style is found, apply the default blue style
    //TODO: need to check for a custom style
    if(style==null)
      style =  getDefaultViewAppointmentStyleForTheme();


    if (multiDay)
      DOM.setStyleAttribute(elem, BACKGROUND_COLOR_STYLE_ATTRIBUTE, style.getBackgroundHeader());
    else
      DOM.setStyleAttribute(elem, BACKGROUND_COLOR_STYLE_ATTRIBUTE, style.getBackground());

    DOM.setStyleAttribute(elem, BORDER_COLOR_STYLE_ATTRIBUTE, style.getBackgroundHeader());

    DOM.setStyleAttribute(bodyElem, COLOR_STYLE_ATTRIBUTE, style.getSelectedBorder());

    DOM.setStyleAttribute(headerElem, COLOR_STYLE_ATTRIBUTE, style.getHeaderText());

    DOM.setStyleAttribute(headerElem, BACKGROUND_COLOR_STYLE_ATTRIBUTE,style.getBackgroundHeader());

    if (multiDay)
      return;

    if (selected && style.getSelectedBackgroundImage() != null) {
      DOM.setStyleAttribute(elem, BACKGROUND_IMAGE_STYLE_ATTRIBUTE, "url("+ style.getSelectedBackgroundImage() + ")");
    } else {
      DOM.setStyleAttribute(elem, BACKGROUND_IMAGE_STYLE_ATTRIBUTE, "none");
    }

  }
View Full Code Here

Examples of com.bradrydzewski.gwt.calendar.client.ThemeAppointmentStyle

        Element elem = widget.getElement();
        //Is MultiDay?
        boolean multiDay = appointment.isMultiDay() || appointment.isAllDay();

        //Lookup the style from the map
        ThemeAppointmentStyle style = getViewAppointmentStyleForTheme(appointment);

        //Determine Style Name
        String styleName = APPOINTMENT_STYLE;
        if (multiDay) styleName += APPOINTMENT_STYLE_MULTIDAY;
        if (selected) styleName += APPOINTMENT_STYLE_SELECTED;
        widget.setStylePrimaryName(styleName);

        //If no style is found, apply the default blue style
        //TODO: need to check for a custom style
        if (style == null)
            style = getDefaultViewAppointmentStyleForTheme();

        //Apply Single vs. Multi-day style
        if (multiDay) {

            DOM.setStyleAttribute(elem, BACKGROUND_COLOR_STYLE_ATTRIBUTE, style.getBackground());
            DOM.setStyleAttribute(elem, BORDER_COLOR_STYLE_ATTRIBUTE, style.getBorder());

        } else {

            DOM.setStyleAttribute(elem, COLOR_STYLE_ATTRIBUTE, style.getSelectedBorder());
        }

        //Apply style specific to selected appointments
        if (selected) {

            DOM.setStyleAttribute(elem, BORDER_COLOR_STYLE_ATTRIBUTE, style.getSelectedBorder());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.