[richfaces-svn-commits] JBoss Rich Faces SVN: r13530 - in trunk/samples/richfaces-demo/src/main: resources/org/richfaces/demo/common and 5 other directories.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Mon Apr 13 10:37:03 EDT 2009
Author: ilya_shaikovsky
Date: 2009-04-13 10:37:02 -0400 (Mon, 13 Apr 2009)
New Revision: 13530
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/colorPicker.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/colorPicker/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/colorPicker/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/colorPicker/usage/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/colorPicker/usage/sample.xhtml
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/paint2d/PaintBean.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/paint2d/PaintData.java
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/examples/painter.xhtml
Log:
colorPicker sample template added(TBD description)
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/paint2d/PaintBean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/paint2d/PaintBean.java 2009-04-13 14:02:32 UTC (rev 13529)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/paint2d/PaintBean.java 2009-04-13 14:37:02 UTC (rev 13530)
@@ -26,8 +26,7 @@
int x = 10;
int y = fontSize*5/2;
g2d.translate(x, y);
- Color color = new Color((int) data.color );
-
+ Color color = new Color(Integer.parseInt(data.color.substring(1),16));
g2d.setPaint(new Color(color.getRed(),color.getGreen(), color.getBlue(), 30));
AffineTransform origTransform = g2d.getTransform();
g2d.shear(-0.5*data.scale, 0);
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/paint2d/PaintData.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/paint2d/PaintData.java 2009-04-13 14:02:32 UTC (rev 13529)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/paint2d/PaintData.java 2009-04-13 14:37:02 UTC (rev 13530)
@@ -3,13 +3,17 @@
import java.io.Serializable;
public class PaintData implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
String text;
- long color;
+ String color;
float scale;
- public long getColor() {
+ public String getColor() {
return color;
}
- public void setColor(long color) {
+ public void setColor(String color) {
this.color = color;
}
public float getScale() {
Modified: trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
===================================================================
--- trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2009-04-13 14:02:32 UTC (rev 13529)
+++ trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2009-04-13 14:37:02 UTC (rev 13530)
@@ -7,7 +7,7 @@
inputNumberSlider= richInputs, Input Number Slider, /images/ico_DataFilterSlider.gif, /images/cn_slider.gif, inputNumberSlider.html, jbossrichfaces/freezone/docs/tlddoc/rich/inputNumberSlider.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIInputNumberSlider.html, /richfaces/inputNumberSlider.jsf
inputNumberSpinner= richInputs, Input Number Spinner, /images/ico_spinner.gif, /images/cn_spinner.gif, inputNumberSpinner.html, jbossrichfaces/freezone/docs/tlddoc/rich/inputNumberSpinner.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIInputNumberSpinner.html, /richfaces/inputNumberSpinner.jsf
dataFilterSlider= richDataIterators, Data Filter Slider, /images/ico_DataFilterSlider.gif, /images/cn_DataFilterSlider.gif, dataFilterSlider.html, jbossrichfaces/freezone/docs/tlddoc/rich/dataFilterSlider.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIDataFltrSlider.html, /richfaces/dataFilterSlider.jsf
-dataTable=richDataIterators, Data Table, /images/ico_DataTable.gif, /images/cn_DataTable.gif, dataTable.html, jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIDataTable.html, /richfaces/dataTable.jsf,new
+dataTable=richDataIterators, Data Table, /images/ico_DataTable.gif, /images/cn_DataTable.gif, dataTable.html, jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIDataTable.html, /richfaces/dataTable.jsf
column= richDataIterators, Column, /images/ico_Column.gif, /images/cn_Column.gif, column.html, jbossrichfaces/freezone/docs/tlddoc/rich/column.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIColumn.html, /richfaces/dataTable.jsf
columnGroup= richDataIterators, Column Group, /images/ico_ColumnGroup.gif, /images/cn_ColumnGroup.gif, columnGroup.html, jbossrichfaces/freezone/docs/tlddoc/rich/columnGroup.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIColumnGroup.html, /richfaces/dataTable.jsf
dataDefinitionList= richDataIterators, Data Definition List, /images/ico_DataDefinitionList.gif, /images/cn_DataDefinitionList.gif, dataDefinitionList.html, jbossrichfaces/freezone/docs/tlddoc/rich/dataDefinitionList.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIDataDefinitionList.html, /richfaces/dataLists.jsf
@@ -48,7 +48,7 @@
commandButton= ajaxSupport, Command Button, /images/ico_common.gif, /images/cn_commandButton.gif, commandButton.html, jbossajax4jsf/freezone/docs/tlddoc/a4j/commandButton.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxCommandButton.html, /richfaces/commandButton.jsf
commandLink= ajaxSupport, Command Link, /images/ico_common.gif, /images/cn_commandLink.gif, commandLink.html, jbossajax4jsf/freezone/docs/tlddoc/a4j/commandLink.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxCommandLink.html, /richfaces/commandLink.jsf
form= ajaxSupport, Ajax Form, /images/ico_common.gif, /images/cn_ajaxForm.gif, form.html, jbossajax4jsf/freezone/docs/tlddoc/a4j/form.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxForm.html, /richfaces/form.jsf
-support= ajaxSupport, Ajax Support, /images/ico_common.gif, /images/cn_ajaxSupport.gif, support.html, jbossajax4jsf/freezone/docs/tlddoc/a4j/support.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxSupport.html, /richfaces/support.jsf, new
+support= ajaxSupport, Ajax Support, /images/ico_common.gif, /images/cn_ajaxSupport.gif, support.html, jbossajax4jsf/freezone/docs/tlddoc/a4j/support.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxSupport.html, /richfaces/support.jsf
jsFunction= ajaxSupport, JS Function, /images/ico_common.gif, /images/cn_jsFunction.gif, jsFunction.html, jbossajax4jsf/freezone/docs/tlddoc/a4j/jsFunction.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxFunction.html, /richfaces/jsFunction.jsf
poll= ajaxSupport, Poll, /images/ico_common.gif, /images/cn_poll.gif, poll.html, jbossajax4jsf/freezone/docs/tlddoc/a4j/poll.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIPoll.html, /richfaces/poll.jsf
push= ajaxSupport, Push, /images/ico_common.gif, /images/cn_push.gif, push.html, jbossajax4jsf/freezone/docs/tlddoc/a4j/push.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIPush.html, /richfaces/push.jsf
@@ -70,7 +70,7 @@
effect= richMisc, Effect, /images/ico_common.gif, /images/cn_Effect.gif, effect.html, jbossrichfaces/freezone/docs/tlddoc/rich/effect.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIEffect.html, /richfaces/effect.jsf
contextMenu= richMenu, Context Menu, /images/ico_ContextMenu.gif, /images/cn_contextMenu.gif, contextMenu.html, jbossrichfaces/freezone/docs/tlddoc/rich/contextMenu.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIContextMenu.html, /richfaces/contextMenu.jsf
componentControl=richMisc, Component Control, \t/images/ico_common.gif, \t\t/images/cn_componentControl.gif, componentControl.html, jbossrichfaces/freezone/docs/tlddoc/rich/componentControl.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIComponentControl.html, /richfaces/componentControl.jsf
-orderingList=richSelect, Ordering List, \t\t/images/ico_OrderingList.gif, \t/images/cn_orderingList.gif, orderingList.html, jbossrichfaces/freezone/docs/tlddoc/rich/orderingList.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIOrderingList.html, \t\t/richfaces/orderingList.jsf, new
+orderingList=richSelect, Ordering List, \t\t/images/ico_OrderingList.gif, \t/images/cn_orderingList.gif, orderingList.html, jbossrichfaces/freezone/docs/tlddoc/rich/orderingList.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIOrderingList.html, \t\t/richfaces/orderingList.jsf
listShuttle=richSelect, List Shuttle, \t\t/images/ico_ListShuttle.gif, /images/cn_listShuttle.gif, listShuttle.html, jbossrichfaces/freezone/docs/tlddoc/rich/listShuttle.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIListShuttle.html, \t\t/richfaces/listShuttle.jsf
pickList=richSelect, Pick List, \t\t\t/images/ico_pickList.gif, /images/cn_PickList.gif, pickList.html, jbossrichfaces/freezone/docs/tlddoc/rich/pickList.html, \t\tjbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIPickList.html, \t\t\t\t/richfaces/pickList.jsf
progressBar=richOutputs, Progress Bar, \t\t/images/ico_progressBar.gif, /images/cn_ProgressBar.gif, progressBar.html, jbossrichfaces/freezone/docs/tlddoc/rich/progressBar.html, \t\tjbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIProgressBar.html, \t/richfaces/progressBar.jsf
@@ -89,5 +89,6 @@
graphValidator=richValidators, \t Graph Validator, \t\t/images/ico_GraphValidator.gif, \t\t/images/cn_GraphValidator.gif, graphValidator.html, jbossrichfaces/freezone/docs/tlddoc/rich/graphValidator.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIGraphValidator.html, \t\t\t\t\t/richfaces/graphValidator.jsf
stateAPI=richMisc, \t State Manager API, \t\t/images/ico_StateManagerAPI.gif, \t\t/images/cn_StateManagerAPI.gif, ArchitectureOverview.html\#statemanagerapi, jbossrichfaces/freezone/docs/tlddoc/rich/graphValidator.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIhotkey.html, \t\t\t\t\t/richfaces/stateAPI.jsf
extendedDataTable= richDataIterators, Extended Data Table, /images/ico_ExtendedDataTable.gif, /images/cn_ExtendedDataTable.gif, extendedDataTable.html, jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIDataTable.html, /richfaces/extendedDataTable.jsf
-editor=richInputs, Editor, /images/ico_Editor.gif, /images/cn_Editor.gif, editor.html, jbossrichfaces/freezone/docs/tlddoc/rich/editor.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIEditor.html, /richfaces/editor.jsf, new
-queue=ajaxSupport, Queue, /images/ico_common.gif, /images/cn_Queue.gif, Queue.html, jbossrichfaces/freezone/docs/tlddoc/rich/queue.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIQueue.html, /richfaces/queue.jsf, new
+editor=richInputs, Editor, /images/ico_Editor.gif, /images/cn_Editor.gif, editor.html, jbossrichfaces/freezone/docs/tlddoc/rich/editor.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIEditor.html, /richfaces/editor.jsf
+queue=ajaxSupport, Queue, /images/ico_common.gif, /images/cn_Queue.gif, Queue.html, jbossrichfaces/freezone/docs/tlddoc/rich/queue.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIQueue.html, /richfaces/queue.jsf
+colorPicker=colorPicker, richInputs, /images/ico_ColorPicker.gif, /images/cn_ColorPicker.gif, ColorPicker.html, jbossrichfaces/freezone/docs/tlddoc/rich/colorPicker.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIColorPicker.html, /richfaces/colorPicker.jsf, new
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2009-04-13 14:02:32 UTC (rev 13529)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2009-04-13 14:37:02 UTC (rev 13530)
@@ -198,8 +198,8 @@
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>color</property-name>
- <property-class>long</property-class>
- <value>1000</value>
+ <property-class>java.lang.String</property-class>
+ <value>#3E8</value>
</managed-property>
<managed-property>
<property-name>scale</property-name>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/colorPicker/usage/sample.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/colorPicker/usage/sample.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/colorPicker/usage/sample.xhtml 2009-04-13 14:37:02 UTC (rev 13530)
@@ -0,0 +1,20 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+ <h:form>
+ <h:panelGrid columns="1">
+ <rich:paint2D id="painter" width="300" height="120"
+ data="#{paintData}" format="png" paint="#{paintBean.paint}" >
+ </rich:paint2D>
+ <h:panelGroup>
+ <h:outputText value="Change text color " />
+ <rich:colorPicker colorMode="hex" value="#{paintData.color}"/>
+ </h:panelGroup>
+ </h:panelGrid>
+ <a4j:commandButton value="Update Image" reRender="painter"/>
+ </h:form>
+</ui:composition>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/colorPicker/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/colorPicker/usage.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/colorPicker/usage.xhtml 2009-04-13 14:37:02 UTC (rev 13530)
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+ <ui:composition template="/templates/component-sample.xhtml">
+ <ui:define name="sample">
+
+ <p>
+ Description
+ </p>
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">ColorPicker Demo</legend>
+ <div class="sample-container" >
+ <ui:include src="/richfaces/colorPicker/usage/sample.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/colorPicker/usage/sample.xhtml"/>
+ </ui:include>
+ </div>
+ </fieldset>
+ </ui:define>
+ </ui:composition>
+</html>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/colorPicker.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/colorPicker.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/colorPicker.xhtml 2009-04-13 14:37:02 UTC (rev 13530)
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:rich="http://richfaces.org/rich">
+<ui:composition template="/templates/main.xhtml">
+ <ui:define name="title">RichFaces - Open Source Rich JSF Components - Color Picker</ui:define>
+ <ui:define name="body">
+ <ui:include src="/templates/include/tab-panel.xhtml" />
+ </ui:define>
+</ui:composition>
+</html>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/examples/painter.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/examples/painter.xhtml 2009-04-13 14:02:32 UTC (rev 13529)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/paint2D/examples/painter.xhtml 2009-04-13 14:37:02 UTC (rev 13530)
@@ -19,14 +19,9 @@
<h:panelGroup>
Color:
- <rich:inputNumberSlider showInput="false"
- showBoundaryValues="false" showToolTip="false"
- value="#{paintData.color}" step="255" minValue="0"
- maxValue="16000000">
- <f:convertNumber groupingUsed="false" />
- <a4j:support event="onchange" reRender=":painter" />
- </rich:inputNumberSlider>
-
+ <rich:colorPicker colorMode="hex" value="#{paintData.color}">
+ <a4j:support event="onchange" reRender=":painter" />
+ </rich:colorPicker>
</h:panelGroup>
<h:panelGroup>
More information about the richfaces-svn-commits
mailing list