JBoss Rich Faces SVN: r2437 - trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-08-23 10:55:26 -0400 (Thu, 23 Aug 2007)
New Revision: 2437
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
RF-684 fixed
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-08-23 14:38:15 UTC (rev 2436)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-08-23 14:55:26 UTC (rev 2437)
@@ -14,7 +14,7 @@
// jointPoint: {x:,y:} or ('top-left','top-right','bottom'-left,'bottom-right')
// direction: ('top-left','top-right','bottom'-left,'bottom-right', 'auto')
// offset: {x:,y:}
-
+
var elementDim = Richfaces.Calendar.getOffsetDimensions(element);
var baseElementDim;
var baseOffset;
@@ -103,12 +103,24 @@
}
}
+ var els = element.style;
+ var originalVisibility = els.visibility;
+ var originalPosition = els.position;
+ var originalDisplay = els.display;
+ els.visibility = 'hidden';
+ els.position = 'absolute';
+ els.display = '';
+
if (element.offsetParent && element.offsetParent!=document.body)
{
var offset=Position.cumulativeOffset(element.offsetParent);
ox -= offset[0];
oy -= offset[1];
}
+
+ els.display = originalDisplay;
+ els.position = originalPosition;
+ els.visibility = originalVisibility;
element.style.left = ox + 'px';
element.style.top = oy + 'px';
@@ -384,8 +396,7 @@
// jointPoint - [top-left, top-right, bottom-left, bottom-right]
// popup - true
// id+PopupButton, id+InputDate,
- // inputType - [readonly-default, hidden, editable] - this parameter used only on server side
-
+
// boundaryDatesMode - boundary dates onclick action:
// "inactive" or undefined - no action (default)
// "scroll" - change current month
@@ -561,6 +572,7 @@
//rect calculation
var offsetBase1 = Position.cumulativeOffset(baseInput);
var offsetBase2 = Position.cumulativeOffset(baseButton);
+ var els = e.style;
var offsetBase = [offsetBase1[0]<offsetBase2[0] ? offsetBase1[0] : offsetBase2[0],
offsetBase1[1]<offsetBase2[1] ? offsetBase1[1] : offsetBase2[1]];
18 years, 8 months
JBoss Rich Faces SVN: r2436 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-08-23 10:38:15 -0400 (Thu, 23 Aug 2007)
New Revision: 2436
Modified:
trunk/docs/userguide/en/src/main/docbook/included/actionparam.xml
trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml
trunk/docs/userguide/en/src/main/docbook/included/commandLink.xml
trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.xml
trunk/docs/userguide/en/src/main/docbook/included/dataList.xml
trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.xml
trunk/docs/userguide/en/src/main/docbook/included/dataTable.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml
trunk/docs/userguide/en/src/main/docbook/included/dragIndicator.xml
trunk/docs/userguide/en/src/main/docbook/included/dropSupport.xml
trunk/docs/userguide/en/src/main/docbook/included/inputNumberSpinner.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/inputNumberSpinner.xml
trunk/docs/userguide/en/src/main/docbook/included/jsFunction.xml
trunk/docs/userguide/en/src/main/docbook/included/loadScript.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/loadStyle.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/menuGroup.xml
trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml
trunk/docs/userguide/en/src/main/docbook/included/outputPanel.xml
trunk/docs/userguide/en/src/main/docbook/included/paint2D.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml
trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml
trunk/docs/userguide/en/src/main/docbook/included/region.xml
trunk/docs/userguide/en/src/main/docbook/included/repeat.xml
trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/support.xml
trunk/docs/userguide/en/src/main/docbook/included/toggleControl.xml
trunk/docs/userguide/en/src/main/docbook/included/toolBar.xml
trunk/docs/userguide/en/src/main/docbook/included/tooltip.xml
Log:
http://jira.jboss.com/jira/browse/RF-672
the attributes were highlighted
Modified: trunk/docs/userguide/en/src/main/docbook/included/actionparam.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/actionparam.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/actionparam.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -61,7 +61,7 @@
decode the value to a string stored in the html parameter.</para>
<para><emphasis role="bold">
<property><a4j:actionparam></property>
- </emphasis>has a "noEscape" attribute. If it is set to
+ </emphasis>has a <emphasis><property>"noEscape"</property></emphasis> attribute. If it is set to
"true", the value will be evaluated as a JavaScript code. </para>
<emphasis role="bold">Example:</emphasis>
<programlisting role="XML"><![CDATA[...
Modified: trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.desc.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/ajaxListener.desc.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<section>
<para>The <emphasis role="bold"><property><a4j:ajaxListener></property></emphasis>
-component is the same one as "ActionListener" or "ValueChangeListener", but for an Ajax container.</para>
+component is the same one as <emphasis><property>"ActionListener"</property></emphasis> or "ValueChangeListener", but for an Ajax container.</para>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -87,7 +87,7 @@
the calendar is represented on a page as an input field and a button. Clicking on the button
calls the calendar popup as it's shown on the picture below. </para>
<figure>
- <title>Using the "popup" attribute</title>
+ <title>Using the <emphasis><property>"popup"</property></emphasis> attribute</title>
<mediaobject>
<imageobject>
@@ -217,14 +217,14 @@
<para>This method is called when it's necessary to represent the next block of
CalendarDataItems. It happens during navigation to the next (previous) month or in any other
- case when calendar renders. This method is called in "Ajax" mode when the
+ case when calendar renders. This method is called in <emphasis><property>"Ajax"</property></emphasis> mode when the
calendar renders a new page. </para>
<para><emphasis role="bold">CalendarDataModelItem</emphasis> provides the following function:</para>
<itemizedlist>
<listitem>Date getDate() - returns date from the item. Default implementation returns date.</listitem>
- <listitem>Boolean isEnabled() - returns "true" if date is
- "selectable" on the calendar. Default implementation returns
+ <listitem>Boolean isEnabled() - returns <emphasis><property>"true"</property></emphasis> if date is
+ <emphasis><property>"selectable"</property></emphasis> on the calendar. Default implementation returns
"true".</listitem>
<listitem>String getStyleClass() - returns string appended to the style class for the date
span. For example it could be "relevant holyday". It means that the class
Modified: trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -33,7 +33,7 @@
<title>Creating on a page</title>
<para><emphasis role="bold"><property><a4j:commandButton></property></emphasis> is used in the same way as <emphasis role="bold"><property><h:commandButton></property></emphasis>, but with definition of the area that is updated after the response comes back from the server.</para>
<programlisting role="XML"><![CDATA[<a4j:commandButton reRender="someData" action="#{bean.action1}" value="Link"/>]]></programlisting>
- <para>This definition of the component provides a link, a click on the link causes an Ajax form submit on the server, "action1" method performance, and rendering of the component with "someData" id after the response comes back from the server.</para>
+ <para>This definition of the component provides a link, a click on the link causes an Ajax form submit on the server, "action1" method performance, and rendering of the component with <emphasis><property>"someData"</property></emphasis> id after the response comes back from the server.</para>
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
Modified: trunk/docs/userguide/en/src/main/docbook/included/commandLink.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/commandLink.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/commandLink.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -37,7 +37,7 @@
<programlisting role="XML"><![CDATA[<a4j:commandLink reRender="someData" action="#{bean.action1}" value="Link"/>]]></programlisting>
<para>This definition of the component provides a link, and a click on the link causes an Ajax form
submit on the server, "action1" method performance, and rendering of the component
- with "someData" id after the response comes back from the server.</para>
+ with <emphasis><property>"someData"</property></emphasis> id after the response comes back from the server.</para>
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -79,7 +79,7 @@
element</listitem>
<listitem>Binding to scrolling components of list pages</listitem>
</itemizedlist>
- <para>It allows definition inside a facet with the "term" name to add HTML DT elements into a list.</para>
+ <para>It allows definition inside a facet with the <emphasis><property>"term"</property></emphasis> name to add HTML DT elements into a list.</para>
<para>The component is created basing on the <emphasis role="bold"><property><a4j:repeat></property></emphasis> component and as a result the component could
be partially updated with AJAX.</para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataList.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataList.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -79,7 +79,7 @@
element</listitem>
<listitem>Binding to scrolling components of list pages</listitem>
</itemizedlist>
- <para>The component has the <emphasis ><property>"type"</property></emphasis> attribute corresponding to the "ul" HTML element.</para>
+ <para>The component has the <emphasis ><property>"type"</property></emphasis> attribute corresponding to the <emphasis><property>"ul"</property></emphasis> HTML element.</para>
<para>The component is created basing on the <emphasis role="bold"><property><a4j:repeat></property></emphasis> component and as a result the component could
be partially updated with AJAX.</para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -78,7 +78,7 @@
element</listitem>
<listitem>Binding to scrolling components of list pages</listitem>
</itemizedlist>
- <para>The component has the <emphasis ><property>"type"</property></emphasis> attribute corresponding to the "ul" HTML element.</para>
+ <para>The component has the <emphasis ><property>"type"</property></emphasis> attribute corresponding to the <emphasis><property>"ul"</property></emphasis> HTML element.</para>
<para>The component is created basing on the <emphasis role="bold"><property><a4j:repeat></property></emphasis> component and as a result the component could
be partially updated with AJAX.</para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataTable.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataTable.desc.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataTable.desc.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -22,7 +22,7 @@
<title>Key Features</title>
<itemizedlist>
<listitem>A completely skinned table and child elements</listitem>
- <listitem>Possibility to insert the complex subcomponents "colGroup" and "subTable"</listitem>
+ <listitem>Possibility to insert the complex subcomponents <emphasis><property>"colGroup"</property></emphasis> and "subTable"</listitem>
<listitem>Possibility to update a limited set of strings with AJAX</listitem>
</itemizedlist>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -149,7 +149,7 @@
<tbody>
<row>
<entry>rich-table</entry>
- <entry>Applied to the "table" element</entry>
+ <entry>Applied to the <emphasis><property>"table"</property></emphasis> element</entry>
</row>
<row>
<entry>rich-table-caption</entry>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dragIndicator.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dragIndicator.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/dragIndicator.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -147,7 +147,7 @@
<section>
<title>Marker customization</title>
- <para>The macro generation "marker" can be customized depending on what a
+ <para>The macro generation <emphasis><property>"marker"</property></emphasis> can be customized depending on what a
draggable element is located over. For that you should define one of these three parameters
(specify a parameter with one of three names):</para>
<itemizedlist>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dropSupport.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dropSupport.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/dropSupport.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -121,8 +121,8 @@
...
</programlisting>
- <para>In this example, dropping a draggable item of an "iconsDragged" type
- will trigger the use a parameter named "DropIcon" in the event processing
+ <para>In this example, dropping a draggable item of an <emphasis><property>"iconsDragged"</property></emphasis> type
+ will trigger the use a parameter named <emphasis><property>"DropIcon"</property></emphasis> in the event processing
after a drop event. (Also, an Ajax request is sent, and the action and dropListener defined
for the component are called.)</para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/inputNumberSpinner.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/inputNumberSpinner.desc.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/inputNumberSpinner.desc.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -30,7 +30,7 @@
<listitem>Attribute-managed positions of the controls (inside/outside of the input field)</listitem>
<listitem>Keyboard controls support</listitem>
<listitem>Optional disablement of the component on a page</listitem>
- <listitem>Optional "cycled" mode of scrolling values</listitem>
+ <listitem>Optional <emphasis><property>"cycled"</property></emphasis> mode of scrolling values</listitem>
<listitem>Optional manual/controls-only input into a value text field</listitem>
<listitem>Validation of manual input</listitem>
</itemizedlist>
Modified: trunk/docs/userguide/en/src/main/docbook/included/inputNumberSpinner.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/inputNumberSpinner.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/inputNumberSpinner.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -100,7 +100,7 @@
<listitem>
<emphasis>
<property>"cycled"</property>
- </emphasis> if the attribute is "true" after the current value reaches the
+ </emphasis> if the attribute is <emphasis><property>"true"</property></emphasis> after the current value reaches the
border value it's be reversed to another border value after next increasing/decreasing. In
other case possibilities of next increasing/decreasing are locked </listitem>
<listitem>
@@ -217,7 +217,7 @@
<tbody>
<row>
<entry>rich-spinner-input-container</entry>
- <entry>a container for input and "inside" buttons</entry>
+ <entry>a container for input and <emphasis><property>"inside"</property></emphasis> buttons</entry>
</row>
<row>
<entry>rich-spinner-input</entry>
Modified: trunk/docs/userguide/en/src/main/docbook/included/jsFunction.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/jsFunction.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/jsFunction.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -49,7 +49,7 @@
<a4j:jsFunction data="#{bean.someProperty}" name="callScript" oncomplete="myScript(data.subProperty1, data.subProperty2)"/>
...]]>
</programlisting>
- <para> The script "myScript" will be called after
+ <para> The script <emphasis><property>"myScript"</property></emphasis> will be called after
<property>bean.someProperty</property> data will be returned from server(e.g. It'll
be object with two subproperties). </para>
</section>
@@ -103,7 +103,7 @@
<property><a4j:commandButton></property>
</emphasis>, but it could be activated from the JavaScript code. It allows to invoke some
server side functionality and use the returned data in the JavaScript function invoked from
- "oncomplete" attribute. So it's possible to use <emphasis
+ <emphasis><property>"oncomplete"</property></emphasis> attribute. So it's possible to use <emphasis
role="bold">
<property><a4j:jsFunction></property>
</emphasis> instead of <emphasis role="bold">
Modified: trunk/docs/userguide/en/src/main/docbook/included/loadScript.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/loadScript.desc.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/loadScript.desc.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -5,7 +5,7 @@
<title>Description</title>
<para>
Inserts script links to the head element. Render the value of the component as the value of
- the "src" attribute, after passing it to the getResourceURL() method of the ViewHandler for this application, and passing the result through the encodeResourceURL() method of the ExternalContext.
+ the <emphasis><property>"src"</property></emphasis> attribute, after passing it to the getResourceURL() method of the ViewHandler for this application, and passing the result through the encodeResourceURL() method of the ExternalContext.
</para>
</section>
</root>
\ No newline at end of file
Modified: trunk/docs/userguide/en/src/main/docbook/included/loadStyle.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/loadStyle.desc.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/loadStyle.desc.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -4,7 +4,7 @@
<title>Description</title>
<para>
Inserts stylesheet links to the head element. Render the value of the component as the value of
- the "src" attribute, after passing it to the getResourceURL() method of the ViewHandler for this application, and passing the result through the encodeResourceURL() method of the ExternalContext.
+ the <emphasis><property>"src"</property></emphasis> attribute, after passing it to the getResourceURL() method of the ViewHandler for this application, and passing the result through the encodeResourceURL() method of the ExternalContext.
</para>
</section>
</root>
\ No newline at end of file
Modified: trunk/docs/userguide/en/src/main/docbook/included/menuGroup.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/menuGroup.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/menuGroup.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -149,7 +149,7 @@
]]></programlisting>
<para> This would be the result: </para>
<figure>
- <title>Using the "direction" attribute</title>
+ <title>Using the <emphasis><property>"direction"</property></emphasis> attribute</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/menuGroup2.png"/>
Modified: trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -136,7 +136,7 @@
submits from this panel. </para>
</important>
- <para>It's possible to add a "header" facet to the component to set
+ <para>It's possible to add a <emphasis><property>"header"</property></emphasis> facet to the component to set
the content for the header.</para>
@@ -170,7 +170,7 @@
</mediaobject>
</figure>
- <para>A facet named "controls" can be added to the component to place control
+ <para>A facet named <emphasis><property>"controls"</property></emphasis> can be added to the component to place control
elements on a header.</para>
@@ -216,7 +216,7 @@
<property>"resizeable"</property>
</emphasis> and <emphasis>
<property>"moveable"</property>
- </emphasis> attributes to "true" or "false" values. Window
+ </emphasis> attributes to <emphasis><property>"true"</property></emphasis> or <emphasis><property>"false"</property></emphasis> values. Window
resizing is also limited by <emphasis>
<property>"minWidth"</property>
</emphasis> and <emphasis>
@@ -231,7 +231,7 @@
<programlisting role="JAVA">Richfaces.showModalPanel('panelId', {left: auto}, {param1: value1});</programlisting>
<para> Thus, except the standard modalPanel parameters you can pass any of your own parameters. </para>
<para> Also modalPanel allows to handle its own opening and closing events on the client side.
- The "onshow" and "onclose" attributes are used in this
+ The <emphasis><property>"onshow"</property></emphasis> and <emphasis><property>"onclose"</property></emphasis> attributes are used in this
case. </para>
<para> The following example shows how on the client side to define opening and closing event
handling in such a way that your own parameters could also be obtained: </para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/outputPanel.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/outputPanel.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/outputPanel.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -100,7 +100,7 @@
</listitem>
</itemizedlist>
<para>If layout="block" is chosen, the component is rendered as a pair of opening and closing <emphasis role="bold"><property><div></property></emphasis> tag, to which it’s possible to apply any available style attributes available for block tags. </para>
- <para>Layout="none" helps to avoid an unnecessary tag round a context that could or couldn't be rendered according to the defined "rendered" attribute conditions. If an inner context isn’t rendered, <emphasis role="bold">
+ <para>Layout="none" helps to avoid an unnecessary tag round a context that could or couldn't be rendered according to the defined <emphasis><property>"rendered"</property></emphasis> attribute conditions. If an inner context isn’t rendered, <emphasis role="bold">
<property><a4j:outputPanel></property>
</emphasis> is rendered as a <emphasis role="bold"><property><span></property></emphasis> tag with the id equal to an id of a child component and "display:none" style. If a child component is rendered, <emphasis role="bold">
<property><a4j:outputPanel></property>
Modified: trunk/docs/userguide/en/src/main/docbook/included/paint2D.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/paint2D.desc.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/paint2D.desc.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -7,8 +7,8 @@
</sectioninfo>
<section>
<title>Description</title>
- <para>Create image by painting from a managed bean method, same as "paint" (Graphics2D)
- in "SWING" components. </para>
+ <para>Create image by painting from a managed bean method, same as <emphasis><property>"paint"</property></emphasis> (Graphics2D)
+ in <emphasis><property>"SWING"</property></emphasis> components. </para>
<figure>
<title>Paint2D component</title>
<mediaobject>
@@ -23,8 +23,8 @@
<itemizedlist>
<listitem>Simple Graphics2D - painting style directly on the Web page</listitem>
<listitem>Supports client/server caching for generated images</listitem>
- <listitem>Fully supports "JPEG" (24-bit, default), "GIF" (8-bit with
- transparency), and "PNG" (32-bit with transparency)
+ <listitem>Fully supports <emphasis><property>"JPEG"</property></emphasis> (24-bit, default), <emphasis><property>"GIF"</property></emphasis> (8-bit with
+ transparency), and <emphasis><property>"PNG"</property></emphasis> (32-bit with transparency)
formats for sending generated images</listitem>
<listitem>Easily customizable borders and white space to wrap the image</listitem>
<listitem>Dynamically settable paint parameters using tag attributes</listitem>
Modified: trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -171,7 +171,7 @@
opening another one. See the picture below.</para>
<figure>
- <title>Using the "expandSingle" attribute</title>
+ <title>Using the <emphasis><property>"expandSingle"</property></emphasis> attribute</title>
<mediaobject>
<imageobject>
Modified: trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -178,7 +178,7 @@
<para> As the result the picture is shown below:</para>
<figure>
- <title>Using an "icon" attribute</title>
+ <title>Using an <emphasis><property>"icon"</property></emphasis> attribute</title>
<mediaobject>
<imageobject>
Modified: trunk/docs/userguide/en/src/main/docbook/included/region.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/region.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/region.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -52,7 +52,7 @@
</section>
<section>
<title>Key attributes and ways of usage</title>
- <para>The region is a component used for manipulation with components sent to the server. It sets particular processing parameters for an area on the server, i.e. the region deals with data input on the server and has no direct impact on output. To read more on the components responsible for out, see "reference"
+ <para>The region is a component used for manipulation with components sent to the server. It sets particular processing parameters for an area on the server, i.e. the region deals with data input on the server and has no direct impact on output. To read more on the components responsible for out, see <emphasis><property>"reference"</property></emphasis>
</para>
<para>The region marks an area page that is decoded on the server. In most cases it is not necessary to use the region, as ViewRoot is a default region. This component helps to reduce data quantity processed by the server, but the region doesn't influence on the standard submission rules. It means that:<itemizedlist>
<listitem>
@@ -85,7 +85,7 @@
<!--..Some content that will be decoded on server after Ajax request.-->
</a4j:region >]]></programlisting>
<para>Therefore, the external region is decoded for the "link1" and the internal one is decoded for the "link2".</para>
- <para>Ajax4jsf allows setting Ajax responses rendering directly basing on component tree nodes without referring to the JSP (XHTML) page code. It could be defined by selfRendered attribute setting to "true" on <emphasis role="bold">
+ <para>Ajax4jsf allows setting Ajax responses rendering directly basing on component tree nodes without referring to the JSP (XHTML) page code. It could be defined by selfRendered attribute setting to <emphasis><property>"true"</property></emphasis> on <emphasis role="bold">
<property><a4j:region></property>
</emphasis> and could help considerably speed up a response output. However, this rapid processing could cause missing of transient components that present on view and don't come into a component tree as well as omitting of <emphasis role="bold">
<property><a4j:outputPanel></property>
@@ -100,7 +100,7 @@
<para>The processing could be also accelerated if a region decoded for the processing passes straight away into Encode. But to update some data out of the region or on another region, use the <emphasis >
<property>"renderRegionOnly"</property>
</emphasis>
-attribute set to "false" ("true on default") to change this behaviour.</para>
+attribute set to <emphasis><property>"false"</property></emphasis> ("true on default") to change this behaviour.</para>
<para><emphasis role="bold">Example:</emphasis></para>
<programlisting role="XML"><![CDATA[<a4j:region renderRegionOnly="true">
<a4j:commandLink reRender="someID2" value="Link1" id="link1"/>
Modified: trunk/docs/userguide/en/src/main/docbook/included/repeat.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/repeat.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/repeat.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -41,7 +41,7 @@
</a4j:repeat>]]></programlisting>
<para>The output is generated according to a collection contained in <emphasis >
<property>"bean.props"</property>
- </emphasis> with the "detail" key passed to child components.</para>
+ </emphasis> with the <emphasis><property>"detail"</property></emphasis> key passed to child components.</para>
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
Modified: trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.desc.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.desc.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -25,7 +25,7 @@
<title>Key Features</title>
<itemizedlist>
<listitem>Fully skinnable component</listitem>
- <listitem>Adds "onkeypress" suggestions capabilities to any input text component</listitem>
+ <listitem>Adds <emphasis><property>"onkeypress"</property></emphasis> suggestions capabilities to any input text component</listitem>
<listitem>Performs suggestion via Ajax requests without any line of JavaScript code written
by a user</listitem>
<listitem>Possible to render table as a popup suggestion</listitem>
Modified: trunk/docs/userguide/en/src/main/docbook/included/support.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/support.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/support.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -44,7 +44,7 @@
</h:inputText>
<h:outputText id="repeater" value="#{bean.text}"/>]]></programlisting>
<para>On every keyup event generated by an input field, a form is submitted on the server with the help of Ajax and
- on a response coming from the server, element with "repeater" id, founded in a DOM tree is
+ on a response coming from the server, element with <emphasis><property>"repeater"</property></emphasis> id, founded in a DOM tree is
redrawn according to a new data from the response.</para>
</section>
<section>
@@ -145,7 +145,7 @@
</h:inputText>
<h:outputText value="#{person.name}" id="test"/>
</form>]]></programlisting>
- <para>This example clearly shows mentioned <ulink url="index.html#support">above</ulink> attributes. If quick typing in a text field happens, every next requests sending is delayed for a second and requests quantity is reduced. The requests are kept in the queue "myQueue" till its the sending.
+ <para>This example clearly shows mentioned <ulink url="index.html#support">above</ulink> attributes. If quick typing in a text field happens, every next requests sending is delayed for a second and requests quantity is reduced. The requests are kept in the queue" till its the sending.
Moreover, if the next request is already sent, the rerendering after the previous request is banned, and
it helps to avoid unnecessary processing on the client.</para>
</listitem>
Modified: trunk/docs/userguide/en/src/main/docbook/included/toggleControl.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/toggleControl.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/toggleControl.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -78,7 +78,7 @@
><property>"for"</property></emphasis> attribute (in the <emphasis
-><property>"for"</property></emphasis> attribute the full component "id" is specified according to naming
+><property>"for"</property></emphasis> attribute the full component <emphasis><property>"id"</property></emphasis> is specified according to naming
containers).</para>
<para>The <property>togglePanel</property> could be also switched from the side of the control instead of being strictly defined
in <emphasis
Modified: trunk/docs/userguide/en/src/main/docbook/included/toolBar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/toolBar.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/toolBar.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -87,7 +87,7 @@
</itemizedlist>
<para>For example, when setting a separator of a disc type, the following result is produced:</para>
<figure>
- <title>Toolbar with a "disc" separator</title>
+ <title>Toolbar with a <emphasis><property>"disc"</property></emphasis> separator</title>
<mediaobject>
<imageobject>
Modified: trunk/docs/userguide/en/src/main/docbook/included/tooltip.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tooltip.xml 2007-08-23 13:49:28 UTC (rev 2435)
+++ trunk/docs/userguide/en/src/main/docbook/included/tooltip.xml 2007-08-23 14:38:15 UTC (rev 2436)
@@ -126,7 +126,7 @@
offsets relatively to mouse position.
</para>
<para>
-<property>Tooltip</property> appears attached to the corner dependent on "direction" attribute. By default it is positioned bottom-right.
+<property>Tooltip</property> appears attached to the corner dependent on <emphasis><property>"direction"</property></emphasis> attribute. By default it is positioned bottom-right.
<property>Tooltip</property> activation occurs after defined event (default=mouseover) on the parent component taking into consideration
"delay" attribute (default=0) or after calling JS API function doShow(). <property>Tooltip</property> deactivation occurs after mouseout event
on the parent component (except mouse hovered the <property>tooltip</property> itself) or after calling JS API function doHide().
@@ -138,7 +138,7 @@
</note>
<para>
-The "mode" attribute is provided to developer to control the way of data loading to <property>tooltip</property> and has following values:
+The <emphasis><property>"mode"</property></emphasis> attribute is provided to developer to control the way of data loading to <property>tooltip</property> and has following values:
<itemizedlist>
<listitem>Client</listitem>
<listitem>Ajax</listitem>
@@ -240,7 +240,7 @@
<section>
<title>Definition custom style classes:</title>
<para>
- <property>Tooltip</property> provides one class "rich-tool-tip" which applies to wrapper element "span" or "div"
+ <property>Tooltip</property> provides one class "rich-tool-tip" which applies to wrapper element <emphasis><property>"span"</property></emphasis> or "div"
dependently to <property>tooltip</property> layout. In order to redefine style for all <property>tooltips</property>
on the page with using CSS it's enough to create classes with this name and define in it necessary properties.
To change style peculiarities of the particular <property>tooltips</property>, define your own style classes in the corresponding
18 years, 8 months
JBoss Rich Faces SVN: r2435 - trunk/test-applications/jsp/src/main/webapp/SuggestionBox.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-08-23 09:49:28 -0400 (Thu, 23 Aug 2007)
New Revision: 2435
Modified:
trunk/test-applications/jsp/src/main/webapp/SuggestionBox/SuggestionBox.jsp
Log:
update
Modified: trunk/test-applications/jsp/src/main/webapp/SuggestionBox/SuggestionBox.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/SuggestionBox/SuggestionBox.jsp 2007-08-23 13:46:39 UTC (rev 2434)
+++ trunk/test-applications/jsp/src/main/webapp/SuggestionBox/SuggestionBox.jsp 2007-08-23 13:49:28 UTC (rev 2435)
@@ -3,8 +3,8 @@
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<html>
+<f:view>
<f:subview id="suggestionBoxID">
-<f:view>
<h:form id="suggestionbox_form">
<f:verbatim>Suggestion Box will suggest you Town's names if it's started with the "a" or
@@ -126,6 +126,6 @@
</h:panelGrid>
<h:commandLink value="Back" action="main"></h:commandLink>
</h:form>
+</f:subview>
</f:view>
-</f:subview>
</html>
18 years, 8 months
JBoss Rich Faces SVN: r2434 - in trunk/ui: inputnumber-spinner/src/main/java/org/richfaces/renderkit/html/images/buttons and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-08-23 09:46:39 -0400 (Thu, 23 Aug 2007)
New Revision: 2434
Modified:
trunk/ui/calendar/src/main/java/org/richfaces/renderkit/html/iconimages/CalendarIcon.java
trunk/ui/inputnumber-spinner/src/main/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImage.java
trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/images/MenuNodeImage.java
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/iconimages/ScrollableDataTableIconBasic.java
trunk/ui/separator/src/main/java/org/richfaces/renderkit/html/images/BevelSeparatorImage.java
trunk/ui/separator/src/main/java/org/richfaces/renderkit/html/images/SimpleSeparatorImage.java
trunk/ui/toolBar/src/main/java/org/richfaces/renderkit/html/images/ToolBarSeparatorImage.java
Log:
done task RF-665
Modified: trunk/ui/calendar/src/main/java/org/richfaces/renderkit/html/iconimages/CalendarIcon.java
===================================================================
--- trunk/ui/calendar/src/main/java/org/richfaces/renderkit/html/iconimages/CalendarIcon.java 2007-08-23 13:45:18 UTC (rev 2433)
+++ trunk/ui/calendar/src/main/java/org/richfaces/renderkit/html/iconimages/CalendarIcon.java 2007-08-23 13:46:39 UTC (rev 2434)
@@ -40,7 +40,6 @@
import org.ajax4jsf.resource.Java2Dresource;
import org.ajax4jsf.resource.ResourceContext;
import org.ajax4jsf.util.HtmlColor;
-import org.ajax4jsf.util.Zipper;
import org.ajax4jsf.util.Zipper2;
import org.richfaces.skin.Skin;
import org.richfaces.skin.SkinFactory;
@@ -87,6 +86,10 @@
if (null == headerTextColor || "".equals(headerTextColor))
headerTextColor = (String) defaultSkin.getParameter(context, skinParameter);
+ if (headerTextColor == null) {
+ return null;
+ }
+
byte[] ret = new byte[6];
Zipper2 zipper2 = new Zipper2(ret).addColor(HtmlColor.decode(headerTextColor).getRGB());
@@ -95,98 +98,112 @@
if (null == headerBackgroundColor || "".equals(headerBackgroundColor))
headerBackgroundColor = (String) defaultSkin.getParameter(context, skinParameter);
+ if(headerBackgroundColor == null){
+ return null;
+ }
+
zipper2.addColor(HtmlColor.decode(headerBackgroundColor).getRGB());
return ret;
}
protected Object deserializeData(byte[] objectArray) {
+ if (objectArray == null) {
+ return null;
+ }
+
Object[] colors = new Object[2];
Zipper2 z = new Zipper2(objectArray);
colors[0] = z.nextColor();
colors[1] = z.nextColor();
+
return colors;
}
public void paint(ResourceContext context, Graphics2D graphics) {
Object[] stored = (Object[]) restoreData(context);
- Dimension dim = getDimensions(context);
- BufferedImage image = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
- Graphics2D g2d = image.createGraphics();
+ if (stored != null) {
- Color borderColor = (Color) stored[0];//new Color(((Integer) stored[0]).intValue());
- Color activeColor = (Color) stored[1];//new Color(((Integer) stored[1]).intValue());
-
+ Dimension dim = getDimensions(context);
+ BufferedImage image = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ Graphics2D g2d = image.createGraphics();
+
+ Color borderColor = (Color) stored[0];//new Color(((Integer) stored[0]).intValue());
+ Color activeColor = (Color) stored[1];//new Color(((Integer) stored[1]).intValue());
+
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+
+ g2d.setStroke(new BasicStroke(1));
+
+ int w = 16;
+ int h = 16;
+
+
+ //Draw Border
+ g2d.setColor(borderColor);
+ Rectangle2D border = new Rectangle2D.Double(1, 1, w - 3, h - 3);
+ RoundRectangle2D round = new RoundRectangle2D.Double(1, 1, w- 3, h - 3, 2, 2);
+ g2d.draw(round);
+
+ Color lightBlue = new Color(216, 226, 240);
+ Paint gradient1 = new GradientPaint(w-4, h-4, lightBlue, 2, 2, Color.white);
+ g2d.setPaint(gradient1);
+ border = new Rectangle2D.Double(2, 2, w - 4, h - 4);
+ g2d.fill(border);
+
+ border = new Rectangle2D.Double(3, 3, w - 6, h - 6);
+ gradient1 = new GradientPaint(3, 3, lightBlue , w - 6, h - 6, borderColor);
+ g2d.setPaint(gradient1);
+ g2d.fill(border);
+
+ g2d.setColor(Color.white);
+ g2d.drawLine(3, 6, 3, 11);
+ g2d.drawLine(5, 6, 5, 11);
+ g2d.drawLine(7, 6, 7, 11);
+ g2d.drawLine(9, 6, 9, 11);
+ g2d.drawLine(11, 6, 11, 11);
+
+
+
+
+
+ //Draw orange rectangle
+ border = new Rectangle2D.Double(3, 3, 10, 3);
+ g2d.setColor(Color.white);
+ g2d.fill(border);
+
+ Color c = new Color(activeColor.getRed(), activeColor.getGreen(), activeColor.getBlue(), 100);
+ Color c2 = new Color(activeColor.getRed(), activeColor.getGreen(), activeColor.getBlue(), 200);
+
+ gradient1 = new GradientPaint(12, 4, activeColor, 4, 7, c2);
+ g2d.setPaint(gradient1);
+ g2d.fill(border);
+ //g2d.setColor(activeColor);
+
+ c = new Color(activeColor.getRed(), activeColor.getGreen(), activeColor.getBlue(), 150);
+ c2 = new Color(activeColor.getRed(), activeColor.getGreen(), activeColor.getBlue(), 200);
+ border = new Rectangle2D.Double(4, 4, 8, 1);
+
+ g2d.setColor(Color.white);
+ g2d.fill(border);
+
+ gradient1 = new GradientPaint(4, 4, c, 10, 4, c2);
+ //g2d.setPaint(gradient1);
+ g2d.setColor(c);
+ g2d.fill(border);
+
+ g2d.dispose();
+
+ graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+ graphics.drawImage(image, 0, 0, dim.width, dim.height, null);
+
+ }
- g2d.setStroke(new BasicStroke(1));
-
- int w = 16;
- int h = 16;
-
-
- //Draw Border
- g2d.setColor(borderColor);
- Rectangle2D border = new Rectangle2D.Double(1, 1, w - 3, h - 3);
- RoundRectangle2D round = new RoundRectangle2D.Double(1, 1, w- 3, h - 3, 2, 2);
- g2d.draw(round);
-
- Color lightBlue = new Color(216, 226, 240);
- Paint gradient1 = new GradientPaint(w-4, h-4, lightBlue, 2, 2, Color.white);
- g2d.setPaint(gradient1);
- border = new Rectangle2D.Double(2, 2, w - 4, h - 4);
- g2d.fill(border);
-
- border = new Rectangle2D.Double(3, 3, w - 6, h - 6);
- gradient1 = new GradientPaint(3, 3, lightBlue , w - 6, h - 6, borderColor);
- g2d.setPaint(gradient1);
- g2d.fill(border);
-
- g2d.setColor(Color.white);
- g2d.drawLine(3, 6, 3, 11);
- g2d.drawLine(5, 6, 5, 11);
- g2d.drawLine(7, 6, 7, 11);
- g2d.drawLine(9, 6, 9, 11);
- g2d.drawLine(11, 6, 11, 11);
-
-
-
-
-
- //Draw orange rectangle
- border = new Rectangle2D.Double(3, 3, 10, 3);
- g2d.setColor(Color.white);
- g2d.fill(border);
-
- Color c = new Color(activeColor.getRed(), activeColor.getGreen(), activeColor.getBlue(), 100);
- Color c2 = new Color(activeColor.getRed(), activeColor.getGreen(), activeColor.getBlue(), 200);
-
- gradient1 = new GradientPaint(12, 4, activeColor, 4, 7, c2);
- g2d.setPaint(gradient1);
- g2d.fill(border);
- //g2d.setColor(activeColor);
-
- c = new Color(activeColor.getRed(), activeColor.getGreen(), activeColor.getBlue(), 150);
- c2 = new Color(activeColor.getRed(), activeColor.getGreen(), activeColor.getBlue(), 200);
- border = new Rectangle2D.Double(4, 4, 8, 1);
-
- g2d.setColor(Color.white);
- g2d.fill(border);
-
- gradient1 = new GradientPaint(4, 4, c, 10, 4, c2);
- //g2d.setPaint(gradient1);
- g2d.setColor(c);
- g2d.fill(border);
-
- g2d.dispose();
-
- graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
- graphics.drawImage(image, 0, 0, dim.width, dim.height, null);
-
}
}
Modified: trunk/ui/inputnumber-spinner/src/main/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImage.java
===================================================================
--- trunk/ui/inputnumber-spinner/src/main/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImage.java 2007-08-23 13:45:18 UTC (rev 2433)
+++ trunk/ui/inputnumber-spinner/src/main/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImage.java 2007-08-23 13:46:39 UTC (rev 2434)
@@ -41,6 +41,10 @@
}
protected Object deserializeData(byte[] objectArray) {
+ if (objectArray == null) {
+ return null;
+ }
+
return new Integer(new Zipper2(objectArray).nextIntColor());
}
@@ -48,15 +52,16 @@
Skin skin = SkinFactory.getInstance().getSkin(context);
String skinParameter = "headerTextColor";
- String tmp = (String) skin.getParameter(context, skinParameter);
- if (null == tmp || "".equals(tmp)) {
+ String headerTextColor = (String) skin.getParameter(context, skinParameter);
+ if (null == headerTextColor || "".equals(headerTextColor)) {
Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
- tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ headerTextColor = (String) defaultSkin.getParameter(context, skinParameter);
}
- int intValue = HtmlColor.decode( tmp ==null? "#000000":tmp ).getRGB();
+ int intValue = HtmlColor.decode( headerTextColor == null ? "#000000":headerTextColor ).getRGB();
byte[] ret = new byte[3];
new Zipper2(ret).addColor(intValue);
+
return ret;
}
Modified: trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/images/MenuNodeImage.java
===================================================================
--- trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/images/MenuNodeImage.java 2007-08-23 13:45:18 UTC (rev 2433)
+++ trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/images/MenuNodeImage.java 2007-08-23 13:46:39 UTC (rev 2434)
@@ -14,7 +14,6 @@
import org.ajax4jsf.resource.Java2Dresource;
import org.ajax4jsf.resource.ResourceContext;
import org.ajax4jsf.util.HtmlColor;
-import org.ajax4jsf.util.Zipper;
import org.ajax4jsf.util.Zipper2;
import org.richfaces.skin.Skin;
import org.richfaces.skin.SkinFactory;
@@ -36,10 +35,15 @@
}
protected Object deserializeData(byte[] objectArray) {
+ if (objectArray == null) {
+ return null;
+ }
+
MenuNodeImageData mnd = new MenuNodeImageData();
Zipper2 zipper2 = new Zipper2(objectArray);
mnd.setGeneralColor(new Integer(zipper2.nextIntColor()));
mnd.setDisabledColor(new Integer(zipper2.nextIntColor()));
+
return mnd;
}
@@ -52,11 +56,14 @@
String skinParameter = "generalTextColor";
tmp = (String) skin.getParameter(context, skinParameter);
+
if (null == tmp || "".equals(tmp)) {
tmp = (String) defaultSkin.getParameter(context, skinParameter);
}
+
if (tmp == null || "".equals(tmp))
tmp = "#4A75B5";
+
intValue = HtmlColor.decode(tmp).getRGB();
byte[] ret = new byte[6];
@@ -78,24 +85,30 @@
protected void paint(ResourceContext context, Graphics2D g2d) {
MenuNodeImageData mnd = (MenuNodeImageData) restoreData(context);
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- int x0 = 6;
- int y0 = 8;
-
- g2d.setColor(new Color(mnd.getGeneralColor().intValue()));
- g2d.drawLine(x0, y0 - 3, x0, y0 +3);
- g2d.drawLine(x0 + 1, y0 - 2, x0 + 1, y0 + 2);
- g2d.drawLine(x0 + 2, y0 - 1, x0 + 2, y0 + 1);
- g2d.drawLine(x0 + 3, y0, x0 + 3, y0);
-
- int y1 = 24;
-
- g2d.setColor(new Color(mnd.getDisabledColor().intValue()));
- g2d.drawLine(x0, y1 - 3, x0, y1 +3);
- g2d.drawLine(x0 + 1, y1 - 2, x0 + 1, y1 + 2);
- g2d.drawLine(x0 + 2, y1 - 1, x0 + 2, y1 + 1);
- g2d.drawLine(x0 + 3, y1, x0 + 3, y1);
+ if (mnd != null) {
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+
+ int x0 = 6;
+ int y0 = 8;
+
+ g2d.setColor(new Color(mnd.getGeneralColor().intValue()));
+ g2d.drawLine(x0, y0 - 3, x0, y0 +3);
+ g2d.drawLine(x0 + 1, y0 - 2, x0 + 1, y0 + 2);
+ g2d.drawLine(x0 + 2, y0 - 1, x0 + 2, y0 + 1);
+ g2d.drawLine(x0 + 3, y0, x0 + 3, y0);
+
+ int y1 = 24;
+
+ g2d.setColor(new Color(mnd.getDisabledColor().intValue()));
+ g2d.drawLine(x0, y1 - 3, x0, y1 +3);
+ g2d.drawLine(x0 + 1, y1 - 2, x0 + 1, y1 + 2);
+ g2d.drawLine(x0 + 2, y1 - 1, x0 + 2, y1 + 1);
+ g2d.drawLine(x0 + 3, y1, x0 + 3, y1);
+
+ }
+
}
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/iconimages/ScrollableDataTableIconBasic.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/iconimages/ScrollableDataTableIconBasic.java 2007-08-23 13:45:18 UTC (rev 2433)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/iconimages/ScrollableDataTableIconBasic.java 2007-08-23 13:46:39 UTC (rev 2434)
@@ -30,9 +30,14 @@
}
protected Object deserializeData(byte[] objectArray) {
+ if (objectArray == null) {
+ return null;
+ }
+
Object [] stored = new Object[2];
stored[0] = new Color(Zipper.unzip(objectArray, 0));
stored[1] = new Color(Zipper.unzip(objectArray, 3));
+
return stored;
}
@@ -49,6 +54,11 @@
String headerTextColor = (String) skin.getParameter(context, skinParameter);
if (null == headerTextColor || "".equals(headerTextColor))
headerTextColor = (String) defaultSkin.getParameter(context, skinParameter);
+
+ if (headerTextColor == null) {
+ return null;
+ }
+
col = HtmlColor.decode(headerTextColor);
byte[] ret = new byte[6];
@@ -58,6 +68,11 @@
String headerBackgroundColor = (String) skin.getParameter(context, skinParameter);
if (null == headerBackgroundColor || "".equals(headerBackgroundColor))
headerBackgroundColor = (String) defaultSkin.getParameter(context, skinParameter);
+
+ if (headerBackgroundColor == null) {
+ return null;
+ }
+
col = HtmlColor.decode(headerBackgroundColor);
Zipper.zip(ret, col.getRGB(), 3);
Modified: trunk/ui/separator/src/main/java/org/richfaces/renderkit/html/images/BevelSeparatorImage.java
===================================================================
--- trunk/ui/separator/src/main/java/org/richfaces/renderkit/html/images/BevelSeparatorImage.java 2007-08-23 13:45:18 UTC (rev 2433)
+++ trunk/ui/separator/src/main/java/org/richfaces/renderkit/html/images/BevelSeparatorImage.java 2007-08-23 13:46:39 UTC (rev 2434)
@@ -39,7 +39,6 @@
import org.ajax4jsf.resource.ResourceContext;
import org.ajax4jsf.util.HtmlColor;
import org.ajax4jsf.util.HtmlDimensions;
-import org.ajax4jsf.util.Zipper;
import org.ajax4jsf.util.Zipper2;
import org.richfaces.component.UISeparator;
import org.richfaces.skin.Skin;
@@ -69,73 +68,83 @@
protected void paint(ResourceContext context, Graphics2D g2d) {
SeparatorData stored = (SeparatorData) restoreData(context);
- Color bg = new Color(stored.getBgColor());
- Color grad = new Color(stored.getGradColor());
- float [] grads = grad.getRGBComponents(null);
- int level3D = (stored.getLevel3D());
- Dimension dim = calculateDimensions(stored);
- float height = (float) dim.getHeight();
- float width = (float) dim.getWidth();
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
-
- Rectangle2D rect = new Rectangle2D.Double(0.0, 0.0, width, height);
- g2d.setColor(bg);
- g2d.fill(rect);
-
- if (level3D > 0) {
- g2d.translate(0d, height / 18d);
- // Vertical cradient.
- float verticalOpacity = ((float) (level3D + 1) * 0.1f);
- if (verticalOpacity < 0) {
- verticalOpacity = 0;
- } else if (verticalOpacity > 1) {
- verticalOpacity = 1;
- }
- g2d.setPaint(
- new GradientPaint(
- width / 2,
- 0f,
- new Color(
- grads[0],
- grads[1],
- grads[2],
- verticalOpacity),
- width / 2,
- height / 2,
- new Color(
- 1f,
- 1f,
- 1f,
- 0f)));
- g2d.fill(rect);
- verticalOpacity = ((float) (level3D - 1) * 0.1f);
- if (verticalOpacity < 0) {
- verticalOpacity = 0;
- } else if (verticalOpacity > 1) {
- verticalOpacity = 1;
- }
- //XXX by nick - fantonov - get rid of get*() - store values in local var
- g2d.setPaint(new GradientPaint(width / 2, height / 2, new Color(1f, 1f, 1f, 0f),
- width / 2, height * 0.75f, new Color(grads[0], grads[1], grads[2], verticalOpacity), true));
- Shape currentClip = g2d.getClip();
- Rectangle2D.Double clipRect = new Rectangle2D.Double(0, height / 2, width * 2, height);
- g2d.setClip(clipRect);
- g2d.fill(rect);
- g2d.setClip(currentClip);
+
+ if(stored != null) {
+
+ Color bg = new Color(stored.getBgColor());
+ Color grad = new Color(stored.getGradColor());
+ float [] grads = grad.getRGBComponents(null);
+ int level3D = (stored.getLevel3D());
+ Dimension dim = calculateDimensions(stored);
+ float height = (float) dim.getHeight();
+ float width = (float) dim.getWidth();
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
+
+ Rectangle2D rect = new Rectangle2D.Double(0.0, 0.0, width, height);
+ g2d.setColor(bg);
+ g2d.fill(rect);
+
+ if (level3D > 0) {
+ g2d.translate(0d, height / 18d);
+ // Vertical cradient.
+ float verticalOpacity = ((float) (level3D + 1) * 0.1f);
+ if (verticalOpacity < 0) {
+ verticalOpacity = 0;
+ } else if (verticalOpacity > 1) {
+ verticalOpacity = 1;
+ }
+ g2d.setPaint(
+ new GradientPaint(
+ width / 2,
+ 0f,
+ new Color(
+ grads[0],
+ grads[1],
+ grads[2],
+ verticalOpacity),
+ width / 2,
+ height / 2,
+ new Color(
+ 1f,
+ 1f,
+ 1f,
+ 0f)));
+ g2d.fill(rect);
+ verticalOpacity = ((float) (level3D - 1) * 0.1f);
+ if (verticalOpacity < 0) {
+ verticalOpacity = 0;
+ } else if (verticalOpacity > 1) {
+ verticalOpacity = 1;
+ }
+ //XXX by nick - fantonov - get rid of get*() - store values in local var
+ g2d.setPaint(new GradientPaint(width / 2, height / 2, new Color(1f, 1f, 1f, 0f),
+ width / 2, height * 0.75f, new Color(grads[0], grads[1], grads[2], verticalOpacity), true));
+ Shape currentClip = g2d.getClip();
+ Rectangle2D.Double clipRect = new Rectangle2D.Double(0, height / 2, width * 2, height);
+ g2d.setClip(clipRect);
+ g2d.fill(rect);
+ g2d.setClip(currentClip);
+ }
+
}
}
protected Object deserializeData(byte[] objectArray) {
+ if (objectArray == null) {
+ return null;
+ }
+
SeparatorData separatorData = new SeparatorData();
Zipper2 zipper2 = new Zipper2(objectArray);
separatorData.setHeight(zipper2.nextShort());
separatorData.setLevel3D(zipper2.nextShort());
separatorData.setBgColor(zipper2.nextIntColor());
separatorData.setGradColor(zipper2.nextIntColor());
+
return separatorData;
}
Modified: trunk/ui/separator/src/main/java/org/richfaces/renderkit/html/images/SimpleSeparatorImage.java
===================================================================
--- trunk/ui/separator/src/main/java/org/richfaces/renderkit/html/images/SimpleSeparatorImage.java 2007-08-23 13:45:18 UTC (rev 2433)
+++ trunk/ui/separator/src/main/java/org/richfaces/renderkit/html/images/SimpleSeparatorImage.java 2007-08-23 13:46:39 UTC (rev 2434)
@@ -37,7 +37,6 @@
import org.ajax4jsf.resource.ResourceContext;
import org.ajax4jsf.util.HtmlColor;
import org.ajax4jsf.util.HtmlDimensions;
-import org.ajax4jsf.util.Zipper;
import org.ajax4jsf.util.Zipper2;
import org.richfaces.component.UISeparator;
import org.richfaces.skin.Skin;
@@ -106,11 +105,16 @@
}
protected Object deserializeData(byte[] objectArray) {
+ if(objectArray == null){
+ return null;
+ }
+
SimpleSeparatorData separatorData = new SimpleSeparatorData();
Zipper2 zipper2 = new Zipper2(objectArray);
separatorData.setHeight(zipper2.nextShort());
separatorData.setColor(zipper2.nextIntColor());
separatorData.setLineType(zipper2.nextByte());
+
return separatorData;
}
Modified: trunk/ui/toolBar/src/main/java/org/richfaces/renderkit/html/images/ToolBarSeparatorImage.java
===================================================================
--- trunk/ui/toolBar/src/main/java/org/richfaces/renderkit/html/images/ToolBarSeparatorImage.java 2007-08-23 13:45:18 UTC (rev 2433)
+++ trunk/ui/toolBar/src/main/java/org/richfaces/renderkit/html/images/ToolBarSeparatorImage.java 2007-08-23 13:46:39 UTC (rev 2434)
@@ -50,6 +50,10 @@
}
protected Object deserializeData(byte[] objectArray) {
+ if (objectArray == null) {
+ return null;
+ }
+
SeparatorData separatorData = new SeparatorData();
Zipper2 zipper2 = new Zipper2(objectArray);
separatorData.setHeaderBackgroundColor(zipper2.nextIntColor());
18 years, 8 months
JBoss Rich Faces SVN: r2433 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkukharchuk
Date: 2007-08-23 09:45:18 -0400 (Thu, 23 Aug 2007)
New Revision: 2433
Modified:
trunk/docs/userguide/en/src/main/docbook/included/effect.xml
Log:
http://jira.jboss.com/jira/browse/RF-639
Modified: trunk/docs/userguide/en/src/main/docbook/included/effect.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/effect.xml 2007-08-23 13:40:40 UTC (rev 2432)
+++ trunk/docs/userguide/en/src/main/docbook/included/effect.xml 2007-08-23 13:45:18 UTC (rev 2433)
@@ -162,4 +162,10 @@
</para>
</section>
+ <section>
+ <title>Relevant resources links</title>
+ <para>
+ <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/effect.jsf?c=effect">Here</ulink>
+ you can see the example of <emphasis role="bold"><rich:effect></emphasis> usage. </para>
+ </section>
</section>
18 years, 8 months
JBoss Rich Faces SVN: r2432 - in trunk/ui/panelmenu/src: test/java/org/richfaces/renderkit/html/iconimages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-08-23 09:40:40 -0400 (Thu, 23 Aug 2007)
New Revision: 2432
Added:
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java
Modified:
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java
trunk/ui/panelmenu/src/test/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasicTest.java
Log:
done task RF-665, move abundant code to basic abstract classes
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java 2007-08-23 13:38:14 UTC (rev 2431)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java 2007-08-23 13:40:40 UTC (rev 2432)
@@ -42,7 +42,7 @@
* @author Pavel Kotikov
*
*/
-public class PanelMenuIconBasic extends Java2Dresource {
+public abstract class PanelMenuIconBasic extends Java2Dresource {
public PanelMenuIconBasic() {
setRenderer(new GifRenderer());
@@ -57,15 +57,29 @@
return calculateDimensions(restoreData(resourceContext));
}
- protected void paint(ResourceContext context, Graphics2D g2d) {
-
+ protected void paint(ResourceContext context, Graphics2D graphics2D) {
+
+ Color color = (Color) restoreData(context);
+
+ if(color != null && graphics2D != null) {
+ paintImage(context, graphics2D, color);
+ }
+
}
+ abstract protected void paintImage(ResourceContext context, Graphics2D g2d, Color color);
+
+
protected Dimension calculateDimensions(Object data){
return new Dimension(16, 16);
}
protected Object deserializeData(byte[] objectArray) {
+
+ if (objectArray == null) {
+ return null;
+ }
+
return new Zipper2(objectArray).nextColor();
}
@@ -78,19 +92,24 @@
byte[] ret = new byte[3];
- Color col = null;
+ Color color = null;
if (data!=null){
- col = HtmlColor.decode(data.toString());
+ color = HtmlColor.decode(data.toString());
} else {
String skinParameter = "headerTextColor";
String headerTextColor = (String) skin.getParameter(context, skinParameter);
if (null == headerTextColor || "".equals(headerTextColor))
headerTextColor = (String) defaultSkin.getParameter(context, skinParameter);
- col = HtmlColor.decode(headerTextColor);
+
+ if(headerTextColor == null) {
+ return null;
+ }
+
+ color = HtmlColor.decode(headerTextColor);
}
- new Zipper2(ret).addColor(col);
+ new Zipper2(ret).addColor(color);
return ret;
}
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java 2007-08-23 13:38:14 UTC (rev 2431)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java 2007-08-23 13:40:40 UTC (rev 2432)
@@ -21,42 +21,14 @@
package org.richfaces.renderkit.html.iconimages;
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.AffineTransform;
import java.awt.geom.GeneralPath;
-import java.awt.image.AffineTransformOp;
-import java.awt.image.BufferedImage;
-import org.ajax4jsf.resource.ResourceContext;
-public class PanelMenuIconChevron extends PanelMenuIconBasic {
+public class PanelMenuIconChevron extends PanelMenuIconChevronBasic {
- protected void paint(ResourceContext context, Graphics2D graphics2d) {
+ protected void draw(GeneralPath path) {
- BufferedImage bufferedImage = new BufferedImage(128, 128, BufferedImage.TYPE_INT_ARGB);
- Graphics2D g2d = bufferedImage.createGraphics();
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
- g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE);
- g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
- g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
- Dimension dimension = getDimensions(context);
- GeneralPath path = new GeneralPath();
- g2d.setStroke(new BasicStroke(1,BasicStroke.CAP_BUTT,BasicStroke.JOIN_MITER));
- g2d.translate(28,28);
- Color col = (Color) restoreData(context);
-
- g2d.setColor(col);
-
path.moveTo(1,1);
path.lineTo(17,1);
path.lineTo(47,31);
@@ -64,17 +36,7 @@
path.lineTo(1,61);
path.lineTo(31,31);
path.closePath();
- g2d.fill(path);
- g2d.translate(24,0);
-
- g2d.fill(path);
-
- AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight()/128, dimension.getHeight()/128);
- AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
-
- graphics2d.drawImage(bufferedImage,transformOp, 0, 0);
-
- g2d.dispose();
}
+
}
\ No newline at end of file
Added: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java (rev 0)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java 2007-08-23 13:40:40 UTC (rev 2432)
@@ -0,0 +1,55 @@
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.GeneralPath;
+import java.awt.image.AffineTransformOp;
+import java.awt.image.BufferedImage;
+
+import org.ajax4jsf.resource.ResourceContext;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public abstract class PanelMenuIconChevronBasic extends PanelMenuIconBasic {
+
+ protected void paintImage(ResourceContext context, Graphics2D graphics2d, Color color) {
+
+ BufferedImage bufferedImage = new BufferedImage(128, 128, BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g2d = bufferedImage.createGraphics();
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
+ g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE);
+ g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+ g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+
+ Dimension dimension = getDimensions(context);
+ GeneralPath path = new GeneralPath();
+ g2d.setStroke(new BasicStroke(1,BasicStroke.CAP_BUTT,BasicStroke.JOIN_MITER));
+ g2d.translate(28,28);
+
+ g2d.setColor(color);
+
+ draw(path);
+
+ g2d.fill(path);
+ g2d.translate(24,0);
+ g2d.fill(path);
+
+ AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight()/128, dimension.getHeight()/128);
+ AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
+
+ graphics2d.drawImage(bufferedImage,transformOp, 0, 0);
+ g2d.dispose();
+ }
+
+ abstract void draw (GeneralPath draw);
+}
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java 2007-08-23 13:38:14 UTC (rev 2431)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java 2007-08-23 13:40:40 UTC (rev 2432)
@@ -21,41 +21,14 @@
package org.richfaces.renderkit.html.iconimages;
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.AffineTransform;
import java.awt.geom.GeneralPath;
-import java.awt.image.AffineTransformOp;
-import java.awt.image.BufferedImage;
-import org.ajax4jsf.resource.ResourceContext;
-public class PanelMenuIconChevronDown extends PanelMenuIconBasic {
+public class PanelMenuIconChevronDown extends PanelMenuIconChevronBasic {
- protected void paint(ResourceContext context, Graphics2D graphics2D) {
- BufferedImage bufferedImage = new BufferedImage(128, 128, BufferedImage.TYPE_INT_ARGB);
- Graphics2D g2d = bufferedImage.createGraphics();
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
- g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE);
- g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
- g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
- Dimension dimension = getDimensions(context);
- GeneralPath path = new GeneralPath();
- g2d.setStroke(new BasicStroke(1,BasicStroke.CAP_BUTT,BasicStroke.JOIN_MITER));
- g2d.translate(28,28);
- Color col = (Color) restoreData(context);
-
- g2d.setColor(col);
-
+ protected void draw(GeneralPath path) {
+
path.moveTo(1,0);
path.lineTo(31,30);
path.lineTo(61,0);
@@ -63,17 +36,6 @@
path.lineTo(31,46);
path.lineTo(1,16);
path.closePath();
- g2d.fill(path);
- g2d.translate(0,24);
-
- g2d.fill(path);
-
- AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight()/128, dimension.getHeight()/128);
- AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
-
- graphics2D.drawImage(bufferedImage,transformOp, 0, 0);
-
- g2d.dispose();
}
}
\ No newline at end of file
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java 2007-08-23 13:38:14 UTC (rev 2431)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java 2007-08-23 13:40:40 UTC (rev 2432)
@@ -21,41 +21,14 @@
package org.richfaces.renderkit.html.iconimages;
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.AffineTransform;
import java.awt.geom.GeneralPath;
-import java.awt.image.AffineTransformOp;
-import java.awt.image.BufferedImage;
-import org.ajax4jsf.resource.ResourceContext;
-public class PanelMenuIconChevronUp extends PanelMenuIconBasic {
+public class PanelMenuIconChevronUp extends PanelMenuIconChevronBasic {
- protected void paint(ResourceContext context, Graphics2D graphics2D) {
- BufferedImage bufferedImage = new BufferedImage(128, 128, BufferedImage.TYPE_INT_ARGB);
- Graphics2D g2d = bufferedImage.createGraphics();
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
- g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE);
- g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
- g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
- Dimension dimension = getDimensions(context);
- GeneralPath path = new GeneralPath();
- g2d.setStroke(new BasicStroke(1,BasicStroke.CAP_BUTT,BasicStroke.JOIN_MITER));
- g2d.translate(28,28);
- Color col = (Color) restoreData(context);
-
- g2d.setColor(col);
-
+ protected void draw(GeneralPath path) {
+
path.moveTo(0,46);
path.lineTo(0,31);
path.lineTo(30,1);
@@ -63,17 +36,7 @@
path.lineTo(61,46);
path.lineTo(30,16);
path.closePath();
- g2d.fill(path);
- g2d.translate(0,24);
-
- g2d.fill(path);
-
- AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight()/128, dimension.getHeight()/128);
- AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
-
- graphics2D.drawImage(bufferedImage,transformOp, 0, 0);
-
- g2d.dispose();
}
+
}
\ No newline at end of file
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java 2007-08-23 13:38:14 UTC (rev 2431)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java 2007-08-23 13:40:40 UTC (rev 2432)
@@ -26,24 +26,26 @@
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.geom.Ellipse2D;
+
import org.ajax4jsf.resource.ResourceContext;
public class PanelMenuIconDisc extends PanelMenuIconBasic {
- protected void paint(ResourceContext context, Graphics2D g2d) {
+ protected void paintImage(ResourceContext context, Graphics2D g2d, Color color) {
Dimension dimension = getDimensions(context);
- Color col = (Color) restoreData(context);
-
int dim = (int) Math.round(dimension.getWidth() / 3);
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setColor(col);
+ g2d.setColor(color);
g2d.translate(dim,dim);
+
Ellipse2D dot = new Ellipse2D.Double(0, 0, dim, dim);
+
g2d.fill(dot);
}
+
}
\ No newline at end of file
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java 2007-08-23 13:38:14 UTC (rev 2431)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java 2007-08-23 13:40:40 UTC (rev 2432)
@@ -34,7 +34,8 @@
public class PanelMenuIconGrid extends PanelMenuIconBasic {
- protected void paint(ResourceContext context, Graphics2D g2d) {
+ protected void paintImage(ResourceContext context, Graphics2D g2d, Color color) {
+
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
@@ -42,21 +43,25 @@
g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+
Rectangle2D.Float path = new Rectangle2D.Float();
Dimension dimension = getDimensions(context);
+
g2d.setStroke(new BasicStroke(16,BasicStroke.CAP_SQUARE,BasicStroke.JOIN_BEVEL));
g2d.scale(dimension.getHeight()/128,dimension.getHeight()/128);
-
g2d.translate(40,40);
path.setRect(0,0,40,40);
- Color col = (Color) restoreData(context);
+
+ g2d.setColor(color);
- g2d.setColor(col);
Color bcolor = new Color(1f,1f,1f,0f);
+
g2d.setBackground(bcolor);
g2d.fill(path);
g2d.clearRect(16,0,8,40);
g2d.clearRect(0,16,40,8);
+
}
+
}
\ No newline at end of file
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java 2007-08-23 13:38:14 UTC (rev 2431)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java 2007-08-23 13:40:40 UTC (rev 2432)
@@ -21,13 +21,15 @@
package org.richfaces.renderkit.html.iconimages;
+import java.awt.Color;
import java.awt.Graphics2D;
+
import org.ajax4jsf.resource.ResourceContext;
public class PanelMenuIconSpacer extends PanelMenuIconBasic {
- protected void paint(ResourceContext context, Graphics2D g2d) {
-
+ protected void paintImage(ResourceContext context, Graphics2D g2d, Color color) {
}
+
}
\ No newline at end of file
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java 2007-08-23 13:38:14 UTC (rev 2431)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java 2007-08-23 13:40:40 UTC (rev 2432)
@@ -21,31 +21,21 @@
package org.richfaces.renderkit.html.iconimages;
-import java.awt.Color;
-import java.awt.Dimension;
import java.awt.Graphics2D;
-import java.awt.RenderingHints;
import java.awt.geom.GeneralPath;
-import org.ajax4jsf.resource.ResourceContext;
-public class PanelMenuIconTriangle extends PanelMenuIconBasic {
+public class PanelMenuIconTriangle extends PanelMenuIconTriangleBasic {
- protected void paint(ResourceContext context, Graphics2D g2d) {
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
- GeneralPath path = new GeneralPath();
-
- Dimension dimension = getDimensions(context);
- g2d.scale(dimension.getHeight()/128,dimension.getHeight()/128);
+ void draw(GeneralPath path, Graphics2D g2d) {
+
g2d.translate(47,30);
path.moveTo(0,0);
path.lineTo(33,33);
path.lineTo(33,34);
path.lineTo(0,67);
path.closePath();
- g2d.setColor((Color)restoreData(context));
- g2d.fill(path);
+
}
+
}
\ No newline at end of file
Added: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java (rev 0)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java 2007-08-23 13:40:40 UTC (rev 2432)
@@ -0,0 +1,40 @@
+/**
+ *
+ */
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.GeneralPath;
+
+import org.ajax4jsf.resource.ResourceContext;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public abstract class PanelMenuIconTriangleBasic extends PanelMenuIconBasic {
+
+ protected void paintImage(ResourceContext context, Graphics2D g2d, Color color) {
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
+
+ GeneralPath path = new GeneralPath();
+
+ Dimension dimension = getDimensions(context);
+ g2d.scale(dimension.getHeight()/128,dimension.getHeight()/128);
+
+ draw(path, g2d);
+
+ g2d.setColor(color);
+ g2d.fill(path);
+
+ }
+
+ abstract void draw(GeneralPath path, Graphics2D g2d);
+
+}
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java 2007-08-23 13:38:14 UTC (rev 2431)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java 2007-08-23 13:40:40 UTC (rev 2432)
@@ -21,26 +21,15 @@
package org.richfaces.renderkit.html.iconimages;
-import java.awt.Color;
-import java.awt.Dimension;
import java.awt.Graphics2D;
-import java.awt.RenderingHints;
import java.awt.geom.GeneralPath;
-import org.ajax4jsf.resource.ResourceContext;
-public class PanelMenuIconTriangleDown extends PanelMenuIconBasic {
+public class PanelMenuIconTriangleDown extends PanelMenuIconTriangleBasic {
- protected void paint(ResourceContext context, Graphics2D g2d) {
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
- GeneralPath path = new GeneralPath();
-
- Dimension dimension = getDimensions(context);
+ void draw(GeneralPath path, Graphics2D g2d) {
- g2d.scale(dimension.getHeight()/128,dimension.getHeight()/128);
g2d.translate(31,54);
path.moveTo(0,0);
@@ -48,9 +37,7 @@
path.lineTo(34,33);
path.lineTo(67,0);
path.closePath();
- Color col = (Color) restoreData(context);
- g2d.setColor(col);
- g2d.fill(path);
- }
+ }
+
}
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java 2007-08-23 13:38:14 UTC (rev 2431)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java 2007-08-23 13:40:40 UTC (rev 2432)
@@ -21,35 +21,23 @@
package org.richfaces.renderkit.html.iconimages;
-import java.awt.Color;
-import java.awt.Dimension;
import java.awt.Graphics2D;
-import java.awt.RenderingHints;
import java.awt.geom.GeneralPath;
-import org.ajax4jsf.resource.ResourceContext;
-public class PanelMenuIconTriangleUp extends PanelMenuIconBasic {
+public class PanelMenuIconTriangleUp extends PanelMenuIconTriangleBasic {
- protected void paint(ResourceContext context, Graphics2D g2d) {
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
- GeneralPath path = new GeneralPath();
-
- Dimension dimension = getDimensions(context);
+ void draw(GeneralPath path, Graphics2D g2d) {
- g2d.scale(dimension.getHeight()/128,dimension.getHeight()/128);
g2d.translate(31,47);
+
path.moveTo(0,33);
path.lineTo(33,0);
path.lineTo(34,0);
path.lineTo(67,33);
path.closePath();
- Color col = (Color) restoreData(context);
- g2d.setColor(col);
- g2d.fill(path);
- }
+ }
+
}
Modified: trunk/ui/panelmenu/src/test/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasicTest.java
===================================================================
--- trunk/ui/panelmenu/src/test/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasicTest.java 2007-08-23 13:38:14 UTC (rev 2431)
+++ trunk/ui/panelmenu/src/test/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasicTest.java 2007-08-23 13:40:40 UTC (rev 2432)
@@ -19,7 +19,7 @@
public void testSaveResources(){
- PanelMenuIconBasic icon = new PanelMenuIconBasic();
+ PanelMenuIconBasic icon = new PanelMenuIconChevron();
Skin skin = SkinFactory.getInstance().getSkin(facesContext);
Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(facesContext);
18 years, 8 months
JBoss Rich Faces SVN: r2430 - in trunk/docs/userguide/en/src/main: resources/images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vkukharchuk
Date: 2007-08-23 09:38:13 -0400 (Thu, 23 Aug 2007)
New Revision: 2430
Added:
trunk/docs/userguide/en/src/main/docbook/included/effect.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/effect.xml
trunk/docs/userguide/en/src/main/resources/images/effect0.png
trunk/docs/userguide/en/src/main/resources/images/effect1.png
Log:
http://jira.jboss.com/jira/browse/RF-639
Added: trunk/docs/userguide/en/src/main/docbook/included/effect.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/effect.desc.xml (rev 0)
+++ trunk/docs/userguide/en/src/main/docbook/included/effect.desc.xml 2007-08-23 13:38:13 UTC (rev 2430)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>effect</keyword>
+ </keywordset>
+ </sectioninfo>
+ <section>
+ <title>Description</title>
+ <para>
+ The <property>rich:effect</property> utilizes the set of effects provided by scriptaculous javascript library.
+ It allows to attach effects to JSF components and html tags.
+ </para>
+ </section>
+ <section>
+ <title>Key Features</title>
+ <itemizedlist>
+ <listitem>No developers JavaScript writing needed to use on the pages</listitem>
+ <listitem>Presents scriptaculous javascript library functionality</listitem>
+ </itemizedlist>
+ </section>
+</section>
Added: trunk/docs/userguide/en/src/main/docbook/included/effect.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/effect.xml (rev 0)
+++ trunk/docs/userguide/en/src/main/docbook/included/effect.xml 2007-08-23 13:38:13 UTC (rev 2430)
@@ -0,0 +1,165 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>effect</keyword>
+ <keyword>rich:effect</keyword>
+ <keyword>HtmlEffect</keyword>
+ </keywordset>
+ </sectioninfo>
+
+ <table>
+ <title>Component identification parameters </title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Value</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>component-type</entry>
+ <entry>org.richfaces.component.RichEffect</entry>
+ </row>
+ <row>
+ <entry>component-class</entry>
+ <entry>org.richfaces.component.html.HtmlEffect</entry>
+ </row>
+ <row>
+ <entry>component-family</entry>
+ <entry>org.richfaces.Effect</entry>
+ </row>
+ <row>
+ <entry>renderer-type</entry>
+ <entry>org.richfaces.EffectRenderer</entry>
+ </row>
+ <row>
+ <entry>tag-class</entry>
+ <entry>org.richfaces.taglib.EffectTag</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Creating the Component with a Page Tag</title>
+ <para>To create the simplest variant of <property>rich:effect</property> on a page, use the
+ following syntax:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:effect for="componentId" type="Appear"/>
+...
+]]></programlisting>
+ </section>
+
+ <section>
+ <title>Creating the Component Dynamically Using Java</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlRichEffect;
+...
+HtmlRichEffect myEffect = new HtmlRichEffect();
+...
+]]></programlisting>
+ </section>
+
+ <section>
+ <title>Details of Usage</title>
+<para>
+ It is possible to use <property><rich:effect></property> in two modes:
+<itemizedlist>
+ <listitem>attached to the JSF components or html tags and triggered by particular event.
+ Wiring effect with JSF components might be occurs on the server or client.
+ Wiring with html tag is possible only on the client side </listitem>
+ <listitem>invoking from the javascript code by effect name.
+ During the rendering, <property>rich:effect</property> generates the javascript function with defined name. When the function is called,
+ the effect is applied </listitem>
+</itemizedlist>
+</para>
+ <para>
+ <emphasis role="bold">Those a the typical variants of using:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<!-- attaching by event -->
+<rich:panel>
+ <rich:effect event="onmouseout" type="Opacity" params="duration:0.8,from:1.0,to:0.3" />
+ .... panel content ....
+</rich:panel>
+...
+
+<!-- invoking from javascript -->
+<div id="contentDiv">
+ ..... div content ......
+</div>
+
+<input type="button" onclick="hideDiv({duration:0.7})" value="Hide" />
+<input type="button" onclick="showDiv()" value="Show" />
+
+<rich:effect name="hideDiv" for="contentDiv" type="Fade" />
+<rich:effect name="showDiv" for="contentDiv" type="Appear" />
+
+<!-- attaching to window on load and applying on particular page element -->
+<rich:effect for="window" event="onload" type="Appear" params="id:'contentDiv',duration:0.8,from:0.3,to:1.0" />
+...
+]]></programlisting>
+
+ <figure>
+ <title>Initial:</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/effect1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure>
+ <title>When the mouse cursor is over:</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/effect0.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+<para>
+<emphasis><property>"name"</property></emphasis> attribute defines the name of the javascript function will
+be generated on the page when the component is rendered. You can invoke this function to activate the effect. The function access one parameter.
+It is a set of effect options in JSON format.
+</para>
+
+<para>
+<emphasis><property>"type"</property></emphasis> attribute defines the type of effect. For example, "Fade", "Blind", "Opacity". Take a look at scriptaculous documentation
+for set of available effect.
+</para>
+
+<para>
+<emphasis><property>"for"</property></emphasis> attribute defines the id of the component or html tag, the effect will be attached to.
+Richfaces converts the <emphasis><property>"for"</property></emphasis> attribute value to the client id of the component if such component is found. If not, the value is left as is for possible
+wiring with on the DOM element's id on the client side.
+By default, the target of the effect is the same element that effect pointed to. However, the target element
+is might be overridden with <emphasis><property>"effectId"</property></emphasis> option passed with <emphasis><property>"params"</property></emphasis>
+attribute of with function paramenter.
+</para>
+
+<para>
+<emphasis><property>"params"</property></emphasis> attribute allows to define the set of options possible for particurar effect.
+For example, 'duration', 'delay', 'from', 'to'. Additionally to the options used by the effect itself, there are two option that might override
+the <property>rich:effect</property> attribute. Those are:
+<itemizedlist>
+ <listitem><emphasis><property>"effectId"</property></emphasis> allows to re-define the target of effect.
+ The option is overrire the value of <emphasis><property>"for"</property></emphasis> attribute</listitem>
+ <listitem><emphasis><property>"effectType"</property></emphasis> defines the effect type.
+ The option is overrire the value of <emphasis><property>"type"</property></emphasis> attribute</listitem>
+</itemizedlist>
+</para>
+
+ </section>
+</section>
Added: trunk/docs/userguide/en/src/main/resources/images/effect0.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/effect0.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/effect1.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/effect1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
18 years, 8 months
JBoss Rich Faces SVN: r2431 - trunk/docs.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-08-23 09:38:14 -0400 (Thu, 23 Aug 2007)
New Revision: 2431
Removed:
trunk/docs/ajaxguide/
trunk/docs/resources/
Log:
the folders are deleted as they are not used
18 years, 8 months
JBoss Rich Faces SVN: r2429 - in trunk: docs/userguide/en/src/main/docbook and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vkukharchuk
Date: 2007-08-23 09:34:56 -0400 (Thu, 23 Aug 2007)
New Revision: 2429
Modified:
trunk/docs/userguide/en/src/main/docbook/master.xml
trunk/docs/userguide/pom.xml
trunk/ui/effect/src/main/config/component/effect.xml
Log:
http://jira.jboss.com/jira/browse/RF-639
Modified: trunk/docs/userguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/master.xml 2007-08-23 11:34:57 UTC (rev 2428)
+++ trunk/docs/userguide/en/src/main/docbook/master.xml 2007-08-23 13:34:56 UTC (rev 2429)
@@ -18,6 +18,9 @@
<!ENTITY dataScroller_table SYSTEM "../../../target/generated/datascroller.xml">
<!ENTITY dataTable_table SYSTEM "../../../target/generated/dataTable.xml">
<!ENTITY dnd_table SYSTEM "../../../target/generated/dnd.xml">
+
+<!ENTITY effect_table SYSTEM "../../../target/generated/effect.xml">
+
<!ENTITY gmap_table SYSTEM "../../../target/generated/gmap.xml">
<!ENTITY virtualEarth_table SYSTEM "../../../target/generated/virtualEarth.xml">
<!ENTITY inputNumberSlider_table SYSTEM "../../../target/generated/inputnumber-slider.xml">
@@ -78,6 +81,7 @@
&dataTable_table;
&dnd_table;
&dropDownMenu_table;
+&effect_table;
&menuComponents_table;
&gmap_table;
&virtualEarth_table;
Modified: trunk/docs/userguide/pom.xml
===================================================================
--- trunk/docs/userguide/pom.xml 2007-08-23 11:34:57 UTC (rev 2428)
+++ trunk/docs/userguide/pom.xml 2007-08-23 13:34:56 UTC (rev 2429)
@@ -107,6 +107,7 @@
3.1.0-SNAPSHOT
</version>
</artifactItem>
+
<artifactItem>
<groupId>
org.richfaces.ui
@@ -118,10 +119,23 @@
3.1.0-SNAPSHOT
</version>
</artifactItem>
+
<artifactItem>
<groupId>
org.richfaces.ui
</groupId>
+ <artifactId>
+ effect
+ </artifactId>
+ <version>
+ 3.1.0-SNAPSHOT
+ </version>
+ </artifactItem>
+
+ <artifactItem>
+ <groupId>
+ org.richfaces.ui
+ </groupId>
<artifactId>gmap</artifactId>
<version>
3.1.0-SNAPSHOT
Modified: trunk/ui/effect/src/main/config/component/effect.xml
===================================================================
--- trunk/ui/effect/src/main/config/component/effect.xml 2007-08-23 11:34:57 UTC (rev 2428)
+++ trunk/ui/effect/src/main/config/component/effect.xml 2007-08-23 13:34:56 UTC (rev 2429)
@@ -60,6 +60,22 @@
</description>
<defaultvalue>""</defaultvalue>
</property>
+ <property>
+ <name>type</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Defines the type of effect. Possible values: "Fade", "Blind", "Opacity".
+ </description>
+ <defaultvalue>""</defaultvalue>
+ </property>
+ <property>
+ <name>disableDefault</name>
+ <classname>boolean</classname>
+ <description>
+ <![CDATA[Disable default action for target event ( append "return false;" to javascript )]]>
+ </description>
+ <defaultvalue>false</defaultvalue>
+ </property>
<property el="false" >
<name>event</name>
<classname>java.lang.String</classname>
18 years, 8 months
JBoss Rich Faces SVN: r2428 - trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: akushunin
Date: 2007-08-23 07:34:57 -0400 (Thu, 23 Aug 2007)
New Revision: 2428
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss
Log:
RF-668
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss 2007-08-23 11:19:18 UTC (rev 2427)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss 2007-08-23 11:34:57 UTC (rev 2428)
@@ -56,7 +56,7 @@
.calendar_week{
border-bottom : 1px solid;
border-right : 1px solid;
- background-color : #f5f5f5; /*unknown parameter - need to add*/
+ /* background-color : #f5f5f5; /*unknown parameter - need to add*/ */
vertical-align : middle;
text-align : center;
width : 25px;
@@ -160,6 +160,7 @@
/* background-color : #f5f5f5; unknown parameter - need to add*/
<u:selector name=".calendar_week">
+ <u:style name="background" skin="additionalBackgroundColor"/>
<u:style name="border-bottom-color" skin="panelBorderColor"/>
<u:style name="border-right-color" skin="panelBorderColor"/>
<u:style name="font-size" skin="generalSizeFont"/>
@@ -203,10 +204,6 @@
<u:selector name=".calendar_hover">
<u:style name="background-color" value="#f3f3f3"/> /*unknown parameter - need to add*/
</u:selector>
-
- <u:selector name=".calendar_current.calendar_hover">
- <u:style name="color" value="#ff7800"/> /*unknown parameter - need to add*/
- </u:selector>
<u:selector name=".calendar_toolfooter">
<u:style name="background" skin="additionalBackgroundColor"/>
18 years, 8 months