Home » tomahawk-1.1.6-src » org.apache.myfaces » custom » schedule » [javadoc | source]

    1   /*
    2    * Licensed to the Apache Software Foundation (ASF) under one
    3    * or more contributor license agreements.  See the NOTICE file
    4    * distributed with this work for additional information
    5    * regarding copyright ownership.  The ASF licenses this file
    6    * to you under the Apache License, Version 2.0 (the
    7    * "License"); you may not use this file except in compliance
    8    * with the License.  You may obtain a copy of the License at
    9    *
   10    *   http://www.apache.org/licenses/LICENSE-2.0
   11    *
   12    * Unless required by applicable law or agreed to in writing,
   13    * software distributed under the License is distributed on an
   14    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   15    * KIND, either express or implied.  See the License for the
   16    * specific language governing permissions and limitations
   17    * under the License.
   18    */
   19   
   20   package org.apache.myfaces.custom.schedule;
   21   
   22   import java.io.Serializable;
   23   
   24   import javax.faces.application.Application;
   25   import javax.faces.component.UIComponent;
   26   import javax.faces.context.FacesContext;
   27   import javax.faces.el.MethodBinding;
   28   import javax.faces.event.ActionEvent;
   29   import javax.faces.webapp.UIComponentTag;
   30   
   31   /**
   32    * <p>
   33    * JSP tag for the schedule component
   34    * </p>
   35    *
   36    * @author Jurgen Lust (latest modification by $Author: jlust $)
   37    * @version $Revision: 392301 $
   38    */
   39   public class ScheduleTag extends UIComponentTag implements Serializable 
   40   {
   41       private static final long serialVersionUID = -5226785969160327763L;
   42       
   43       //~ Instance fields --------------------------------------------------------
   44   
   45       private String action;
   46       private String actionListener;
   47       private String backgroundClass;
   48       private String columnClass;
   49       private String compactMonthRowHeight;
   50       private String compactWeekRowHeight;
   51       private String contentClass;
   52       private String dateClass;
   53       private String dayClass;
   54       private String detailedRowHeight;
   55       private String entryClass;
   56       private String entryRenderer;
   57       private String evenClass;
   58       private String foregroundClass;
   59       private String freeClass;
   60       private String gutterClass;
   61       private String headerClass;
   62       private String headerDateFormat;
   63       private String holidayClass;
   64       private String hoursClass;
   65       private String immediate;
   66       private String inactiveDayClass;
   67       private String minutesClass;
   68       private String monthClass;
   69       private String mouseListener;
   70       private String readonly;
   71       private String rendered;
   72       private String selectedClass;
   73       private String selectedEntryClass;
   74       private String submitOnClick;
   75       private String subtitleClass;
   76       private String textClass;
   77       private String theme;
   78       private String titleClass;
   79       private String tooltip;
   80       private String unevenClass;
   81       private String value;
   82       private String visibleEndHour;
   83       private String visibleStartHour;
   84       private String weekClass;
   85       private String workingEndHour;
   86       private String workingStartHour;
   87       private String renderZeroLengthEntries;
   88       private String expandToFitEntries;
   89   
   90       //~ Methods ----------------------------------------------------------------
   91   
   92       private void addAttribute(final Application app, final UIComponent component,
   93               final String key, final String value)
   94       {
   95           if ((key != null) && (value != null))
   96           {
   97               if (isValueReference(value))
   98               {
   99                   component.setValueBinding(key, app
  100                           .createValueBinding((String) value));
  101               }
  102               else
  103               {
  104                   component.getAttributes().put(key, value);
  105               }
  106           }
  107       }
  108   
  109       /**
  110        * <p>
  111        * The action of the JSF component
  112        * </p>
  113        *
  114        * @return Returns the action.
  115        */
  116       public String getAction()
  117       {
  118           return action;
  119       }
  120   
  121       /**
  122        * <p>
  123        * The actionlistener of the JSF component
  124        * </p>
  125        *
  126        * @return Returns the actionListener.
  127        */
  128       public String getActionListener()
  129       {
  130           return actionListener;
  131       }
  132   
  133       public String getBackgroundClass()
  134       {
  135           return backgroundClass;
  136       }
  137   
  138       public String getColumnClass()
  139       {
  140           return columnClass;
  141       }
  142   
  143       /**
  144        * <p>
  145        * The height in pixels of a cell in the compact month view
  146        * </p>
  147        *
  148        * @return Returns the compactMonthRowHeight.
  149        */
  150       public String getCompactMonthRowHeight()
  151       {
  152           return compactMonthRowHeight;
  153       }
  154   
  155       /**
  156        * <p>
  157        * The height in pixels of a cell in the compact week view
  158        * </p>
  159        *
  160        * @return Returns the compactWeekRowHeight.
  161        */
  162       public String getCompactWeekRowHeight()
  163       {
  164           return compactWeekRowHeight;
  165       }
  166   
  167       /**
  168        * @see javax.faces.webapp.UIComponentTag#getComponentType()
  169        */
  170       public String getComponentType()
  171       {
  172           return HtmlSchedule.COMPONENT_TYPE;
  173       }
  174   
  175       public String getContentClass()
  176       {
  177           return contentClass;
  178       }
  179   
  180       public String getDateClass()
  181       {
  182           return dateClass;
  183       }
  184   
  185       public String getDayClass()
  186       {
  187           return dayClass;
  188       }
  189   
  190       /**
  191        * The height in pixels of a cell in the detailed day view
  192        * 
  193        * @return the detailedRowHeight
  194        */
  195       public String getDetailedRowHeight()
  196       {
  197           return detailedRowHeight;
  198       }
  199   
  200       public String getEntryClass()
  201       {
  202           return entryClass;
  203       }
  204   
  205       public String getEntryRenderer()
  206       {
  207           return entryRenderer;
  208       }
  209   
  210       public String getEvenClass()
  211       {
  212           return evenClass;
  213       }
  214   
  215       public String getForegroundClass()
  216       {
  217           return foregroundClass;
  218       }
  219   
  220       public String getFreeClass()
  221       {
  222           return freeClass;
  223       }
  224   
  225       public String getGutterClass()
  226       {
  227           return gutterClass;
  228       }
  229   
  230       public String getHeaderClass()
  231       {
  232           return headerClass;
  233       }
  234   
  235       /**
  236        * <p>
  237        * The dateformat used in the header
  238        * </p>
  239        *
  240        * @return Returns the headerDateFormat.
  241        */
  242       public String getHeaderDateFormat()
  243       {
  244           return headerDateFormat;
  245       }
  246   
  247       public String getHolidayClass()
  248       {
  249           return holidayClass;
  250       }
  251   
  252       public String getHoursClass()
  253       {
  254           return hoursClass;
  255       }
  256   
  257       /**
  258        * <p>
  259        * The immediate property of the JSF component
  260        * </p>
  261        *
  262        * @return Returns the immediate.
  263        */
  264       public String getImmediate()
  265       {
  266           return immediate;
  267       }
  268   
  269       public String getInactiveDayClass()
  270       {
  271           return inactiveDayClass;
  272       }
  273   
  274       public String getMinutesClass()
  275       {
  276           return minutesClass;
  277       }
  278   
  279       public String getMonthClass()
  280       {
  281           return monthClass;
  282       }
  283   
  284       public String getMouseListener()
  285       {
  286           return mouseListener;
  287       }
  288   
  289       /**
  290        * <p>
  291        * The readonly property of the JSF component
  292        * </p>
  293        *
  294        * @return Returns the readonly.
  295        */
  296       public String getReadonly()
  297       {
  298           return readonly;
  299       }
  300   
  301       /**
  302        * <p>
  303        * Should this component be rendered?
  304        * </p>
  305        *
  306        * @return Returns the rendered.
  307        */
  308       public String getRendered()
  309       {
  310           return rendered;
  311       }
  312   
  313       /**
  314        * @see javax.faces.webapp.UIComponentTag#getRendererType()
  315        */
  316       public String getRendererType()
  317       {
  318           return UISchedule.DEFAULT_RENDERER_TYPE;
  319       }
  320   
  321       public String getSelectedClass()
  322       {
  323           return selectedClass;
  324       }
  325   
  326       public String getSelectedEntryClass()
  327       {
  328           return selectedEntryClass;
  329       }
  330   
  331       /**
  332        * <p>
  333        * Should the parent form of this schedule be submitted when the user
  334        * clicks on a day? Note that this will only work when the readonly
  335        * property is set to false.
  336        * </p>
  337        *
  338        * @return submit the form on mouse click
  339        */
  340       public String getSubmitOnClick()
  341       {
  342           return submitOnClick;
  343       }
  344   
  345       public String getSubtitleClass()
  346       {
  347           return subtitleClass;
  348       }
  349   
  350       public String getTextClass()
  351       {
  352           return textClass;
  353       }
  354   
  355       /**
  356        * <p>
  357        * The theme of the schedule component. This is the name of the
  358        * CSS file that should be loaded when rendering the schedule.
  359        * Possible values are 'default', 'outlookxp', 'evolution'.
  360        * </p>
  361        * 
  362        * @return Returns the theme.
  363        */
  364       public String getTheme()
  365       {
  366           return theme;
  367       }
  368   
  369       public String getTitleClass()
  370       {
  371           return titleClass;
  372       }
  373   
  374       /**
  375        * <p>
  376        * Should tooltips be displayed?
  377        * </p>
  378        *
  379        * @return Returns the tooltip.
  380        */
  381       public String getTooltip()
  382       {
  383           return tooltip;
  384       }
  385   
  386       public String getUnevenClass()
  387       {
  388           return unevenClass;
  389       }
  390   
  391       /**
  392        * <p>
  393        * The value of the JSF component
  394        * </p>
  395        *
  396        * @return Returns the value.
  397        */
  398       public String getValue()
  399       {
  400           return value;
  401       }
  402   
  403       /**
  404        * <p>
  405        * The visible end hour of the schedule
  406        * </p>
  407        *
  408        * @return Returns the visibleEndHour.
  409        */
  410       public String getVisibleEndHour()
  411       {
  412           return visibleEndHour;
  413       }
  414   
  415       /**
  416        * <p>
  417        * The visible start hour of the schedule
  418        * </p>
  419        *
  420        * @return Returns the visibleStartHour.
  421        */
  422       public String getVisibleStartHour()
  423       {
  424           return visibleStartHour;
  425       }
  426   
  427       public String getWeekClass()
  428       {
  429           return weekClass;
  430       }
  431   
  432       /**
  433        * <p>
  434        * The working end hour of the schedule
  435        * </p>
  436        *
  437        * @return Returns the workingEndHour.
  438        */
  439       public String getWorkingEndHour()
  440       {
  441           return workingEndHour;
  442       }
  443   
  444       /**
  445        * <p>
  446        * The working start hour of the schedule
  447        * </p>
  448        *
  449        * @return Returns the workingStartHour.
  450        */
  451       public String getWorkingStartHour()
  452       {
  453           return workingStartHour;
  454       }
  455   
  456       /**
  457        * @see javax.servlet.jsp.tagext.Tag#release()
  458        */
  459       public void release()
  460       {
  461           super.release();
  462           visibleStartHour = null; 
  463           visibleEndHour = null; 
  464           workingStartHour = null; 
  465           workingEndHour = null; 
  466           headerDateFormat = null; 
  467           value = null;
  468           immediate = null;
  469           actionListener = null;
  470           action = null;
  471           readonly = null;
  472           submitOnClick = null;
  473           mouseListener = null;
  474           theme = null;
  475           tooltip = null;
  476           rendered = null;
  477           compactMonthRowHeight = null;
  478           compactWeekRowHeight = null;
  479           detailedRowHeight = null;
  480   
  481           columnClass = null;
  482           backgroundClass = null;
  483           freeClass = null;
  484           evenClass = null;
  485           unevenClass = null;
  486           gutterClass = null;
  487           headerClass = null;
  488           dateClass = null;
  489           holidayClass = null;
  490           hoursClass = null;
  491           minutesClass = null;
  492           selectedEntryClass = null;
  493           textClass = null;
  494           titleClass = null;
  495           subtitleClass = null;
  496           entryClass = null;
  497           foregroundClass = null;
  498   
  499           dayClass = null;
  500           inactiveDayClass = null;
  501           contentClass = null;
  502           selectedClass = null;
  503           monthClass = null;
  504           weekClass = null;
  505   
  506           entryRenderer = null;
  507       }
  508   
  509       /**
  510        * <p>
  511        * The action of the JSF component
  512        * </p>
  513        *
  514        * @param action The action to set.
  515        */
  516       public void setAction(String action)
  517       {
  518           this.action = action;
  519       }
  520   
  521       /**
  522        * <p>
  523        * The actionlistener of the JSF component
  524        * </p>
  525        *
  526        * @param actionListener The actionListener to set.
  527        */
  528       public void setActionListener(String actionListener)
  529       {
  530           this.actionListener = actionListener;
  531       }
  532   
  533       public void setBackgroundClass(String backgroundClass)
  534       {
  535           this.backgroundClass = backgroundClass;
  536       }
  537   
  538       public void setColumnClass(String columnClass)
  539       {
  540           this.columnClass = columnClass;
  541       }
  542   
  543       /**
  544        * <p>
  545        * The height in pixels of a cell in the compact month view
  546        * </p>
  547        *
  548        * @param compactMonthRowHeight The compactMonthRowHeight to set.
  549        */
  550       public void setCompactMonthRowHeight(String compactMonthRowHeight)
  551       {
  552           this.compactMonthRowHeight = compactMonthRowHeight;
  553       }
  554   
  555       /**
  556        * <p>
  557        * The height in pixels of a cell in the compact week view
  558        * </p>
  559        *
  560        * @param compactWeekRowHeight The compactWeekRowHeight to set.
  561        */
  562       public void setCompactWeekRowHeight(String compactWeekRowHeight)
  563       {
  564           this.compactWeekRowHeight = compactWeekRowHeight;
  565       }
  566   
  567       public void setContentClass(String contentClass)
  568       {
  569           this.contentClass = contentClass;
  570       }
  571   
  572       public void setDateClass(String dateClass)
  573       {
  574           this.dateClass = dateClass;
  575       }
  576   
  577       public void setDayClass(String dayClass)
  578       {
  579           this.dayClass = dayClass;
  580       }
  581   
  582       /**
  583        * The height in pixels of a cell in the detailed day view
  584        * 
  585        * @param detailedRowHeight the detailedRowHeight
  586        */
  587       public void setDetailedRowHeight(String detailedRowHeight)
  588       {
  589           this.detailedRowHeight = detailedRowHeight;
  590       }
  591   
  592       public void setEntryClass(String entryClass)
  593       {
  594           this.entryClass = entryClass;
  595       }
  596   
  597       public void setEntryRenderer(String entryRenderer)
  598       {
  599           this.entryRenderer = entryRenderer;
  600       }
  601   
  602       public void setEvenClass(String evenClass)
  603       {
  604           this.evenClass = evenClass;
  605       }
  606   
  607       public void setForegroundClass(String foregroundClass)
  608       {
  609           this.foregroundClass = foregroundClass;
  610       }
  611   
  612       public void setFreeClass(String freeClass)
  613       {
  614           this.freeClass = freeClass;
  615       }
  616   
  617       public void setGutterClass(String gutterClass)
  618       {
  619           this.gutterClass = gutterClass;
  620       }
  621   
  622       public void setHeaderClass(String headerClass)
  623       {
  624           this.headerClass = headerClass;
  625       }
  626   
  627       /**
  628        * <p>
  629        * The dateformat used in the header
  630        * </p>
  631        *
  632        * @param headerDateFormat The headerDateFormat to set.
  633        */
  634       public void setHeaderDateFormat(String headerDateFormat)
  635       {
  636           this.headerDateFormat = headerDateFormat;
  637       }
  638   
  639       public void setHolidayClass(String holidayClass)
  640       {
  641           this.holidayClass = holidayClass;
  642       }
  643   
  644       public void setHoursClass(String hoursClass)
  645       {
  646           this.hoursClass = hoursClass;
  647       }
  648   
  649       /**
  650        * <p>
  651        * The immediate property of the JSF component
  652        * </p>
  653        *
  654        * @param immediate The immediate to set.
  655        */
  656       public void setImmediate(String immediate)
  657       {
  658           this.immediate = immediate;
  659       }
  660   
  661       public void setInactiveDayClass(String inactiveDayClass)
  662       {
  663           this.inactiveDayClass = inactiveDayClass;
  664       }
  665   
  666       public void setMinutesClass(String minutesClass)
  667       {
  668           this.minutesClass = minutesClass;
  669       }
  670   
  671       public void setMonthClass(String monthClass)
  672       {
  673           this.monthClass = monthClass;
  674       }
  675   
  676       public void setMouseListener(String mouseListener)
  677       {
  678           this.mouseListener = mouseListener;
  679       }
  680   
  681       /**
  682        * @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
  683        */
  684       protected void setProperties(UIComponent component)
  685       {
  686           super.setProperties(component);
  687   
  688           HtmlSchedule schedule = (HtmlSchedule) component;
  689           FacesContext context = FacesContext.getCurrentInstance();
  690           Application app = context.getApplication();
  691   
  692           if (rendered != null)
  693           {
  694               if (isValueReference(rendered))
  695               {
  696                   schedule.setValueBinding("rendered", app
  697                           .createValueBinding(rendered));
  698               }
  699               else
  700               {
  701                   schedule.setRendered(Boolean.valueOf(rendered).booleanValue());
  702               }
  703           }
  704   
  705           if (visibleStartHour != null)
  706           {
  707               if (isValueReference(visibleStartHour))
  708               {
  709                   schedule.setValueBinding("visibleStartHour", app
  710                           .createValueBinding(visibleStartHour));
  711               }
  712               else
  713               {
  714                   schedule.setVisibleStartHour(Integer.valueOf(visibleStartHour)
  715                           .intValue());
  716               }
  717           }
  718   
  719           if (visibleEndHour != null)
  720           {
  721               if (isValueReference(visibleEndHour))
  722               {
  723                   schedule.setValueBinding("visibleEndHour", app
  724                           .createValueBinding(visibleEndHour));
  725               }
  726               else
  727               {
  728                   schedule.setVisibleEndHour(Integer.valueOf(visibleEndHour)
  729                           .intValue());
  730               }
  731           }
  732   
  733           if (workingStartHour != null)
  734           {
  735               if (isValueReference(workingStartHour))
  736               {
  737                   schedule.setValueBinding("workingStartHour", app
  738                           .createValueBinding(workingStartHour));
  739               }
  740               else
  741               {
  742                   schedule.setWorkingStartHour(Integer.valueOf(workingStartHour)
  743                           .intValue());
  744               }
  745           }
  746   
  747           if (workingEndHour != null)
  748           {
  749               if (isValueReference(workingEndHour))
  750               {
  751                   schedule.setValueBinding("workingEndHour", app
  752                           .createValueBinding(workingEndHour));
  753               }
  754               else
  755               {
  756                   schedule.setWorkingEndHour(Integer.valueOf(workingEndHour)
  757                           .intValue());
  758               }
  759           }
  760   
  761           if (immediate != null)
  762           {
  763               if (isValueReference(immediate))
  764               {
  765                   schedule.setValueBinding("immediate", app
  766                           .createValueBinding(immediate));
  767               }
  768               else
  769               {
  770                   schedule
  771                           .setImmediate(Boolean.valueOf(immediate).booleanValue());
  772               }
  773           }
  774   
  775           if (readonly != null)
  776           {
  777               if (isValueReference(readonly))
  778               {
  779                   schedule.setValueBinding("readonly", app
  780                           .createValueBinding(readonly));
  781               }
  782               else
  783               {
  784                   schedule.setReadonly(Boolean.valueOf(readonly).booleanValue());
  785               }
  786           }
  787   
  788           if (submitOnClick != null)
  789           {
  790               if (isValueReference(submitOnClick))
  791               {
  792                   schedule.setValueBinding("submitOnClick", app
  793                           .createValueBinding(submitOnClick));
  794               }
  795               else
  796               {
  797                   schedule.setSubmitOnClick(Boolean.valueOf(submitOnClick)
  798                           .booleanValue());
  799               }
  800           }
  801   
  802           if (mouseListener != null)
  803           {
  804               if (isValueReference(mouseListener))
  805               {
  806                   MethodBinding mouseListenerBinding = app
  807                           .createMethodBinding(mouseListener,
  808                                   new Class[] { ScheduleMouseEvent.class });
  809                   schedule.setMouseListener(mouseListenerBinding);
  810               }
  811               else
  812               {
  813                   throw new IllegalArgumentException(
  814                           "mouseListener property must be a method-binding expression.");
  815               }
  816           }
  817   
  818           if (actionListener != null)
  819           {
  820               if (isValueReference(actionListener))
  821               {
  822                   MethodBinding actionListenerBinding = app.createMethodBinding(
  823                           actionListener, new Class[] { ActionEvent.class });
  824                   schedule.setActionListener(actionListenerBinding);
  825               }
  826               else
  827               {
  828                   throw new IllegalArgumentException(
  829                           "actionListener property must be a method-binding expression.");
  830               }
  831           }
  832   
  833           if (action != null)
  834           {
  835               if (isValueReference(action))
  836               {
  837                   MethodBinding actionBinding = app.createMethodBinding(action,
  838                           null);
  839                   schedule.setAction(actionBinding);
  840               }
  841               else
  842               {
  843                   throw new IllegalArgumentException(
  844                           "action property must be a method-binding expression.");
  845               }
  846           }
  847   
  848           if ((value != null) && isValueReference(value))
  849           {
  850               schedule.setValueBinding("value", app.createValueBinding(value));
  851           }
  852           else
  853           {
  854               throw new IllegalArgumentException(
  855                       "The value property must be a value binding expression that points to a SimpleScheduleModel object.");
  856           }
  857           
  858           if (entryRenderer != null && isValueReference(entryRenderer))
  859           {
  860               schedule.setValueBinding("entryRenderer", app.createValueBinding(entryRenderer));
  861           }
  862           else if (entryRenderer != null)
  863           {
  864               throw new IllegalArgumentException("The entryRenderer property must be a value binding expression that point to a ScheduleEntryRenderer instance");
  865           }
  866   
  867           addAttribute(app, schedule, "headerDateFormat", headerDateFormat);
  868           addAttribute(app, schedule, "theme", theme);
  869           addAttribute(app, schedule, "tooltip", tooltip);
  870           addAttribute(app, schedule, "compactWeekRowHeight",
  871                   compactWeekRowHeight);
  872           addAttribute(app, schedule, "compactMonthRowHeight",
  873                   compactMonthRowHeight);
  874           addAttribute(app, schedule, "detailedRowHeight", detailedRowHeight);
  875           addAttribute(app, schedule, "column", columnClass);
  876           addAttribute(app, schedule, "background", backgroundClass);
  877           addAttribute(app, schedule, "free", freeClass);
  878           addAttribute(app, schedule, "even", evenClass);
  879           addAttribute(app, schedule, "uneven", unevenClass);
  880           addAttribute(app, schedule, "gutter", gutterClass);
  881           addAttribute(app, schedule, "header", headerClass);
  882           addAttribute(app, schedule, "date", dateClass);
  883           addAttribute(app, schedule, "holiday", holidayClass);
  884           addAttribute(app, schedule, "hours", hoursClass);
  885           addAttribute(app, schedule, "minutes", minutesClass);
  886           addAttribute(app, schedule, "entry-selected", selectedEntryClass);
  887           addAttribute(app, schedule, "text", textClass);
  888           addAttribute(app, schedule, "title", titleClass);
  889           addAttribute(app, schedule, "subtitle", subtitleClass);
  890           addAttribute(app, schedule, "entry", entryClass);
  891           addAttribute(app, schedule, "foreground", foregroundClass);
  892   
  893           addAttribute(app, schedule, "day", dayClass);
  894           addAttribute(app, schedule, "inactive-day", inactiveDayClass);
  895           addAttribute(app, schedule, "content", contentClass);
  896           addAttribute(app, schedule, "selected", selectedClass);
  897           addAttribute(app, schedule, "month", monthClass);
  898           addAttribute(app, schedule, "week", weekClass);
  899           
  900           addAttribute(app, schedule, "renderZeroLengthEntries", renderZeroLengthEntries);
  901           addAttribute(app, schedule, "expandToFitEntries", expandToFitEntries);
  902       }
  903   
  904       /**
  905        * <p>
  906        * The readonly property of the JSF component
  907        * </p>
  908        *
  909        * @param readonly The readonly to set.
  910        */
  911       public void setReadonly(String readonly)
  912       {
  913           this.readonly = readonly;
  914       }
  915   
  916       /**
  917        * <p>
  918        * Should this component be rendered?
  919        * </p>
  920        *
  921        * @param rendered The rendered to set.
  922        */
  923       public void setRendered(String rendered)
  924       {
  925           this.rendered = rendered;
  926       }
  927   
  928       public void setSelectedClass(String selectedClass)
  929       {
  930           this.selectedClass = selectedClass;
  931       }
  932   
  933       public void setSelectedEntryClass(String selectedEntryClass)
  934       {
  935           this.selectedEntryClass = selectedEntryClass;
  936       }
  937   
  938       /**
  939        * <p>
  940        * Should the parent form of this schedule be submitted when the user
  941        * clicks on a day? Note that this will only work when the readonly
  942        * property is set to false.
  943        * </p>
  944        *
  945        * @param submitOnClick submit the form on mouse click
  946        */
  947       public void setSubmitOnClick(String submitOnClick)
  948       {
  949           this.submitOnClick = submitOnClick;
  950       }
  951   
  952       public void setSubtitleClass(String subtitleClass)
  953       {
  954           this.subtitleClass = subtitleClass;
  955       }
  956   
  957       public void setTextClass(String textClass)
  958       {
  959           this.textClass = textClass;
  960       }
  961   
  962       /**
  963        * <p>
  964        * The theme of the schedule component. This is the name of the
  965        * CSS file that should be loaded when rendering the schedule.
  966        * Possible values are 'default', 'outlookxp', 'evolution'.
  967        * </p>
  968        * 
  969        * @param theme The theme to set.
  970        */
  971       public void setTheme(String theme)
  972       {
  973           this.theme = theme;
  974       }
  975   
  976       public void setTitleClass(String titleClass)
  977       {
  978           this.titleClass = titleClass;
  979       }
  980   
  981       /**
  982        * <p>
  983        * Should tooltips be displayed?
  984        * </p>
  985        *
  986        * @param tooltip The tooltip to set.
  987        */
  988       public void setTooltip(String tooltip)
  989       {
  990           this.tooltip = tooltip;
  991       }
  992   
  993       public void setUnevenClass(String unevenClass)
  994       {
  995           this.unevenClass = unevenClass;
  996       }
  997   
  998       /**
  999        * <p>
 1000        * The value of the JSF component
 1001        * </p>
 1002        *
 1003        * @param value The value to set.
 1004        */
 1005       public void setValue(String value)
 1006       {
 1007           this.value = value;
 1008       }
 1009   
 1010       /**
 1011        * <p>
 1012        * The visible end hour of the schedule
 1013        * </p>
 1014        *
 1015        * @param visibleEndHour The visibleEndHour to set.
 1016        */
 1017       public void setVisibleEndHour(String visibleEndHour)
 1018       {
 1019           this.visibleEndHour = visibleEndHour;
 1020       }
 1021   
 1022       /**
 1023        * <p>
 1024        * The visible start hour of the schedule
 1025        * </p>
 1026        *
 1027        * @param visibleStartHour The visibleStartHour to set.
 1028        */
 1029       public void setVisibleStartHour(String visibleStartHour)
 1030       {
 1031           this.visibleStartHour = visibleStartHour;
 1032       }
 1033   
 1034       public void setWeekClass(String weekClass)
 1035       {
 1036           this.weekClass = weekClass;
 1037       }
 1038   
 1039       /**
 1040        * <p>
 1041        * The working end hour of the schedule
 1042        * </p>
 1043        *
 1044        * @param workingEndHour The workingEndHour to set.
 1045        */
 1046       public void setWorkingEndHour(String workingEndHour)
 1047       {
 1048           this.workingEndHour = workingEndHour;
 1049       }
 1050   
 1051       /**
 1052        * <p>
 1053        * The working start hour of the schedule
 1054        * </p>
 1055        *
 1056        * @param workingStartHour The workingStartHour to set.
 1057        */
 1058       public void setWorkingStartHour(String workingStartHour)
 1059       {
 1060           this.workingStartHour = workingStartHour;
 1061       }
 1062   
 1063       /**
 1064        * <p>
 1065        * When the start- and endtime of an entry are the same, should the entry
 1066        * be rendered, fitting the entry box to the text? 
 1067        * </p>
 1068        * 
 1069        * @return rendered or not
 1070        */
 1071       public String getRenderZeroLengthEntries()
 1072       {
 1073           return renderZeroLengthEntries;
 1074       }
 1075   
 1076       /**
 1077        * <p>
 1078        * When the start- and endtime of an entry are the same, should the entry
 1079        * be rendered, fitting the entry box to the text? 
 1080        * </p>
 1081        * 
 1082        * @param render
 1083        */
 1084       public void setRenderZeroLengthEntries(String render)
 1085       {
 1086           this.renderZeroLengthEntries = render;
 1087       }
 1088   
 1089       /**
 1090        * <p>
 1091        * By default, if an appointment exists outside the
 1092        * visibleStartHour/visibleEndHour limits, it does not appear in the day
 1093        * or workweek modes. This setting checks for events outside
 1094        * the visible range and extends the visible range to display the events.
 1095        * If events only occur within the visible range, then no adjustment is made.
 1096        * </p>
 1097        * 
 1098        * @return Returns the expandToFitEntries.
 1099        */
 1100       public String getExpandToFitEntries()
 1101       {
 1102           return expandToFitEntries;
 1103       }
 1104   
 1105       /**
 1106        * <p>
 1107        * By default, if an appointment exists outside the
 1108        * visibleStartHour/visibleEndHour limits, it does not appear in the day
 1109        * or workweek modes. This setting checks for events outside
 1110        * the visible range and extends the visible range to display the events.
 1111        * If events only occur within the visible range, then no adjustment is made.
 1112        * </p>
 1113        * 
 1114        * @param expandToFitEntries The expandToFitEntries to set.
 1115        */
 1116       public void setExpandToFitEntries(String expandToFitEntries)
 1117       {
 1118           this.expandToFitEntries = expandToFitEntries;
 1119       }
 1120   
 1121   }
 1122   //The End

Home » tomahawk-1.1.6-src » org.apache.myfaces » custom » schedule » [javadoc | source]