You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2006/08/01 19:44:01 UTC
svn commit: r427657 [28/42] - in /myfaces:
core/trunk/api/src/main/java/javax/faces/component/
core/trunk/api/src/test/java/javax/faces/
core/trunk/api/src/test/java/javax/faces/application/
core/trunk/api/src/test/java/javax/faces/component/ core/trun...
Modified: myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleExampleHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleExampleHandler.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleExampleHandler.java (original)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleExampleHandler.java Tue Aug 1 10:43:28 2006
@@ -1,153 +1,153 @@
-/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.myfaces.examples.schedule;
-
-import java.io.Serializable;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-
-import javax.faces.event.ActionEvent;
-
-import org.apache.commons.lang.RandomStringUtils;
-import org.apache.myfaces.custom.schedule.model.DefaultScheduleEntry;
-import org.apache.myfaces.custom.schedule.model.ScheduleModel;
-import org.apache.myfaces.custom.schedule.model.SimpleScheduleModel;
-
-/**
- * Handler class for the schedule example
- *
- * @author Jurgen Lust (latest modification by $Author$)
- * @version $Revision$
- */
-public class ScheduleExampleHandler implements Serializable
-{
- private static final long serialVersionUID = -8815771399735333108L;
-
- private ScheduleModel model;
-
- public ScheduleModel getModel()
- {
- return model;
- }
-
- public void setModel(ScheduleModel model)
- {
- this.model = model;
- }
-
- public void deleteSelectedEntry(ActionEvent event)
- {
- if (model == null)
- return;
- model.removeSelectedEntry();
- }
-
- public void addSampleHoliday(ActionEvent event)
- {
- if (model instanceof SimpleScheduleModel)
- {
- SimpleScheduleModel ssm = (SimpleScheduleModel) model;
- Calendar calendar = GregorianCalendar.getInstance();
- calendar.setTime(ssm.getSelectedDate());
- calendar.set(Calendar.DAY_OF_WEEK, Calendar.THURSDAY);
- ssm.setHoliday(calendar.getTime(), "Poeperkesdag");
- ssm.refresh();
- }
- }
-
- public void addSampleEntries(ActionEvent event)
- {
- if (model == null)
- return;
- Calendar calendar = GregorianCalendar.getInstance();
- calendar.setTime(model.getSelectedDate());
- calendar.set(Calendar.DAY_OF_WEEK, Calendar.TUESDAY);
- calendar.set(Calendar.HOUR_OF_DAY, 14);
- DefaultScheduleEntry entry1 = new DefaultScheduleEntry();
- // every entry in a schedule must have a unique id
- entry1.setId(RandomStringUtils.randomNumeric(32));
- entry1.setStartTime(calendar.getTime());
- calendar.add(Calendar.MINUTE, 45);
- entry1.setEndTime(calendar.getTime());
- entry1.setTitle("Test MyFaces schedule component");
- entry1.setSubtitle("my office");
- entry1
- .setDescription("We need to get this thing out of the sandbox ASAP");
- model.addEntry(entry1);
- DefaultScheduleEntry entry2 = new DefaultScheduleEntry();
- entry2.setId(RandomStringUtils.randomNumeric(32));
- // entry2 overlaps entry1
- calendar.add(Calendar.MINUTE, -20);
- entry2.setStartTime(calendar.getTime());
- calendar.add(Calendar.HOUR, 2);
- entry2.setEndTime(calendar.getTime());
- entry2.setTitle("Show schedule component to boss");
- entry2.setSubtitle("my office");
- entry2.setDescription("Convince him to get time to thoroughly test it");
- model.addEntry(entry2);
- DefaultScheduleEntry entry3 = new DefaultScheduleEntry();
- entry3.setId(RandomStringUtils.randomNumeric(32));
- calendar.add(Calendar.DATE, 1);
- calendar.set(Calendar.HOUR_OF_DAY, 9);
- calendar.set(Calendar.MINUTE, 0);
- calendar.set(Calendar.SECOND, 0);
- entry3.setStartTime(calendar.getTime());
- calendar.set(Calendar.HOUR_OF_DAY, 17);
- entry3.setEndTime(calendar.getTime());
- entry3.setTitle("Thoroughly test schedule component");
- model.addEntry(entry3);
- DefaultScheduleEntry entry4 = new DefaultScheduleEntry();
- entry4.setId(RandomStringUtils.randomNumeric(32));
- calendar.add(Calendar.MONTH, -1);
- calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
- calendar.set(Calendar.HOUR_OF_DAY, 11);
- entry4.setStartTime(calendar.getTime());
- calendar.set(Calendar.HOUR_OF_DAY, 14);
- entry4.setEndTime(calendar.getTime());
- entry4.setTitle("Long lunch");
- model.addEntry(entry4);
- DefaultScheduleEntry entry5 = new DefaultScheduleEntry();
- entry5.setId(RandomStringUtils.randomNumeric(32));
- calendar.add(Calendar.MONTH, 2);
- calendar.set(Calendar.DAY_OF_MONTH, 1);
- calendar.set(Calendar.HOUR_OF_DAY, 1);
- entry5.setStartTime(calendar.getTime());
- calendar.set(Calendar.HOUR_OF_DAY, 5);
- entry5.setEndTime(calendar.getTime());
- entry5.setTitle("Fishing trip");
- model.addEntry(entry5);
- //Let's add a zero length entry...
- DefaultScheduleEntry entry6 = new DefaultScheduleEntry();
- calendar.setTime(model.getSelectedDate());
- calendar.set(Calendar.DAY_OF_WEEK, Calendar.FRIDAY);
- calendar.set(Calendar.HOUR_OF_DAY, 16);
- entry6.setId(RandomStringUtils.randomNumeric(32));
- entry6.setStartTime(calendar.getTime());
- entry6.setEndTime(calendar.getTime());
- entry6.setTitle("Zero length entry");
- entry6.setDescription("Is only rendered when the 'renderZeroLengthEntries' attribute is 'true'");
- model.addEntry(entry6);
- //And also an allday event
- DefaultScheduleEntry entry7 = new DefaultScheduleEntry();
- entry7.setId(RandomStringUtils.randomNumeric(32));
- entry7.setTitle("All day event");
- entry7.setSubtitle("This event renders as an all-day event");
- entry7.setAllDay(true);
- model.addEntry(entry7);
- model.refresh();
- }
-}
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.myfaces.examples.schedule;
+
+import java.io.Serializable;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+
+import javax.faces.event.ActionEvent;
+
+import org.apache.commons.lang.RandomStringUtils;
+import org.apache.myfaces.custom.schedule.model.DefaultScheduleEntry;
+import org.apache.myfaces.custom.schedule.model.ScheduleModel;
+import org.apache.myfaces.custom.schedule.model.SimpleScheduleModel;
+
+/**
+ * Handler class for the schedule example
+ *
+ * @author Jurgen Lust (latest modification by $Author$)
+ * @version $Revision$
+ */
+public class ScheduleExampleHandler implements Serializable
+{
+ private static final long serialVersionUID = -8815771399735333108L;
+
+ private ScheduleModel model;
+
+ public ScheduleModel getModel()
+ {
+ return model;
+ }
+
+ public void setModel(ScheduleModel model)
+ {
+ this.model = model;
+ }
+
+ public void deleteSelectedEntry(ActionEvent event)
+ {
+ if (model == null)
+ return;
+ model.removeSelectedEntry();
+ }
+
+ public void addSampleHoliday(ActionEvent event)
+ {
+ if (model instanceof SimpleScheduleModel)
+ {
+ SimpleScheduleModel ssm = (SimpleScheduleModel) model;
+ Calendar calendar = GregorianCalendar.getInstance();
+ calendar.setTime(ssm.getSelectedDate());
+ calendar.set(Calendar.DAY_OF_WEEK, Calendar.THURSDAY);
+ ssm.setHoliday(calendar.getTime(), "Poeperkesdag");
+ ssm.refresh();
+ }
+ }
+
+ public void addSampleEntries(ActionEvent event)
+ {
+ if (model == null)
+ return;
+ Calendar calendar = GregorianCalendar.getInstance();
+ calendar.setTime(model.getSelectedDate());
+ calendar.set(Calendar.DAY_OF_WEEK, Calendar.TUESDAY);
+ calendar.set(Calendar.HOUR_OF_DAY, 14);
+ DefaultScheduleEntry entry1 = new DefaultScheduleEntry();
+ // every entry in a schedule must have a unique id
+ entry1.setId(RandomStringUtils.randomNumeric(32));
+ entry1.setStartTime(calendar.getTime());
+ calendar.add(Calendar.MINUTE, 45);
+ entry1.setEndTime(calendar.getTime());
+ entry1.setTitle("Test MyFaces schedule component");
+ entry1.setSubtitle("my office");
+ entry1
+ .setDescription("We need to get this thing out of the sandbox ASAP");
+ model.addEntry(entry1);
+ DefaultScheduleEntry entry2 = new DefaultScheduleEntry();
+ entry2.setId(RandomStringUtils.randomNumeric(32));
+ // entry2 overlaps entry1
+ calendar.add(Calendar.MINUTE, -20);
+ entry2.setStartTime(calendar.getTime());
+ calendar.add(Calendar.HOUR, 2);
+ entry2.setEndTime(calendar.getTime());
+ entry2.setTitle("Show schedule component to boss");
+ entry2.setSubtitle("my office");
+ entry2.setDescription("Convince him to get time to thoroughly test it");
+ model.addEntry(entry2);
+ DefaultScheduleEntry entry3 = new DefaultScheduleEntry();
+ entry3.setId(RandomStringUtils.randomNumeric(32));
+ calendar.add(Calendar.DATE, 1);
+ calendar.set(Calendar.HOUR_OF_DAY, 9);
+ calendar.set(Calendar.MINUTE, 0);
+ calendar.set(Calendar.SECOND, 0);
+ entry3.setStartTime(calendar.getTime());
+ calendar.set(Calendar.HOUR_OF_DAY, 17);
+ entry3.setEndTime(calendar.getTime());
+ entry3.setTitle("Thoroughly test schedule component");
+ model.addEntry(entry3);
+ DefaultScheduleEntry entry4 = new DefaultScheduleEntry();
+ entry4.setId(RandomStringUtils.randomNumeric(32));
+ calendar.add(Calendar.MONTH, -1);
+ calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
+ calendar.set(Calendar.HOUR_OF_DAY, 11);
+ entry4.setStartTime(calendar.getTime());
+ calendar.set(Calendar.HOUR_OF_DAY, 14);
+ entry4.setEndTime(calendar.getTime());
+ entry4.setTitle("Long lunch");
+ model.addEntry(entry4);
+ DefaultScheduleEntry entry5 = new DefaultScheduleEntry();
+ entry5.setId(RandomStringUtils.randomNumeric(32));
+ calendar.add(Calendar.MONTH, 2);
+ calendar.set(Calendar.DAY_OF_MONTH, 1);
+ calendar.set(Calendar.HOUR_OF_DAY, 1);
+ entry5.setStartTime(calendar.getTime());
+ calendar.set(Calendar.HOUR_OF_DAY, 5);
+ entry5.setEndTime(calendar.getTime());
+ entry5.setTitle("Fishing trip");
+ model.addEntry(entry5);
+ //Let's add a zero length entry...
+ DefaultScheduleEntry entry6 = new DefaultScheduleEntry();
+ calendar.setTime(model.getSelectedDate());
+ calendar.set(Calendar.DAY_OF_WEEK, Calendar.FRIDAY);
+ calendar.set(Calendar.HOUR_OF_DAY, 16);
+ entry6.setId(RandomStringUtils.randomNumeric(32));
+ entry6.setStartTime(calendar.getTime());
+ entry6.setEndTime(calendar.getTime());
+ entry6.setTitle("Zero length entry");
+ entry6.setDescription("Is only rendered when the 'renderZeroLengthEntries' attribute is 'true'");
+ model.addEntry(entry6);
+ //And also an allday event
+ DefaultScheduleEntry entry7 = new DefaultScheduleEntry();
+ entry7.setId(RandomStringUtils.randomNumeric(32));
+ entry7.setTitle("All day event");
+ entry7.setSubtitle("This event renders as an all-day event");
+ entry7.setAllDay(true);
+ model.addEntry(entry7);
+ model.refresh();
+ }
+}
Propchange: myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleExampleHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleSettings.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleSettings.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleSettings.java (original)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleSettings.java Tue Aug 1 10:43:28 2006
@@ -1,218 +1,218 @@
-/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.myfaces.examples.schedule;
-
-import java.io.Serializable;
-
-import org.apache.myfaces.custom.schedule.model.ScheduleModel;
-
-/**
- * Handler class that contains the settings of the customizable schedule
- * example.
- *
- * @author Jurgen Lust (latest modification by $Author$)
- * @version $Revision$
- */
-public class ScheduleSettings implements Serializable
-{
- private static final long serialVersionUID = -8547428935814382762L;
-
- private int compactMonthRowHeight;
-
- private int compactWeekRowHeight;
-
- private int detailedRowHeight;
-
- private String headerDateFormat;
-
- private ScheduleModel model;
-
- private boolean readonly;
-
- private String theme;
-
- private boolean tooltip;
-
- private int visibleEndHour;
-
- private int visibleStartHour;
-
- private int workingEndHour;
-
- private int workingStartHour;
-
- private boolean renderZeroLength;
-
- private boolean expandToFitEntries;
-
- public int getCompactMonthRowHeight()
- {
- return compactMonthRowHeight;
- }
-
- public int getCompactWeekRowHeight()
- {
- return compactWeekRowHeight;
- }
-
- public int getDetailedRowHeight()
- {
- return detailedRowHeight;
- }
-
- public String getHeaderDateFormat()
- {
- return headerDateFormat;
- }
-
- public ScheduleModel getModel()
- {
- return model;
- }
-
- public String getTheme()
- {
- return theme;
- }
-
- public int getVisibleEndHour()
- {
- return visibleEndHour;
- }
-
- public int getVisibleStartHour()
- {
- return visibleStartHour;
- }
-
- public int getWorkingEndHour()
- {
- return workingEndHour;
- }
-
- public int getWorkingStartHour()
- {
- return workingStartHour;
- }
-
- public boolean isReadonly()
- {
- return readonly;
- }
-
- public boolean isTooltip()
- {
- return tooltip;
- }
-
- public String save()
- {
- model.refresh();
- return "success";
- }
-
- public void setCompactMonthRowHeight(int compactMonthRowHeight)
- {
- this.compactMonthRowHeight = compactMonthRowHeight;
- }
-
- public void setCompactWeekRowHeight(int compactWeekRowHeight)
- {
- this.compactWeekRowHeight = compactWeekRowHeight;
- }
-
- public void setDetailedRowHeight(int detailedRowHeight)
- {
- this.detailedRowHeight = detailedRowHeight;
- }
-
- public void setHeaderDateFormat(String headerDateFormat)
- {
- this.headerDateFormat = headerDateFormat;
- }
-
- public void setModel(ScheduleModel model)
- {
- this.model = model;
- }
-
- public void setReadonly(boolean readonly)
- {
- this.readonly = readonly;
- }
-
- public void setTheme(String theme)
- {
- this.theme = theme;
- }
-
- public void setTooltip(boolean tooltip)
- {
- this.tooltip = tooltip;
- }
-
- public void setVisibleEndHour(int visibleEndHour)
- {
- this.visibleEndHour = visibleEndHour;
- }
-
- public void setVisibleStartHour(int visibleStartHour)
- {
- this.visibleStartHour = visibleStartHour;
- }
-
- public void setWorkingEndHour(int workingEndHour)
- {
- this.workingEndHour = workingEndHour;
- }
-
- public void setWorkingStartHour(int workingStartHour)
- {
- this.workingStartHour = workingStartHour;
- }
-
- /**
- * @return Returns the renderZeroLength.
- */
- public boolean isRenderZeroLength()
- {
- return renderZeroLength;
- }
-
- /**
- * @param renderZeroLength The renderZeroLength to set.
- */
- public void setRenderZeroLength(boolean renderZeroLength)
- {
- this.renderZeroLength = renderZeroLength;
- }
-
- /**
- * @return Returns the expandToFitEntries.
- */
- public boolean isExpandToFitEntries()
- {
- return expandToFitEntries;
- }
-
- /**
- * @param expandToFitEntries The expandToFitEntries to set.
- */
- public void setExpandToFitEntries(boolean expandToFitEntries)
- {
- this.expandToFitEntries = expandToFitEntries;
- }
-}
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.examples.schedule;
+
+import java.io.Serializable;
+
+import org.apache.myfaces.custom.schedule.model.ScheduleModel;
+
+/**
+ * Handler class that contains the settings of the customizable schedule
+ * example.
+ *
+ * @author Jurgen Lust (latest modification by $Author$)
+ * @version $Revision$
+ */
+public class ScheduleSettings implements Serializable
+{
+ private static final long serialVersionUID = -8547428935814382762L;
+
+ private int compactMonthRowHeight;
+
+ private int compactWeekRowHeight;
+
+ private int detailedRowHeight;
+
+ private String headerDateFormat;
+
+ private ScheduleModel model;
+
+ private boolean readonly;
+
+ private String theme;
+
+ private boolean tooltip;
+
+ private int visibleEndHour;
+
+ private int visibleStartHour;
+
+ private int workingEndHour;
+
+ private int workingStartHour;
+
+ private boolean renderZeroLength;
+
+ private boolean expandToFitEntries;
+
+ public int getCompactMonthRowHeight()
+ {
+ return compactMonthRowHeight;
+ }
+
+ public int getCompactWeekRowHeight()
+ {
+ return compactWeekRowHeight;
+ }
+
+ public int getDetailedRowHeight()
+ {
+ return detailedRowHeight;
+ }
+
+ public String getHeaderDateFormat()
+ {
+ return headerDateFormat;
+ }
+
+ public ScheduleModel getModel()
+ {
+ return model;
+ }
+
+ public String getTheme()
+ {
+ return theme;
+ }
+
+ public int getVisibleEndHour()
+ {
+ return visibleEndHour;
+ }
+
+ public int getVisibleStartHour()
+ {
+ return visibleStartHour;
+ }
+
+ public int getWorkingEndHour()
+ {
+ return workingEndHour;
+ }
+
+ public int getWorkingStartHour()
+ {
+ return workingStartHour;
+ }
+
+ public boolean isReadonly()
+ {
+ return readonly;
+ }
+
+ public boolean isTooltip()
+ {
+ return tooltip;
+ }
+
+ public String save()
+ {
+ model.refresh();
+ return "success";
+ }
+
+ public void setCompactMonthRowHeight(int compactMonthRowHeight)
+ {
+ this.compactMonthRowHeight = compactMonthRowHeight;
+ }
+
+ public void setCompactWeekRowHeight(int compactWeekRowHeight)
+ {
+ this.compactWeekRowHeight = compactWeekRowHeight;
+ }
+
+ public void setDetailedRowHeight(int detailedRowHeight)
+ {
+ this.detailedRowHeight = detailedRowHeight;
+ }
+
+ public void setHeaderDateFormat(String headerDateFormat)
+ {
+ this.headerDateFormat = headerDateFormat;
+ }
+
+ public void setModel(ScheduleModel model)
+ {
+ this.model = model;
+ }
+
+ public void setReadonly(boolean readonly)
+ {
+ this.readonly = readonly;
+ }
+
+ public void setTheme(String theme)
+ {
+ this.theme = theme;
+ }
+
+ public void setTooltip(boolean tooltip)
+ {
+ this.tooltip = tooltip;
+ }
+
+ public void setVisibleEndHour(int visibleEndHour)
+ {
+ this.visibleEndHour = visibleEndHour;
+ }
+
+ public void setVisibleStartHour(int visibleStartHour)
+ {
+ this.visibleStartHour = visibleStartHour;
+ }
+
+ public void setWorkingEndHour(int workingEndHour)
+ {
+ this.workingEndHour = workingEndHour;
+ }
+
+ public void setWorkingStartHour(int workingStartHour)
+ {
+ this.workingStartHour = workingStartHour;
+ }
+
+ /**
+ * @return Returns the renderZeroLength.
+ */
+ public boolean isRenderZeroLength()
+ {
+ return renderZeroLength;
+ }
+
+ /**
+ * @param renderZeroLength The renderZeroLength to set.
+ */
+ public void setRenderZeroLength(boolean renderZeroLength)
+ {
+ this.renderZeroLength = renderZeroLength;
+ }
+
+ /**
+ * @return Returns the expandToFitEntries.
+ */
+ public boolean isExpandToFitEntries()
+ {
+ return expandToFitEntries;
+ }
+
+ /**
+ * @param expandToFitEntries The expandToFitEntries to set.
+ */
+ public void setExpandToFitEntries(boolean expandToFitEntries)
+ {
+ this.expandToFitEntries = expandToFitEntries;
+ }
+}
Propchange: myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleSettings.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/tomahawk/trunk/sandbox/assembly/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/assembly/pom.xml?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/assembly/pom.xml (original)
+++ myfaces/tomahawk/trunk/sandbox/assembly/pom.xml Tue Aug 1 10:43:28 2006
@@ -1,161 +1,161 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <packaging>pom</packaging>
- <name>Tomahawk Sandbox Assembly</name>
- <groupId>org.apache.myfaces.tomahawk</groupId>
- <artifactId>tomahawk-sandbox-assembly</artifactId>
-
- <parent>
- <groupId>org.apache.myfaces.tomahawk</groupId>
- <artifactId>sandbox-project</artifactId>
- <version>1.1.5-SNAPSHOT</version>
- </parent>
-
- <scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/sandbox/assembly</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/sandbox/assembly</developerConnection>
- <url>http://svn.apache.org/viewcvs.cgi/myfaces/tomahawk/trunk/sandbox/assembly</url>
- </scm>
-
- <build>
-
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>dependency-maven-plugin</artifactId>
- <executions>
-
- <execution>
- <id>copy-javadoc</id>
- <phase>package</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
-
- <artifactItem>
- <groupId>org.apache.myfaces.tomahawk</groupId>
- <artifactId>tomahawk-sandbox</artifactId>
- <version>${version}</version>
- <classifier>javadoc</classifier>
- </artifactItem>
-
- </artifactItems>
- <outputDirectory>${project.build.directory}/javadoc</outputDirectory>
- </configuration>
- </execution>
- <execution>
- <id>copy-tlddoc</id>
- <phase>package</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
-
- <artifactItem>
- <groupId>org.apache.myfaces.tomahawk</groupId>
- <artifactId>tomahawk-sandbox</artifactId>
- <version>${version}</version>
- <classifier>tlddoc</classifier>
- </artifactItem>
-
- </artifactItems>
- <outputDirectory>${project.build.directory}/tlddoc</outputDirectory>
- </configuration>
- </execution>
- <execution>
- <id>copy-lib</id>
- <phase>package</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.apache.myfaces.tomahawk</groupId>
- <artifactId>tomahawk-sandbox</artifactId>
- <version>${version}</version>
- </artifactItem>
- </artifactItems>
- <outputDirectory>${project.build.directory}/assembly-lib</outputDirectory>
- </configuration>
- </execution>
- <execution>
- <id>copy-source</id>
- <phase>package</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.apache.myfaces.tomahawk</groupId>
- <artifactId>tomahawk-sandbox</artifactId>
- <version>${version}</version>
- <classifier>sources</classifier>
- </artifactItem>
-
- </artifactItems>
- <outputDirectory>${project.build.directory}/src</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.0.1</version>
- <configuration>
- <descriptors>
- <descriptor>src/main/assembly/bin.xml</descriptor>
- <descriptor>src/main/assembly/src.xml</descriptor>
- </descriptors>
- <finalName>tomahawk-sandbox-${version}</finalName>
- <outputDirectory>${project.build.directory}/assembly/out</outputDirectory>
- <workDirectory>${project.build.directory}/assembly/work</workDirectory>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.myfaces.maven</groupId>
- <artifactId>wagon-maven-plugin</artifactId>
- <version>1.0.4-SNAPSHOT</version>
- <configuration>
- <id>myfaces-nightly-builds</id>
- <url>scpexe://minotaur.apache.org/www/cvs.apache.org/builds/myfaces/nightly</url>
- <inputDirectory>${project.build.directory}/assembly/out</inputDirectory>
- </configuration>
- </plugin>
-
- </plugins>
-
- </build>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.myfaces.core</groupId>
- <artifactId>myfaces-api</artifactId>
- <version>1.1.5-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.myfaces.core</groupId>
- <artifactId>myfaces-impl</artifactId>
- <version>1.1.5-SNAPSHOT</version>
- <!-- Sandbox must only have runtime dependency to myfaces-impl
- so that it will be automatically added to binary. But there must not be
- any compile dependency on impl so that is is always possible to use
- other JSF implementations. -->
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.myfaces.tomahawk</groupId>
- <artifactId>tomahawk-sandbox</artifactId>
- <version>${version}</version>
- </dependency>
- </dependencies>
-
-</project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <name>Tomahawk Sandbox Assembly</name>
+ <groupId>org.apache.myfaces.tomahawk</groupId>
+ <artifactId>tomahawk-sandbox-assembly</artifactId>
+
+ <parent>
+ <groupId>org.apache.myfaces.tomahawk</groupId>
+ <artifactId>sandbox-project</artifactId>
+ <version>1.1.5-SNAPSHOT</version>
+ </parent>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/sandbox/assembly</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/sandbox/assembly</developerConnection>
+ <url>http://svn.apache.org/viewcvs.cgi/myfaces/tomahawk/trunk/sandbox/assembly</url>
+ </scm>
+
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>dependency-maven-plugin</artifactId>
+ <executions>
+
+ <execution>
+ <id>copy-javadoc</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+
+ <artifactItem>
+ <groupId>org.apache.myfaces.tomahawk</groupId>
+ <artifactId>tomahawk-sandbox</artifactId>
+ <version>${version}</version>
+ <classifier>javadoc</classifier>
+ </artifactItem>
+
+ </artifactItems>
+ <outputDirectory>${project.build.directory}/javadoc</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-tlddoc</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+
+ <artifactItem>
+ <groupId>org.apache.myfaces.tomahawk</groupId>
+ <artifactId>tomahawk-sandbox</artifactId>
+ <version>${version}</version>
+ <classifier>tlddoc</classifier>
+ </artifactItem>
+
+ </artifactItems>
+ <outputDirectory>${project.build.directory}/tlddoc</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-lib</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.myfaces.tomahawk</groupId>
+ <artifactId>tomahawk-sandbox</artifactId>
+ <version>${version}</version>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${project.build.directory}/assembly-lib</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-source</id>
+ <phase>package</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.myfaces.tomahawk</groupId>
+ <artifactId>tomahawk-sandbox</artifactId>
+ <version>${version}</version>
+ <classifier>sources</classifier>
+ </artifactItem>
+
+ </artifactItems>
+ <outputDirectory>${project.build.directory}/src</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.0.1</version>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/bin.xml</descriptor>
+ <descriptor>src/main/assembly/src.xml</descriptor>
+ </descriptors>
+ <finalName>tomahawk-sandbox-${version}</finalName>
+ <outputDirectory>${project.build.directory}/assembly/out</outputDirectory>
+ <workDirectory>${project.build.directory}/assembly/work</workDirectory>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.myfaces.maven</groupId>
+ <artifactId>wagon-maven-plugin</artifactId>
+ <version>1.0.4-SNAPSHOT</version>
+ <configuration>
+ <id>myfaces-nightly-builds</id>
+ <url>scpexe://minotaur.apache.org/www/cvs.apache.org/builds/myfaces/nightly</url>
+ <inputDirectory>${project.build.directory}/assembly/out</inputDirectory>
+ </configuration>
+ </plugin>
+
+ </plugins>
+
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <version>1.1.5-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <version>1.1.5-SNAPSHOT</version>
+ <!-- Sandbox must only have runtime dependency to myfaces-impl
+ so that it will be automatically added to binary. But there must not be
+ any compile dependency on impl so that is is always possible to use
+ other JSF implementations. -->
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.tomahawk</groupId>
+ <artifactId>tomahawk-sandbox</artifactId>
+ <version>${version}</version>
+ </dependency>
+ </dependencies>
+
+</project>
Propchange: myfaces/tomahawk/trunk/sandbox/assembly/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanel.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanel.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanel.java (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanel.java Tue Aug 1 10:43:28 2006
@@ -1,324 +1,324 @@
-/**
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.myfaces.custom.accordion;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
-
-import org.apache.myfaces.component.html.ext.HtmlPanelGroup;
-
-
-/**
- * @author Martin Marinschek
- * @version $Revision: $ $Date: $
- * <p/>
- */
-public class HtmlAccordionPanel extends HtmlPanelGroup
-{
- public static String ACCORDION_LAYOUT = "accordion";
- public static String TOGGLING_LAYOUT = "toggling";
-
- public static String EXPANDED_BACK_COLOR = "expandedBg";
- public static String EXPANDED_TEXT_COLOR = "expandedTextColor";
- public static String EXPANDED_FONT_WEIGHT = "expandedFontWeight";
- public static String COLLAPSED_BACK_COLOR = "collapsedBg";
- public static String COLLAPSED_TEXT_COLOR = "collapsedTextColor";
- public static String COLLAPSED_FONT_WEIGHT = "collapsedFontWeight";
- public static String HOVER_BACK_COLOR = "hoverBg";
- public static String HOVER_TEXT_COLOR = "hoverTextColor";
- public static String BORDER_COLOR = "borderColor";
-
- public static String EXPAND_STATEHOLDER_ID = "_STATEHOLDER";
-
- public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlAccordionPanel";
- public static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.AccordionPanel";
-
- private String _layout;
-
- //style properties
- private String _expandedBackColor;
- private String _expandedTextColor;
- private String _expandedFontWeight;
- private String _collapsedBackColor;
- private String _collapsedTextColor;
- private String _collapsedFontWeight;
- private String _hoverBackColor;
- private String _hoverTextColor;
- private String _borderColor;
-
- //expansionstate of children
- private List _childExpanded;
-
-
- public Object saveState(FacesContext context)
- {
- Object[] values = new Object[12];
- values[0] = super.saveState(context);
- values[1] = _layout;
-
- values[2] = _expandedBackColor;
- values[3] = _expandedTextColor;
- values[4] = _expandedFontWeight;
- values[5] = _collapsedBackColor;
- values[6] = _collapsedTextColor;
- values[7] = _collapsedFontWeight;
- values[8] = _hoverBackColor;
- values[9] = _hoverTextColor;
- values[10] = _borderColor;
-
- values[11] = _childExpanded;
-
- return values;
- }
-
- public void restoreState(FacesContext context, Object state)
- {
- Object values[] = (Object[])state;
- super.restoreState(context, values[0]);
- _layout = (String) values[1];
-
- _expandedBackColor = (String) values[2];
- _expandedTextColor = (String) values[3];
- _expandedFontWeight = (String) values[4];
- _collapsedBackColor = (String) values[5];
- _collapsedTextColor = (String) values[6];
- _collapsedFontWeight = (String) values[7];
- _hoverBackColor = (String) values[8];
- _hoverTextColor = (String) values[9];
- _borderColor = (String) values[10];
-
- _childExpanded = (List) values[11];
- }
-
- public HtmlAccordionPanel()
- {
- super();
-
- setRendererType(DEFAULT_RENDERER_TYPE);
- }
-
- public String getLayout()
- {
- if(_layout != null)
- {
- return _layout;
- }
- ValueBinding vb = getValueBinding("layout");
- return vb != null ?
- vb.getValue(getFacesContext()).toString() :
- ACCORDION_LAYOUT;
- }
-
- public void setLayout(String layout)
- {
- _layout = layout;
- }
-
-
- public String getExpandedBackColor()
- {
- if(_expandedBackColor != null)
- {
- return _expandedBackColor;
- }
- ValueBinding vb = getValueBinding("expandedBackColor");
- return vb != null ?
- vb.getValue(getFacesContext()).toString() :
- "#63699c";
- }
-
-
- public void setExpandedBackColor(String expandedBackColor)
- {
- _expandedBackColor = expandedBackColor;
- }
-
-
- public String getExpandedTextColor()
- {
- if(_expandedTextColor != null)
- {
- return _expandedTextColor;
- }
- ValueBinding vb = getValueBinding("expandedTextColor");
- return vb != null ?
- vb.getValue(getFacesContext()).toString() :
- "#ffffff";
- }
-
-
- public void setExpandedTextColor(String expandedTextColor)
- {
- _expandedTextColor = expandedTextColor;
- }
-
-
- public String getExpandedFontWeight()
- {
- if(_expandedFontWeight != null)
- {
- return _expandedFontWeight;
- }
- ValueBinding vb = getValueBinding("expandedFontWeight");
- return vb != null ?
- vb.getValue(getFacesContext()).toString() :
- "bold";
- }
-
-
- public void setExpandedFontWeight(String expandedFontWeight)
- {
- _expandedFontWeight = expandedFontWeight;
- }
-
-
- public String getCollapsedBackColor()
- {
- if(_collapsedBackColor != null)
- {
- return _collapsedBackColor;
- }
- ValueBinding vb = getValueBinding("collapsedBackColor");
- return vb != null ?
- vb.getValue(getFacesContext()).toString() :
- "#6b79a5";
- }
-
-
- public void setCollapsedBackColor(String collapsedBackColor)
- {
- _collapsedBackColor = collapsedBackColor;
- }
-
-
- public String getCollapsedTextColor()
- {
- if(_collapsedTextColor != null)
- {
- return _collapsedTextColor;
- }
- ValueBinding vb = getValueBinding("collapsedTextColor");
- return vb != null ?
- vb.getValue(getFacesContext()).toString() :
- "#ced7ef";
- }
-
-
- public void setCollapsedTextColor(String collapsedTextColor)
- {
- _collapsedTextColor = collapsedTextColor;
- }
-
-
- public String getCollapsedFontWeight()
- {
- if(_collapsedFontWeight != null)
- {
- return _collapsedFontWeight;
- }
- ValueBinding vb = getValueBinding("collapsedFontWeight");
- return vb != null ?
- vb.getValue(getFacesContext()).toString() :
- "normal";
- }
-
-
- public void setCollapsedFontWeight(String collapsedFontWeight)
- {
- _collapsedFontWeight = collapsedFontWeight;
- }
-
-
- public String getHoverBackColor()
- {
- if(_hoverBackColor != null)
- {
- return _hoverBackColor;
- }
- ValueBinding vb = getValueBinding("hoverBackColor");
- return vb != null ?
- vb.getValue(getFacesContext()).toString() :
- "#63699c";
- }
-
-
- public void setHoverBackColor(String hoverBackColor)
- {
- _hoverBackColor = hoverBackColor;
- }
-
-
- public String getHoverTextColor()
- {
- if(_hoverTextColor != null)
- {
- return _hoverTextColor;
- }
- ValueBinding vb = getValueBinding("hoverTextColor");
- return vb != null ?
- vb.getValue(getFacesContext()).toString() :
- "#ffffff";
- }
-
-
- public void setHoverTextColor(String hoverTextColor)
- {
- _hoverTextColor = hoverTextColor;
- }
-
-
- public String getBorderColor()
- {
- if(_borderColor != null)
- {
- return _borderColor;
- }
- ValueBinding vb = getValueBinding("borderColor");
- return vb != null ?
- vb.getValue(getFacesContext()).toString() :
- "#1f669b";
- }
-
-
- public void setBorderColor(String borderColor)
- {
- _borderColor = borderColor;
- }
-
- //TODO
- public List getChildExpanded()
- {
- if(_childExpanded == null)
- {
- _childExpanded = new ArrayList(getChildCount());
- for(int i = 0; i < getChildCount(); i++)
- {
- Integer curState = new Integer(i == 0 ? 1 : 0);
- _childExpanded.add(curState);
- }
- }
- return _childExpanded;
- }
-
-
- public void setChildExpanded(List childExpanded)
- {
- _childExpanded = childExpanded;
- }
-}
+/**
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.custom.accordion;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+import org.apache.myfaces.component.html.ext.HtmlPanelGroup;
+
+
+/**
+ * @author Martin Marinschek
+ * @version $Revision: $ $Date: $
+ * <p/>
+ */
+public class HtmlAccordionPanel extends HtmlPanelGroup
+{
+ public static String ACCORDION_LAYOUT = "accordion";
+ public static String TOGGLING_LAYOUT = "toggling";
+
+ public static String EXPANDED_BACK_COLOR = "expandedBg";
+ public static String EXPANDED_TEXT_COLOR = "expandedTextColor";
+ public static String EXPANDED_FONT_WEIGHT = "expandedFontWeight";
+ public static String COLLAPSED_BACK_COLOR = "collapsedBg";
+ public static String COLLAPSED_TEXT_COLOR = "collapsedTextColor";
+ public static String COLLAPSED_FONT_WEIGHT = "collapsedFontWeight";
+ public static String HOVER_BACK_COLOR = "hoverBg";
+ public static String HOVER_TEXT_COLOR = "hoverTextColor";
+ public static String BORDER_COLOR = "borderColor";
+
+ public static String EXPAND_STATEHOLDER_ID = "_STATEHOLDER";
+
+ public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlAccordionPanel";
+ public static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.AccordionPanel";
+
+ private String _layout;
+
+ //style properties
+ private String _expandedBackColor;
+ private String _expandedTextColor;
+ private String _expandedFontWeight;
+ private String _collapsedBackColor;
+ private String _collapsedTextColor;
+ private String _collapsedFontWeight;
+ private String _hoverBackColor;
+ private String _hoverTextColor;
+ private String _borderColor;
+
+ //expansionstate of children
+ private List _childExpanded;
+
+
+ public Object saveState(FacesContext context)
+ {
+ Object[] values = new Object[12];
+ values[0] = super.saveState(context);
+ values[1] = _layout;
+
+ values[2] = _expandedBackColor;
+ values[3] = _expandedTextColor;
+ values[4] = _expandedFontWeight;
+ values[5] = _collapsedBackColor;
+ values[6] = _collapsedTextColor;
+ values[7] = _collapsedFontWeight;
+ values[8] = _hoverBackColor;
+ values[9] = _hoverTextColor;
+ values[10] = _borderColor;
+
+ values[11] = _childExpanded;
+
+ return values;
+ }
+
+ public void restoreState(FacesContext context, Object state)
+ {
+ Object values[] = (Object[])state;
+ super.restoreState(context, values[0]);
+ _layout = (String) values[1];
+
+ _expandedBackColor = (String) values[2];
+ _expandedTextColor = (String) values[3];
+ _expandedFontWeight = (String) values[4];
+ _collapsedBackColor = (String) values[5];
+ _collapsedTextColor = (String) values[6];
+ _collapsedFontWeight = (String) values[7];
+ _hoverBackColor = (String) values[8];
+ _hoverTextColor = (String) values[9];
+ _borderColor = (String) values[10];
+
+ _childExpanded = (List) values[11];
+ }
+
+ public HtmlAccordionPanel()
+ {
+ super();
+
+ setRendererType(DEFAULT_RENDERER_TYPE);
+ }
+
+ public String getLayout()
+ {
+ if(_layout != null)
+ {
+ return _layout;
+ }
+ ValueBinding vb = getValueBinding("layout");
+ return vb != null ?
+ vb.getValue(getFacesContext()).toString() :
+ ACCORDION_LAYOUT;
+ }
+
+ public void setLayout(String layout)
+ {
+ _layout = layout;
+ }
+
+
+ public String getExpandedBackColor()
+ {
+ if(_expandedBackColor != null)
+ {
+ return _expandedBackColor;
+ }
+ ValueBinding vb = getValueBinding("expandedBackColor");
+ return vb != null ?
+ vb.getValue(getFacesContext()).toString() :
+ "#63699c";
+ }
+
+
+ public void setExpandedBackColor(String expandedBackColor)
+ {
+ _expandedBackColor = expandedBackColor;
+ }
+
+
+ public String getExpandedTextColor()
+ {
+ if(_expandedTextColor != null)
+ {
+ return _expandedTextColor;
+ }
+ ValueBinding vb = getValueBinding("expandedTextColor");
+ return vb != null ?
+ vb.getValue(getFacesContext()).toString() :
+ "#ffffff";
+ }
+
+
+ public void setExpandedTextColor(String expandedTextColor)
+ {
+ _expandedTextColor = expandedTextColor;
+ }
+
+
+ public String getExpandedFontWeight()
+ {
+ if(_expandedFontWeight != null)
+ {
+ return _expandedFontWeight;
+ }
+ ValueBinding vb = getValueBinding("expandedFontWeight");
+ return vb != null ?
+ vb.getValue(getFacesContext()).toString() :
+ "bold";
+ }
+
+
+ public void setExpandedFontWeight(String expandedFontWeight)
+ {
+ _expandedFontWeight = expandedFontWeight;
+ }
+
+
+ public String getCollapsedBackColor()
+ {
+ if(_collapsedBackColor != null)
+ {
+ return _collapsedBackColor;
+ }
+ ValueBinding vb = getValueBinding("collapsedBackColor");
+ return vb != null ?
+ vb.getValue(getFacesContext()).toString() :
+ "#6b79a5";
+ }
+
+
+ public void setCollapsedBackColor(String collapsedBackColor)
+ {
+ _collapsedBackColor = collapsedBackColor;
+ }
+
+
+ public String getCollapsedTextColor()
+ {
+ if(_collapsedTextColor != null)
+ {
+ return _collapsedTextColor;
+ }
+ ValueBinding vb = getValueBinding("collapsedTextColor");
+ return vb != null ?
+ vb.getValue(getFacesContext()).toString() :
+ "#ced7ef";
+ }
+
+
+ public void setCollapsedTextColor(String collapsedTextColor)
+ {
+ _collapsedTextColor = collapsedTextColor;
+ }
+
+
+ public String getCollapsedFontWeight()
+ {
+ if(_collapsedFontWeight != null)
+ {
+ return _collapsedFontWeight;
+ }
+ ValueBinding vb = getValueBinding("collapsedFontWeight");
+ return vb != null ?
+ vb.getValue(getFacesContext()).toString() :
+ "normal";
+ }
+
+
+ public void setCollapsedFontWeight(String collapsedFontWeight)
+ {
+ _collapsedFontWeight = collapsedFontWeight;
+ }
+
+
+ public String getHoverBackColor()
+ {
+ if(_hoverBackColor != null)
+ {
+ return _hoverBackColor;
+ }
+ ValueBinding vb = getValueBinding("hoverBackColor");
+ return vb != null ?
+ vb.getValue(getFacesContext()).toString() :
+ "#63699c";
+ }
+
+
+ public void setHoverBackColor(String hoverBackColor)
+ {
+ _hoverBackColor = hoverBackColor;
+ }
+
+
+ public String getHoverTextColor()
+ {
+ if(_hoverTextColor != null)
+ {
+ return _hoverTextColor;
+ }
+ ValueBinding vb = getValueBinding("hoverTextColor");
+ return vb != null ?
+ vb.getValue(getFacesContext()).toString() :
+ "#ffffff";
+ }
+
+
+ public void setHoverTextColor(String hoverTextColor)
+ {
+ _hoverTextColor = hoverTextColor;
+ }
+
+
+ public String getBorderColor()
+ {
+ if(_borderColor != null)
+ {
+ return _borderColor;
+ }
+ ValueBinding vb = getValueBinding("borderColor");
+ return vb != null ?
+ vb.getValue(getFacesContext()).toString() :
+ "#1f669b";
+ }
+
+
+ public void setBorderColor(String borderColor)
+ {
+ _borderColor = borderColor;
+ }
+
+ //TODO
+ public List getChildExpanded()
+ {
+ if(_childExpanded == null)
+ {
+ _childExpanded = new ArrayList(getChildCount());
+ for(int i = 0; i < getChildCount(); i++)
+ {
+ Integer curState = new Integer(i == 0 ? 1 : 0);
+ _childExpanded.add(curState);
+ }
+ }
+ return _childExpanded;
+ }
+
+
+ public void setChildExpanded(List childExpanded)
+ {
+ _childExpanded = childExpanded;
+ }
+}
Propchange: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanel.java
------------------------------------------------------------------------------
svn:eol-style = native