JBoss Rich Faces SVN: r1269 - trunk/sandbox.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-06-21 13:18:41 -0400 (Thu, 21 Jun 2007)
New Revision: 1269
Modified:
trunk/sandbox/pom.xml
Log:
Modified: trunk/sandbox/pom.xml
===================================================================
--- trunk/sandbox/pom.xml 2007-06-21 17:16:35 UTC (rev 1268)
+++ trunk/sandbox/pom.xml 2007-06-21 17:18:41 UTC (rev 1269)
@@ -260,5 +260,6 @@
<module>simpleTogglePanel2</module>
<module>panelmenu</module>
<module>calendar</module>
+ <module>tooltip</module>
</modules>
</project>
17 years, 6 months
JBoss Rich Faces SVN: r1268 - trunk/sandbox-samples.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-06-21 13:16:35 -0400 (Thu, 21 Jun 2007)
New Revision: 1268
Modified:
trunk/sandbox-samples/pom.xml
Log:
Modified: trunk/sandbox-samples/pom.xml
===================================================================
--- trunk/sandbox-samples/pom.xml 2007-06-21 17:12:20 UTC (rev 1267)
+++ trunk/sandbox-samples/pom.xml 2007-06-21 17:16:35 UTC (rev 1268)
@@ -298,5 +298,6 @@
<module>simpleTogglePanel2-sample</module>
<module>panelmenu-sample</module>
<module>calendar-sample</module>
+ <module>tooltip-sample</module>
</modules>
</project>
\ No newline at end of file
17 years, 6 months
JBoss Rich Faces SVN: r1267 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-06-21 13:12:20 -0400 (Thu, 21 Jun 2007)
New Revision: 1267
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
Log:
Make resize for splash before showing.
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-21 17:00:54 UTC (rev 1266)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-21 17:12:20 UTC (rev 1267)
@@ -481,8 +481,8 @@
if(!this.splash) {
this.setProgressCtrl(new ClientUI.common.box.SplashBox(null, this.getElement(), 300));
}
+ this.splash.setSize(this.scrollBox.getViewportWidth(), this.scrollBox.getViewportHeight());
this.splash.show();
- this.splash.setSize(this.scrollBox.getViewportWidth(), this.scrollBox.getViewportHeight());
this.splash.updateLayout();
},
forceReRender: function() {
17 years, 6 months
JBoss Rich Faces SVN: r1266 - in trunk/sandbox-samples: tooltip-sample and 12 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-06-21 13:00:54 -0400 (Thu, 21 Jun 2007)
New Revision: 1266
Added:
trunk/sandbox-samples/tooltip-sample/
trunk/sandbox-samples/tooltip-sample/pom.xml
trunk/sandbox-samples/tooltip-sample/src/
trunk/sandbox-samples/tooltip-sample/src/main/
trunk/sandbox-samples/tooltip-sample/src/main/java/
trunk/sandbox-samples/tooltip-sample/src/main/java/org/
trunk/sandbox-samples/tooltip-sample/src/main/java/org/richfaces/
trunk/sandbox-samples/tooltip-sample/src/main/java/org/richfaces/Bean.java
trunk/sandbox-samples/tooltip-sample/src/main/resources/
trunk/sandbox-samples/tooltip-sample/src/main/webapp/
trunk/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/
trunk/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/faces-config.xml
trunk/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/web.xml
trunk/sandbox-samples/tooltip-sample/src/main/webapp/index.jsp
trunk/sandbox-samples/tooltip-sample/src/main/webapp/pages/
trunk/sandbox-samples/tooltip-sample/src/main/webapp/pages/index.jsp
trunk/sandbox-samples/tooltip-sample/src/test/
trunk/sandbox-samples/tooltip-sample/src/test/java/
trunk/sandbox-samples/tooltip-sample/src/test/java/org/
trunk/sandbox-samples/tooltip-sample/src/test/java/org/richfaces/
trunk/sandbox-samples/tooltip-sample/src/test/java/org/richfaces/BeanTest.java
Log:
Added: trunk/sandbox-samples/tooltip-sample/pom.xml
===================================================================
--- trunk/sandbox-samples/tooltip-sample/pom.xml (rev 0)
+++ trunk/sandbox-samples/tooltip-sample/pom.xml 2007-06-21 17:00:54 UTC (rev 1266)
@@ -0,0 +1,33 @@
+<?xml version="1.0"?><project>
+ <parent>
+ <artifactId>richfaces-samples</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.0.2-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>tooltip-sample</artifactId>
+ <packaging>war</packaging>
+ <name>tooltip-sample Maven Webapp</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>tooltip</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>skins</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>tooltip-sample</finalName>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/sandbox-samples/tooltip-sample/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/sandbox-samples/tooltip-sample/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/sandbox-samples/tooltip-sample/src/main/java/org/richfaces/Bean.java (rev 0)
+++ trunk/sandbox-samples/tooltip-sample/src/main/java/org/richfaces/Bean.java 2007-06-21 17:00:54 UTC (rev 1266)
@@ -0,0 +1,29 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces;
+/**
+ * @author $Autor$
+ *
+ */
+public class Bean {
+
+}
\ No newline at end of file
Property changes on: trunk/sandbox-samples/tooltip-sample/src/main/java/org/richfaces/Bean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/faces-config.xml (rev 0)
+++ trunk/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/faces-config.xml 2007-06-21 17:00:54 UTC (rev 1266)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-class>org.richfaces.Bean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+</faces-config>
Property changes on: trunk/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/faces-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ trunk/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/web.xml 2007-06-21 17:00:54 UTC (rev 1266)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>Archetype Created Web Application</display-name>
+ <context-param>
+ <param-name>javax.faces.CONFIG_FILES</param-name>
+ <param-value>/WEB-INF/faces-config.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+<context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+
+ <!--
+ -->
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Property changes on: trunk/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/sandbox-samples/tooltip-sample/src/main/webapp/index.jsp
===================================================================
--- trunk/sandbox-samples/tooltip-sample/src/main/webapp/index.jsp (rev 0)
+++ trunk/sandbox-samples/tooltip-sample/src/main/webapp/index.jsp 2007-06-21 17:00:54 UTC (rev 1266)
@@ -0,0 +1,11 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<html>
+
+<head></head>
+
+ <body>
+ <jsp:forward page="/pages/index.jsf" />
+ </body>
+
+</html>
\ No newline at end of file
Property changes on: trunk/sandbox-samples/tooltip-sample/src/main/webapp/index.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/sandbox-samples/tooltip-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox-samples/tooltip-sample/src/main/webapp/pages/index.jsp (rev 0)
+++ trunk/sandbox-samples/tooltip-sample/src/main/webapp/pages/index.jsp 2007-06-21 17:00:54 UTC (rev 1266)
@@ -0,0 +1,34 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.ajax4jsf.org/tooltip" prefix="tt"%>
+
+<html>
+ <head>
+ <title></title>
+
+ </head>
+ <body>
+ <f:view>
+ <h:form>
+ <%--h:inputText value="Input text" id="inp1" size="50">
+ <tt:toolTip value="1231231">
+ <f:facet name="defaultContent"><f:verbatim>DEFAULT VALUE</f:verbatim></f:facet>
+ </tt:toolTip>
+ </h:inputText--%>
+
+ <h:selectOneListbox value="sdfsfd" id="ddl">
+ <tt:toolTip value="1231231">
+ <f:facet name="defaultContent"><f:verbatim>DEFAULT VALUE DropDown</f:verbatim></f:facet>
+ </tt:toolTip>
+
+ </h:selectOneListbox>
+
+
+
+
+ <!-- h:inputText value="ddd" onclick="toolTipAttach();alert(document.getElementById('lkjl'))"/-->
+ </h:form>
+ </f:view>
+ </body>
+</html>
+
Property changes on: trunk/sandbox-samples/tooltip-sample/src/main/webapp/pages/index.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/sandbox-samples/tooltip-sample/src/test/java/org/richfaces/BeanTest.java
===================================================================
--- trunk/sandbox-samples/tooltip-sample/src/test/java/org/richfaces/BeanTest.java (rev 0)
+++ trunk/sandbox-samples/tooltip-sample/src/test/java/org/richfaces/BeanTest.java 2007-06-21 17:00:54 UTC (rev 1266)
@@ -0,0 +1,46 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+*/
+public class BeanTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public BeanTest( String testName )
+ {
+ super( testName );
+ }
+
+ public void testStub() throws Exception {
+
+ }
+}
Property changes on: trunk/sandbox-samples/tooltip-sample/src/test/java/org/richfaces/BeanTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
17 years, 6 months
JBoss Rich Faces SVN: r1265 - in trunk/sandbox: tooltip and 28 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-06-21 12:56:03 -0400 (Thu, 21 Jun 2007)
New Revision: 1265
Added:
trunk/sandbox/tooltip/
trunk/sandbox/tooltip/pom.xml
trunk/sandbox/tooltip/src/
trunk/sandbox/tooltip/src/main/
trunk/sandbox/tooltip/src/main/config/
trunk/sandbox/tooltip/src/main/config/component/
trunk/sandbox/tooltip/src/main/config/component/README
trunk/sandbox/tooltip/src/main/config/component/toolTip.xml
trunk/sandbox/tooltip/src/main/java/
trunk/sandbox/tooltip/src/main/java/META-INF/
trunk/sandbox/tooltip/src/main/java/META-INF/MANIFEST.MF
trunk/sandbox/tooltip/src/main/java/org/
trunk/sandbox/tooltip/src/main/java/org/richfaces/
trunk/sandbox/tooltip/src/main/java/org/richfaces/component/
trunk/sandbox/tooltip/src/main/java/org/richfaces/component/README
trunk/sandbox/tooltip/src/main/java/org/richfaces/component/UIToolTip.java
trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/
trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/
trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/
trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/AbstractToolTipCornerImage.java
trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/
trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/BottomLeftToolTipCornerImage.java
trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/BottomRightToolTipCornerImage.java
trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/TopLeftToolTipCornerImage.java
trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/TopRightToolTipCornerImage.java
trunk/sandbox/tooltip/src/main/resources/
trunk/sandbox/tooltip/src/main/resources/org/
trunk/sandbox/tooltip/src/main/resources/org/richfaces/
trunk/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/
trunk/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/
trunk/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/css/
trunk/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/css/tooltip.xcss
trunk/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/
trunk/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
trunk/sandbox/tooltip/src/main/templates/
trunk/sandbox/tooltip/src/main/templates/README
trunk/sandbox/tooltip/src/main/templates/org/
trunk/sandbox/tooltip/src/main/templates/org/richfaces/
trunk/sandbox/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx
trunk/sandbox/tooltip/src/test/
trunk/sandbox/tooltip/src/test/java/
trunk/sandbox/tooltip/src/test/java/org/
trunk/sandbox/tooltip/src/test/java/org/richfaces/
trunk/sandbox/tooltip/src/test/java/org/richfaces/component/
trunk/sandbox/tooltip/src/test/java/org/richfaces/component/JSFComponentTest.java
Log:
Added: trunk/sandbox/tooltip/pom.xml
===================================================================
--- trunk/sandbox/tooltip/pom.xml (rev 0)
+++ trunk/sandbox/tooltip/pom.xml 2007-06-21 16:56:03 UTC (rev 1265)
@@ -0,0 +1,43 @@
+<?xml version="1.0"?><project>
+ <parent>
+ <artifactId>richfaces-parent</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.0.2-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>tooltip</artifactId>
+ <name>tooltip</name>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.ajax4jsf.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>1.1.1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <library>
+ <prefix>org.richfaces</prefix>
+ <taglib>
+ <shortName>tooltip</shortName>
+ </taglib>
+ </library>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>common</artifactId>
+ <version>3.0.2-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Property changes on: trunk/sandbox/tooltip/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/sandbox/tooltip/src/main/config/component/README
===================================================================
Added: trunk/sandbox/tooltip/src/main/config/component/toolTip.xml
===================================================================
--- trunk/sandbox/tooltip/src/main/config/component/toolTip.xml (rev 0)
+++ trunk/sandbox/tooltip/src/main/config/component/toolTip.xml 2007-06-21 16:56:03 UTC (rev 1265)
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<components>
+ <component>
+ <name>org.richfaces.component.ToolTip</name>
+ <family>org.richfaces.component.ToolTip</family>
+ <description>Defines the menu on the page and the set of the child elements properties in layout.</description>
+ <superclass>org.richfaces.component.UIToolTip</superclass>
+ <classname>org.richfaces.component.html.HtmlToolTip</classname>
+ <renderer generate="true" override="true">
+ <name>org.richfaces.renderkit.html.ToolTipRenderer</name>
+ <template>org/richfaces/htmltooltip.jspx</template>
+ </renderer>
+ <tag>
+ <name>toolTip</name>
+ <classname>org.richfaces.taglib.ToolTipTag</classname>
+ <superclass>org.ajax4jsf.framework.taglib.HtmlComponentTagBase</superclass>
+ </tag>
+
+
+ <property>
+ <name>onactivate</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onshow</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>ondeactivate</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+
+
+
+ <property>
+ <name>value</name>
+ <classname>java.lang.String</classname>
+ <description>Label on the tooltip</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>event</name>
+ <classname>java.lang.String</classname>
+ <description>event that triggers the tooltip appearance (default = onmouseover)</description>
+ <defaultvalue><![CDATA["onmouseover"]]></defaultvalue>
+ </property>
+ <property>
+ <name>mode</name>
+ <classname>java.lang.String</classname>
+ <description>controls the way of data loading to tooltip and should have following values “client” (default), “ajax”</description>
+ <defaultvalue><![CDATA["client"]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabled</name>
+ <classname>boolean</classname>
+ <description>If false the components is rendered on the client but Js for calling – disabled.</description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name>direction</name>
+ <classname>java.lang.String</classname>
+ <description>Defines direction of the popup list to appear (top-right, top-left bottom-right, bottom-left, auto(default))</description>
+ <defaultvalue><![CDATA["auto"]]></defaultvalue>
+ </property>
+ <property>
+ <name>followmouse</name>
+ <classname>boolean</classname>
+ <description>If true – tooltip should follow the mouse while it moves over the parent element</description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name>horizontalOffset</name>
+ <classname>int</classname>
+ <description>Sets the horizontal offset between popup list and mouse pointer</description>
+ <defaultvalue>0</defaultvalue>
+ </property>
+ <property>
+ <name>verticalOffset</name>
+ <classname>int</classname>
+ <description>Sets the vertical offset between popup list and mouse pointer</description>
+ <defaultvalue>0</defaultvalue>
+ </property>
+ <property>
+ <name>style</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>styleClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+
+ &ui_component_attributes;
+ &html_events;
+
+ <property>
+ <name>onclick</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>ondblclick</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onmouseout</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onmousemove</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onmouseover</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ </component>
+</components>
\ No newline at end of file
Property changes on: trunk/sandbox/tooltip/src/main/config/component/toolTip.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/sandbox/tooltip/src/main/java/META-INF/MANIFEST.MF
===================================================================
--- trunk/sandbox/tooltip/src/main/java/META-INF/MANIFEST.MF (rev 0)
+++ trunk/sandbox/tooltip/src/main/java/META-INF/MANIFEST.MF 2007-06-21 16:56:03 UTC (rev 1265)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: trunk/sandbox/tooltip/src/main/java/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/sandbox/tooltip/src/main/java/org/richfaces/component/README
===================================================================
Added: trunk/sandbox/tooltip/src/main/java/org/richfaces/component/UIToolTip.java
===================================================================
--- trunk/sandbox/tooltip/src/main/java/org/richfaces/component/UIToolTip.java (rev 0)
+++ trunk/sandbox/tooltip/src/main/java/org/richfaces/component/UIToolTip.java 2007-06-21 16:56:03 UTC (rev 1265)
@@ -0,0 +1,82 @@
+package org.richfaces.component;
+
+import javax.faces.component.UIComponentBase;
+
+public abstract class UIToolTip extends UIComponentBase{
+
+ public static final String COMPONENT_TYPE = "org.richfaces.toolTip";
+ public static final String CONTENT_FACET_NAME = "defaultContent";
+
+ public abstract String getValue();
+
+ public abstract void setValue(String value);
+
+ public abstract String getEvent();
+
+ public abstract void setEvent(String event);
+
+ public abstract String getMode();
+
+ public abstract void setMode(String mode);
+
+ public abstract boolean isDisabled();
+
+ public abstract void setDisabled(boolean disabled);
+
+ public abstract String getDirection();
+
+ public abstract void setDirection(String direction);
+
+ public abstract boolean isFollowMouse();
+
+ public abstract void setFollowMouse(boolean followMouse);
+
+ public abstract int getHorizontalOffset();
+
+ public abstract void setHorizontalOffset(int horizontalOffset);
+
+ public abstract int getVerticalOffset();
+
+ public abstract void setVerticalOffset(int verticalOffset);
+
+ public abstract String getStyle();
+
+ public abstract void setStyle(String style);
+
+ public abstract String getStyleClass();
+
+ public abstract void setStyleClass(String styleClass);
+
+ public abstract String getOnactivate();
+
+ public abstract void setOnactivate(String onactivate);
+
+ public abstract String getOnshow();
+
+ public abstract void setOnshow(String onshow);
+
+ public abstract String getOndeactivate();
+
+ public abstract void setOndeactivate(String ondeactivate);
+
+ public abstract String getOnclick();
+
+ public abstract void setOnclick(String onclick);
+
+ public abstract String getOndblclick();
+
+ public abstract void setOndblclick(String ondblclick);
+
+ public abstract String getOnmouseout();
+
+ public abstract void setOnmouseout(String onmouseout);
+
+ public abstract String getOnmousemove();
+
+ public abstract void setOnmousemove(String onmousemove);
+
+ public abstract String getOnmouseover();
+
+ public abstract void setOnmouseover(String onmouseover);
+
+}
Property changes on: trunk/sandbox/tooltip/src/main/java/org/richfaces/component/UIToolTip.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
===================================================================
--- trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java (rev 0)
+++ trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2007-06-21 16:56:03 UTC (rev 1265)
@@ -0,0 +1,162 @@
+package org.richfaces.renderkit.html;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.framework.renderer.AjaxComponentRendererBase;
+import org.ajax4jsf.framework.skin.Skin;
+import org.richfaces.component.UIToolTip;
+import org.richfaces.renderkit.html.image.cornerimages.BottomLeftToolTipCornerImage;
+import org.richfaces.renderkit.html.image.cornerimages.BottomRightToolTipCornerImage;
+import org.richfaces.renderkit.html.image.cornerimages.TopLeftToolTipCornerImage;
+import org.richfaces.renderkit.html.image.cornerimages.TopRightToolTipCornerImage;
+
+public class ToolTipRenderer extends AjaxComponentRendererBase{
+
+
+ protected Class getComponentClass() {
+ return org.richfaces.component.UIToolTip.class;
+ }
+
+ public void encodeChildren(FacesContext context, UIComponent component)
+ throws IOException {
+ // TODO Auto-generated method stub
+ super.encodeChildren(context, component);
+ }
+
+ /**
+ *
+ * @param context
+ * @param component 'tl'-top left, 'tr'-top right, 'bl'-bottom left, 'br'-bottom right
+ * @param position
+ * @throws IOException
+ */
+ public void insertImage(FacesContext context, UIComponent component, Object position) throws IOException{
+ //if(position == null) throw new IllegalArgumentException("Parameter passed is invalid, use \"0 - 3\"");
+ String posStr = (String)position;
+ drawImageElement(context, component, posStr);
+ }
+
+
+ /**
+ *
+ * @param writer
+ * @param component
+ * @param position 0-tl, 1-tr, 2-bl, 3-br
+ * @throws IOException
+ */
+ private void drawImageElement(FacesContext context, UIComponent component, String position) throws IOException{
+ String imageSrc = getImageSrc(context, component, position);
+ ResponseWriter writer = context.getResponseWriter();
+ int h = 15; //width(context);
+ writer.startElement("img", component);
+ writer.writeAttribute("src", imageSrc, null);
+ writer.writeAttribute("alt", "", null);
+ writer.writeAttribute("vspace", "0", null);
+ writer.writeAttribute("hspace", "0", null);
+ writer.writeAttribute("class", "corner", null);
+ writer.writeAttribute("style", "display:block; ", null);
+ writer.writeAttribute("width", String.valueOf(h), null);
+ writer.writeAttribute("height", String.valueOf(h), null);
+ writer.endElement("img");
+ }
+
+
+ protected String getImageSrc(FacesContext context, UIComponent component, String position){
+ String color = getBgColor(context, component);
+ String imageSource = null;
+ if(position == null || position.equals("tl")) {
+ imageSource = getResource(TopLeftToolTipCornerImage.class.getName()).getUri(context, color);
+ } else if(position.equals("tr")){
+ imageSource = getResource(TopRightToolTipCornerImage.class.getName()).getUri(context, color);
+ } else if (position.equals("bl")){
+ imageSource = getResource(BottomLeftToolTipCornerImage.class.getName()).getUri(context, color);
+ } else if (position.equals("br")){
+ imageSource = getResource(BottomRightToolTipCornerImage.class.getName()).getUri(context, color);
+ }
+
+ return imageSource;
+ }
+
+ public String getBgColor(FacesContext context, UIComponent component){
+ Skin skin = getSkin(context);
+ String color = (String) skin.getParameter(context,"headerBackgroundColor");
+ return color;
+ }
+
+ public String getColor(FacesContext context, UIComponent component){
+ Skin skin = getSkin(context);
+ String color = (String) skin.getParameter(context,"headerTextColor");
+ return color;
+ }
+
+
+ public void insertValue(FacesContext context, UIComponent component) throws IOException {
+ Object value = component.getAttributes().get("value");
+ if (value!=null){
+ context.getResponseWriter().write(value.toString());
+ }
+ }
+
+ protected String getTopRightDivStyle(FacesContext context, UIComponent component){
+ String trImgSrc = getImageSrc(context, component, "tr");
+ return "background: url(" + trImgSrc + ") no-repeat top right;";
+ }
+
+ protected String getBottomRightDivStyle(FacesContext context, UIComponent component){
+ String brImgSrc = getImageSrc(context, component, "br");
+ return "background: url(" + brImgSrc + ") no-repeat top right;";
+ }
+
+ protected String getMainDivStyle(FacesContext context, UIComponent component){
+ String style = "width: 250px;background-color:" + getBgColor(context, component) + ";color: " + getColor(context, component) + ";";
+ return style;
+ }
+
+ protected String getTRImageSrc(FacesContext context, UIComponent component){
+ return getImageSrc(context, component, "tr");
+ }
+
+ protected String getBRImageSrc(FacesContext context, UIComponent component){
+ return getImageSrc(context, component, "br");
+ }
+
+ public void insertScript(FacesContext context, UIComponent component) throws IOException{
+
+ UIToolTip toolTip = (UIToolTip)component;
+ String parentClientId = toolTip.getParent().getClientId(context);
+ StringBuffer ret = new StringBuffer();
+ ret.append("<script ");
+ ret.append("type=\"text/javascript\" ");
+ ret.append("id =\"script" + component.getClientId(context)+"\">\n");
+ String comma = ",";
+ String quot = "\"";
+ StringBuffer script = new StringBuffer();
+ //
+ script.append("var tooltip1 = ").
+
+ append("new ToolTip(").append(quot).append("tooltip" + toolTip.getClientId(context).toString()).append(quot).append(comma).
+ append(quot).append(parentClientId).append(quot).append(comma).
+ append(quot).append(toolTip.getMode()).append(quot).append(comma).
+ append(toolTip.isDisabled()).append(comma).
+ append(quot).append(toolTip.getDirection()).append(quot).append(comma).
+ append(toolTip.isFollowMouse()).append(comma).
+ append(toolTip.getHorizontalOffset()).append(comma).
+ append(toolTip.getVerticalOffset()).append(");\n");
+ ret.append(script.toString());
+
+ //
+ //ret.append("function toolTipAttach(){tooltip1.attachParentEvents() }\n");
+
+ ret.append("\n</script>");
+
+ ResponseWriter writer = context.getResponseWriter();
+ writer.write(ret.toString());
+
+ }
+
+}
+
Property changes on: trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/AbstractToolTipCornerImage.java
===================================================================
--- trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/AbstractToolTipCornerImage.java (rev 0)
+++ trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/AbstractToolTipCornerImage.java 2007-06-21 16:56:03 UTC (rev 1265)
@@ -0,0 +1,173 @@
+package org.richfaces.renderkit.html.image;
+
+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.Arc2D;
+import java.awt.geom.Ellipse2D;
+import java.awt.geom.GeneralPath;
+import java.awt.image.AffineTransformOp;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.util.Date;
+
+import javax.faces.context.FacesContext;
+import javax.imageio.ImageIO;
+
+import org.ajax4jsf.framework.resource.GifRenderer;
+import org.ajax4jsf.framework.resource.InternetResourceBuilder;
+import org.ajax4jsf.framework.resource.Java2Dresource;
+import org.ajax4jsf.framework.resource.JpegRenderer;
+import org.ajax4jsf.framework.resource.ResourceContext;
+import org.ajax4jsf.framework.skin.Skin;
+import org.ajax4jsf.framework.skin.SkinFactory;
+import org.ajax4jsf.framework.util.HtmlColor;
+import org.ajax4jsf.framework.util.HtmlDimensions;
+
+public abstract class AbstractToolTipCornerImage extends Java2Dresource{
+
+ public AbstractToolTipCornerImage() {
+ setRenderer(new GifRenderer());
+ setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+ }
+
+ public Dimension getDimensions(FacesContext facesContext, Object data) {
+ return calculateDimensions(getDataToStore(facesContext, data));
+ }
+
+ protected Dimension getDimensions(ResourceContext resourceContext) {
+ return calculateDimensions(restoreData(resourceContext));
+ }
+
+ protected Dimension calculateDimensions(Object data){
+ Object [] stored = (Object []) data;
+ int h = ((Integer) stored[0]).intValue();
+ return new Dimension(h,h);
+ }
+
+ protected Object getDataToStore(FacesContext context, Object data) {
+ Object[] stored = new Object[5];
+ Skin skin = SkinFactory.getInstance().getSkin(context);
+
+ stored[0] = new Integer(HtmlDimensions.decode("15px").intValue());
+
+ Color col = null;
+
+ if (data!=null){
+ col = HtmlColor.decode(data.toString());
+ } else {
+ col = HtmlColor.decode(skin.getParameter(context, "headerBackgroundColor").toString());
+ }
+ stored[1]= col;
+ return stored;
+ }
+
+ public boolean isCacheable() {
+ return true;
+ }
+/*
+ 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);
+ Object [] data = (Object[]) restoreData(context);
+ Color col = (Color)data[1];
+
+ g2d.setColor(col);
+
+ path.moveTo(1,1);
+ path.lineTo(17,1);
+ path.lineTo(47,31);
+ path.lineTo(17,61);
+ 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();
+ try {
+ ImageIO.write(bufferedImage, "gif", new File("yourImage.gif"));
+ } catch(IOException e) {
+ System.out.println("write error: " + e.getMessage());
+ }
+
+ }
+*/
+
+ protected void paint(ResourceContext context, Graphics2D g2d) {
+
+ // Dimension dimension = getDimensions(context);
+ Object [] data = (Object[]) restoreData(context);
+
+ Color col = (Color)data[1];
+ g2d.setColor(col);
+
+ //Color col = Color.BLUE;
+ //dimension.
+ //int dim = (int) Math.round(15);
+/*
+ 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);
+ 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);
+*/
+// g2d.setBackground(Color.GREEN);
+
+
+// active
+
+
+
+
+ /*
+ AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight()/128, dimension.getHeight()/128);
+ AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
+ */
+ drawImage(g2d);
+ }
+
+ protected abstract void drawImage(Graphics2D g2d);
+
+/*
+ public static void main(String[] args){
+ ToolTipCornerImage im = new ToolTipCornerImage();
+ BufferedImage bufferedImage = new BufferedImage(15, 15, BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g2d = bufferedImage.createGraphics();
+ im.paint(null, g2d);
+ try {
+ ImageIO.write(bufferedImage, "gif", new File("yourImage.jpg"));
+ } catch(IOException e) {
+ System.out.println("write error: " + e.getMessage());
+ }
+ }
+*/
+}
Property changes on: trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/AbstractToolTipCornerImage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/BottomLeftToolTipCornerImage.java
===================================================================
--- trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/BottomLeftToolTipCornerImage.java (rev 0)
+++ trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/BottomLeftToolTipCornerImage.java 2007-06-21 16:56:03 UTC (rev 1265)
@@ -0,0 +1,39 @@
+package org.richfaces.renderkit.html.image.cornerimages;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.Arc2D;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+import org.richfaces.renderkit.html.image.AbstractToolTipCornerImage;
+
+public class BottomLeftToolTipCornerImage extends AbstractToolTipCornerImage{
+
+ protected void drawImage(Graphics2D g2d) {
+ // TODO Auto-generated method stub
+ //g2d.setBackground(Color.YELLOW);
+ //g2d.setColor(Color.GREEN);
+ Arc2D arc = new Arc2D.Float();
+ arc.setArc(0, -15, 30, 30, 180, 90, Arc2D.PIE );
+ g2d.fill(arc);
+
+ g2d.dispose();
+ }
+
+ public static void main(String[] args){
+ BottomLeftToolTipCornerImage im = new BottomLeftToolTipCornerImage();
+ BufferedImage bufferedImage = new BufferedImage(15, 15, BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g2d = bufferedImage.createGraphics();
+ im.paint(null, g2d);
+ try {
+ ImageIO.write(bufferedImage, "gif", new File("bl.gif"));
+ } catch(IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+}
Property changes on: trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/BottomLeftToolTipCornerImage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/BottomRightToolTipCornerImage.java
===================================================================
--- trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/BottomRightToolTipCornerImage.java (rev 0)
+++ trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/BottomRightToolTipCornerImage.java 2007-06-21 16:56:03 UTC (rev 1265)
@@ -0,0 +1,38 @@
+package org.richfaces.renderkit.html.image.cornerimages;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.Arc2D;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+import org.richfaces.renderkit.html.image.AbstractToolTipCornerImage;
+
+public class BottomRightToolTipCornerImage extends AbstractToolTipCornerImage{
+
+ protected void drawImage(Graphics2D g2d) {
+ //g2d.setBackground(Color.YELLOW);
+ //g2d.setColor(Color.GREEN);
+ Arc2D arc = new Arc2D.Float();
+ arc.setArc(-15, -15, 30, 30, 270, 90, Arc2D.PIE );
+ g2d.fill(arc);
+
+ g2d.dispose();
+ }
+
+ public static void main(String[] args){
+ BottomRightToolTipCornerImage im = new BottomRightToolTipCornerImage();
+ BufferedImage bufferedImage = new BufferedImage(15, 15, BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g2d = bufferedImage.createGraphics();
+ im.paint(null, g2d);
+ try {
+ ImageIO.write(bufferedImage, "gif", new File("br.gif"));
+ } catch(IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+}
Property changes on: trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/BottomRightToolTipCornerImage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/TopLeftToolTipCornerImage.java
===================================================================
--- trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/TopLeftToolTipCornerImage.java (rev 0)
+++ trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/TopLeftToolTipCornerImage.java 2007-06-21 16:56:03 UTC (rev 1265)
@@ -0,0 +1,40 @@
+package org.richfaces.renderkit.html.image.cornerimages;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.Arc2D;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+import org.richfaces.renderkit.html.image.AbstractToolTipCornerImage;
+
+public class TopLeftToolTipCornerImage extends AbstractToolTipCornerImage{
+
+
+ protected void drawImage(Graphics2D g2d) {
+ // TODO Auto-generated method stub
+ //g2d.setColor(Color.GREEN);
+ Arc2D arc = new Arc2D.Float();
+ arc.setArc(0, 0, 30, 30, 90, 90, Arc2D.PIE );
+ g2d.fill(arc);
+
+ g2d.dispose();
+
+ }
+
+ public static void main(String[] args){
+ TopLeftToolTipCornerImage im = new TopLeftToolTipCornerImage();
+ BufferedImage bufferedImage = new BufferedImage(15, 15, BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g2d = bufferedImage.createGraphics();
+ im.paint(null, g2d);
+ try {
+ ImageIO.write(bufferedImage, "gif", new File("tl.gif"));
+ } catch(IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+}
Property changes on: trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/TopLeftToolTipCornerImage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/TopRightToolTipCornerImage.java
===================================================================
--- trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/TopRightToolTipCornerImage.java (rev 0)
+++ trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/TopRightToolTipCornerImage.java 2007-06-21 16:56:03 UTC (rev 1265)
@@ -0,0 +1,24 @@
+package org.richfaces.renderkit.html.image.cornerimages;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.Arc2D;
+
+import org.richfaces.renderkit.html.image.AbstractToolTipCornerImage;
+
+
+public class TopRightToolTipCornerImage extends AbstractToolTipCornerImage{
+
+
+ protected void drawImage(Graphics2D g2d) {
+ // TODO Auto-generated method stub
+ //g2d.setColor(Color.GREEN);
+ Arc2D arc = new Arc2D.Float();
+ arc.setArc(-15, 0, 30, 30, 0, 90, Arc2D.PIE );
+ g2d.fill(arc);
+
+ g2d.dispose();
+
+ }
+
+}
Property changes on: trunk/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/image/cornerimages/TopRightToolTipCornerImage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/css/tooltip.xcss
===================================================================
--- trunk/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/css/tooltip.xcss (rev 0)
+++ trunk/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/css/tooltip.xcss 2007-06-21 16:56:03 UTC (rev 1265)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:template
+ xmlns:f="http://jsf.exadel.com/template"
+ xmlns:u="http://jsf.exadel.com/template/util"
+ xmlns="http://www.w3.org/1999/xhtml">
+
+<f:verbatim>
+img.corner {
+ width: 15px;
+ height: 15px;
+ border: none;
+ display: block !important;
+}
+
+</f:verbatim>
+</f:template>
Added: trunk/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
===================================================================
--- trunk/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js (rev 0)
+++ trunk/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2007-06-21 16:56:03 UTC (rev 1265)
@@ -0,0 +1,171 @@
+// Detect if the browser is IE or not.
+// If it is not IE, we assume that the browser is NS.
+var IE = document.all?true:false;
+
+// If NS -- that is, !IE -- then set up for mouse capture
+if (!IE) document.captureEvents(Event.MOUSEMOVE)
+
+// Temporary variables to hold mouse x-y pos.s
+var cursorX = 0;
+var cursorY = 0;
+
+// Main function to retrieve mouse x-y pos.s
+
+function getMouseXY(e) {
+if (IE) { // grab the x-y pos.s if browser is IE
+cursorX = event.clientX + document.body.scrollLeft;
+cursorY = event.clientY + document.body.scrollTop;
+} else { // grab the x-y pos.s if browser is NS
+cursorX = e.pageX;
+cursorY = e.pageY;
+}
+// catch possible negative values in NS4
+if (cursorX < 0){cursorX = 0;}
+if (cursorY < 0){cursorY = 0;}
+// show the position values in the form named Show
+// in the text fields named MouseX and MouseY
+$('mouseX').value = cursorX;
+$('mouseY').value = cursorY;
+return true;
+}
+
+// Set-up to use getMouseXY function onMouseMove
+document.onmousemove = getMouseXY;
+
+
+ToolTip = Class.create();
+
+ToolTip.prototype = {
+ initialize:function(id, parentId, mode, disabled, direction, followMouse, horizontalOffset, verticalOffset){
+ this.id = id;
+ this.parentId = parentId;
+ this.mode = mode;
+ this.direction = direction;
+ this.disabled = disabled;
+ this.followMouse = followMouse;
+ this.horizontalOffset = horizontalOffset;
+ this.verticalOffset = verticalOffset;
+ this.toolTip = $(id);
+
+ this.toolTipW = this.toolTip.clientWidth;
+ this.toolTipH = this.toolTip.clientHeight;
+ this.toolTip.style.display = "none";
+ this.parentAttached = false;
+
+ //document.body.attachEvent("load", this.attachOnLoadEvents);
+ //document.body.onload = this.attachOnLoadEvents.bindAsEventListener(this);
+
+ Event.observe(document.getElementsByTagName("body")[0], "mousemove", this.attachOnLoadEvents.bindAsEventListener(this), true);
+ },
+ attachOnLoadEvents: function(){
+ //alert('onload');
+ if(!this.parentAttached){
+ this.parent = $(this.parentId);
+ if(this.parent != null && !this.disabled){
+ this.attachParentEvents();
+ this.parentAttached = true;
+ }
+ }
+ },
+ attachParentEvents: function(){
+ if(this.followMouse){
+ Event.observe(this.parent, "mousemove", this.doShow.bindAsEventListener(this), false);
+ } else {
+ Event.observe(this.parent, "mouseover", this.doShow.bindAsEventListener(this), false);
+ }
+
+ Event.observe(this.parent, "mouseout", this.doHide.bindAsEventListener(this), false);
+ },
+ doShow: function(){
+
+ this.setToolTipPosition();
+ this.toolTip.style.display = "block";
+
+ },
+
+ doHide: function(){
+ this.toolTip.style.display = "none";
+ },
+
+ doEnable: function(){
+ this.disabled = false;
+ },
+ doDisable: function(){
+ this.disabled = true;
+ },
+
+ setToolTipPosition: function(){
+ var windowDim = this.windowSize();
+
+ if(this.direction == "top-left"){
+ if(cursorY - this.verticalOffset - this.toolTip.clientHeight < 0){
+ this.toolTip.style.top = cursorY - this.verticalOffset - this.toolTipH;
+ } else {
+ this.toolTip.style.top = cursorY + this.verticalOffset;
+ }
+ if(cursorX - this.horizontalOffset - this.toolTipW < 0){
+ this.toolTip.style.left = cursorX + this.horizontalOffset;
+ } else {
+ this.toolTip.style.left = cursorX - this.horizontalOffset - this.toolTipW;
+ }
+
+ } else if(this.direction == "bottom-left"){
+ if(cursorY + this.verticalOffset - this.toolTipH > windowDim[1]){
+ this.toolTip.style.top = cursorY - this.verticalOffset - this.toolTipH;
+ } else {
+ this.toolTip.style.top = cursorY + this.verticalOffset;
+ }
+ if(cursorX - this.horizontalOffset - this.toolTipW < 0){
+ this.toolTip.style.left = cursorX + this.horizontalOffset ;
+ } else {
+ this.toolTip.style.left = cursorX - this.horizontalOffset - this.toolTopW;
+ }
+ } else if(this.direction == "top-right"){
+ if(cursorY - this.verticalOffset - this.toolTipH < 0){
+ this.toolTip.style.top = cursorY + this.verticalOffset;
+ } else {
+ this.toolTip.style.top = cursorY - this.verticalOffset - this.toolTipH;
+ }
+ if(cursorX + this.horizontalOffset + this.toolTipW > windowDim[0]){
+ this.toolTip.style.left = cursorX - this.horizontalOffset - this.toolTipW;
+ } else {
+ this.toolTip.style.left = cursorX + this.horizontalOffset;
+ }
+
+ } else {
+ // bottom-right is default
+ if(cursorY + this.verticalOffset - this.toolTip.clientHeight > windowDim[1]){
+ this.toolTip.style.top = cursorY - this.verticalOffset - this.toolTipH;
+ } else {
+ this.toolTip.style.top = cursorY + this.verticalOffset;
+ }
+ if(cursorX + this.horizontalOffset + this.toolTip.clientWidth > windowDim[0]){
+ this.toolTip.style.left = cursorX - this.horizontalOffset - this.toolTipW;
+ } else {
+ this.toolTip.style.left = cursorX + this.horizontalOffset;
+ }
+ }
+ },
+
+ windowSize: function() {
+ var wWidth = 0, wHeight = 0;
+ if( typeof( window.innerWidth ) == 'number' ) {
+ //Non-IE
+ wWidth = window.innerWidth;
+ wHeight = window.innerHeight;
+ } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
+ //IE 6+ in 'standards compliant mode'
+ wWidth = document.documentElement.clientWidth;
+ wHeight = document.documentElement.clientHeight;
+ } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
+ //IE 4 compatible
+ wWidth = document.body.clientWidth;
+ wHeight = document.body.clientHeight;
+ }
+ return [wWidth,wHeight];
+ }
+
+
+ //
+
+}
\ No newline at end of file
Property changes on: trunk/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/sandbox/tooltip/src/main/templates/README
===================================================================
Added: trunk/sandbox/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx
===================================================================
--- trunk/sandbox/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx (rev 0)
+++ trunk/sandbox/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx 2007-06-21 16:56:03 UTC (rev 1265)
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root
+ xmlns:f="http:/jsf.exadel.com/template"
+ xmlns:h=" http://ajax4jsf.org/cdk/headers"
+ xmlns:c=" http://java.sun.com/jsf/core"
+ xmlns:ui=" http://ajax4jsf.org/cdk/ui"
+ xmlns:u=" http://ajax4jsf.org/cdk/u"
+ xmlns:x=" http://ajax4jsf.org/cdk/x"
+ xmlns:vcp="http://ajax4jsf.org/cdk/vcp"
+ class="org.richfaces.renderkit.html.HtmlToolTipRenderer"
+ baseclass="org.richfaces.renderkit.html.ToolTipRenderer"
+ component="org.richfaces.component.UIToolTip" >
+
+ <h:styles>
+ /org/richfaces/renderkit/html/css/tooltip.xcss
+ </h:styles>
+ <h:scripts>
+ new org.ajax4jsf.framework.resource.PrototypeScript(),
+ new org.ajax4jsf.framework.ajax.AjaxScript(),
+ /org/richfaces/renderkit/html/scripts/utils.js,
+ /org/richfaces/renderkit/html/scripts/tooltip.js
+ </h:scripts>
+
+<!--
+ <style type="text/css">
+ .roundtop {
+ background: url(#{this:getTRImageSrc(context, component)}) no-repeat top right;
+ }
+
+ .roundbottom {
+ background: url(#{this:getBRImageSrc(context, component)}) no-repeat top right;
+ }
+ </style>
+
+
+
+
+ <div style="#{this:getMainDivStyle(context, component)}">
+ <div class="roundtop">
+ <f:call name="insertImage">
+ <f:parameter value="tl"/>
+ </f:call>
+ </div>
+ <p style="margin: 0 10px;">
+ <f:call name="insertValue"/>
+ <vcp:body>
+ <f:call name="renderChildren"/>
+ </vcp:body>
+ <f:clientid var="clientId"/>
+
+ </p>
+ <div class="roundbottom">
+ <f:call name="insertImage">
+ <f:parameter value="bl"/>
+ </f:call>
+ </div>
+</div>
+
+
+ <hr/>
+-->
+
+ <f:clientid var="clientId"/>
+
+ <div id="tooltip#{clientId}" style="position: absolute; display : none;">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td width="15px">
+ <f:call name="insertImage">
+ <f:parameter value="tl"/>
+ </f:call>
+ </td>
+ <td bgcolor="#{this:getBgColor(context, component)}"><f:call name="insertImage">
+ <f:parameter value="br"/>
+ </f:call></td>
+ <td width="15px">
+ <f:call name="insertImage">
+ <f:parameter value="tr"/>
+ </f:call>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#{this:getBgColor(context, component)}"></td>
+ <td bgcolor="#{this:getBgColor(context, component)}">
+ <jsp:scriptlet>
+ <![CDATA[if(component.getFacet("defaultContent")!=null && component.getFacet("defaultContent").isRendered()) {]]>
+ </jsp:scriptlet>
+ <span class="dr-rich-tool-tip rich-tool-tip">
+ <u:insertFacet name="defaultContent" />
+ </span>
+ <jsp:scriptlet>
+ <![CDATA[} else {]]>
+ </jsp:scriptlet>
+ <span class="dr-rich-tool-tip rich-tool-tip">#{component.attributes['value']}</span>
+ <jsp:scriptlet>
+ <![CDATA[}]]>
+ </jsp:scriptlet>
+
+ </td>
+ <td bgcolor="#{this:getBgColor(context, component)}"></td>
+ </tr>
+ <tr>
+ <td>
+ <f:call name="insertImage">
+ <f:parameter value="bl"/>
+ </f:call>
+ </td>
+ <td bgcolor="#{this:getBgColor(context, component)}"><f:call name="insertImage">
+ <f:parameter value="br"/>
+ </f:call></td>
+ <td>
+ <f:call name="insertImage">
+ <f:parameter value="br"/>
+ </f:call>
+ </td>
+ </tr>
+
+ </table>
+ <f:call name="insertScript"/>
+ </div>
+ <!-- f:call name="utils.encodeEndFormIfNessesary"/-->
+</f:root>
Added: trunk/sandbox/tooltip/src/test/java/org/richfaces/component/JSFComponentTest.java
===================================================================
--- trunk/sandbox/tooltip/src/test/java/org/richfaces/component/JSFComponentTest.java (rev 0)
+++ trunk/sandbox/tooltip/src/test/java/org/richfaces/component/JSFComponentTest.java 2007-06-21 16:56:03 UTC (rev 1265)
@@ -0,0 +1,53 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.component;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import javax.faces.component.UIComponent;
+
+/**
+ * Unit test for simple Component.
+ */
+public class JSFComponentTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public JSFComponentTest( String testName )
+ {
+ super( testName );
+ }
+
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testComponent()
+ {
+ assertTrue( true );
+ }
+}
Property changes on: trunk/sandbox/tooltip/src/test/java/org/richfaces/component/JSFComponentTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
17 years, 6 months
JBoss Rich Faces SVN: r1264 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-06-21 12:53:39 -0400 (Thu, 21 Jun 2007)
New Revision: 1264
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
Log:
Add Quick find in column functionality (only for currently loaded rows)
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js 2007-06-21 16:33:52 UTC (rev 1263)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js 2007-06-21 16:53:39 UTC (rev 1264)
@@ -173,14 +173,15 @@
setProgressCtrl: function(ctrl) {
this.getBody().setProgressCtrl(ctrl);
},
- quickFind: function(column, text) {
+ quickFind: function(column, text, startRow) {
+ var start = startRow || 0;
var searchText = "*" + text + "*";
searchText = searchText.replace(/\*/g, ".*");
var searchReg = new RegExp(searchText, 'i');
var rowIndex = -1;
var body = this.getBody();
var rowsCount = body.rowsCount;
- for (var i = 0; i < rowsCount; i++) {
+ for (var i = start; i < rowsCount; i++) {
var currentTextInGrid = body.getCellText(i, column);
currentTextInGrid = currentTextInGrid.replace(/,/g,'');
if (currentTextInGrid.search(searchReg) != -1) {
@@ -189,14 +190,14 @@
}
}
- return rowIndex>=0 ? (body.currRange.start+rowIndex) : -1;
+ return rowIndex;
},
ensureVisible: function(index) {
this.getBody().ensureVisible(index);
},
- convertRowIndex: function(index) {
+ getDataIndex: function(rowIndex) {
var body = this.getBody();
- return (index>(body.currRange.start+body.rowsCount)) ? (body.currRange.start - body.currRange.start) : -1;
+ return this.getBody().currRange.start+rowIndex;
},
hideColumn: function(column) {
this.adjustColumnWidth(column, 0);
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-21 16:33:52 UTC (rev 1263)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-21 16:53:39 UTC (rev 1264)
@@ -740,9 +740,14 @@
},
ensureVisible: function (index) {
if(index>=0 && index<this.grid.dataModel.getCount()) {
- var y = index*this.defaultRowHeight;
- this.currentPos = 0;
- this._onContentVScroll(y);
+
+ var visibleRows = parseInt(this.contentBox.getHeight() / this.defaultRowHeight, 10) + 1;
+ if(this.grid.dataModel.getCount() > visibleRows) {
+ var y = index*this.defaultRowHeight;
+ this.currentPos = 0;
+ this._onContentVScroll(y);
+ this.scrollBox.getElement().scrollTop = y;
+ }
}
},
_getRowIndex: function(rowId) {
17 years, 6 months
JBoss Rich Faces SVN: r1263 - in trunk/richfaces/datascroller/src/main: java/org/richfaces/component and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-06-21 12:33:52 -0400 (Thu, 21 Jun 2007)
New Revision: 1263
Modified:
trunk/richfaces/datascroller/src/main/config/component/datascroller.xml
trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
Log:
http://jira.jboss.com/jira/browse/RF-341
Modified: trunk/richfaces/datascroller/src/main/config/component/datascroller.xml
===================================================================
--- trunk/richfaces/datascroller/src/main/config/component/datascroller.xml 2007-06-21 16:13:34 UTC (rev 1262)
+++ trunk/richfaces/datascroller/src/main/config/component/datascroller.xml 2007-06-21 16:33:52 UTC (rev 1263)
@@ -85,13 +85,6 @@
</property>
<property>
- <name>pageIndex</name>
- <classname>java.lang.String</classname>
- <description>Attribute defines index of initial page when this component is rendered
- </description>
- </property>
-
- <property>
<name>rendered</name>
<classname>java.lang.String</classname>
<description>If "false", this component is not rendered</description>
Modified: trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
===================================================================
--- trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2007-06-21 16:13:34 UTC (rev 1262)
+++ trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2007-06-21 16:33:52 UTC (rev 1263)
@@ -307,23 +307,6 @@
}
- /**
- * Sets the page index
- *
- * @param page number
- */
- public void setPageIndex(int page) {
- UIData uiData = getDataTable();
- int rows = getRows(uiData);
- if (0 == rows) {
- throw new FacesException("Missing 'rows' attribute on component '"
- + uiData.getId() + "'");
- }
- if (page > 0) {
- setFirstRow(page * rows);
- }
- }
-
public int getPageCount(UIData data) {
int rows = getRows(data);
int pageCount;
17 years, 6 months
JBoss Rich Faces SVN: r1262 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-06-21 12:13:34 -0400 (Thu, 21 Jun 2007)
New Revision: 1262
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
Log:
Draft "Hide column" functionality
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js 2007-06-21 16:05:45 UTC (rev 1261)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js 2007-06-21 16:13:34 UTC (rev 1262)
@@ -172,6 +172,34 @@
},
setProgressCtrl: function(ctrl) {
this.getBody().setProgressCtrl(ctrl);
+ },
+ quickFind: function(column, text) {
+ var searchText = "*" + text + "*";
+ searchText = searchText.replace(/\*/g, ".*");
+ var searchReg = new RegExp(searchText, 'i');
+ var rowIndex = -1;
+ var body = this.getBody();
+ var rowsCount = body.rowsCount;
+ for (var i = 0; i < rowsCount; i++) {
+ var currentTextInGrid = body.getCellText(i, column);
+ currentTextInGrid = currentTextInGrid.replace(/,/g,'');
+ if (currentTextInGrid.search(searchReg) != -1) {
+ rowIndex = i;
+ break;
+ }
+ }
+
+ return rowIndex>=0 ? (body.currRange.start+rowIndex) : -1;
+ },
+ ensureVisible: function(index) {
+ this.getBody().ensureVisible(index);
+ },
+ convertRowIndex: function(index) {
+ var body = this.getBody();
+ return (index>(body.currRange.start+body.rowsCount)) ? (body.currRange.start - body.currRange.start) : -1;
+ },
+ hideColumn: function(column) {
+ this.adjustColumnWidth(column, 0);
}
});
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-21 16:05:45 UTC (rev 1261)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-21 16:13:34 UTC (rev 1262)
@@ -351,7 +351,7 @@
},
adjustColumnWidth: function(column, width) {
var columns = this.grid.getHeader().getColumns();
- columns[column].bodyCol.width = width;
+ columns[column].bodyCol.width = width>0 ? width : 1;
},
setFakeColumnWidth: function() {
@@ -726,6 +726,25 @@
return options;
},
+ getCellText: function(row, column) {
+ var tbl = this.templFrozen.getElement().rows[row].cells;
+ var fcount = tbl.length;
+ var index = column;
+ if(index >= fcount) {
+ index -= fcount;
+ tbl = this.templNormal.getElement().rows[row].cells;
+ }
+
+ var cell = document.getElementsByClassName("ClientUI_Grid_BCBody", tbl[index]);
+ return (cell && cell.length && cell.length>0) ? cell[0].innerHTML : "";
+ },
+ ensureVisible: function (index) {
+ if(index>=0 && index<this.grid.dataModel.getCount()) {
+ var y = index*this.defaultRowHeight;
+ this.currentPos = 0;
+ this._onContentVScroll(y);
+ }
+ },
_getRowIndex: function(rowId) {
return Number(rowId.split(this.grid.getElement().id)[1].split(":")[2]);
}
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2007-06-21 16:05:45 UTC (rev 1261)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2007-06-21 16:13:34 UTC (rev 1262)
@@ -166,7 +166,7 @@
},
adjustColumnWidth: function(column, width) {
var columns = this.grid.getHeader().getColumns();
- columns[column].footerCol.width = width;
+ columns[column].footerCol.width = width>0 ? width : 1;
},
setFakeColumnWidth: function() {
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-06-21 16:05:45 UTC (rev 1261)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-06-21 16:13:34 UTC (rev 1262)
@@ -413,7 +413,8 @@
}
},
adjustColumnWidth: function(column, width) {
- this._columns[column].col.width = width;
+ this._columns[column].col.width = width>0 ? width : 1;
+ if(width<=0) this.getColumns()[column].sep.hide();
this._columns[column].width = width;
this.agjustSeparators();
},
17 years, 6 months
JBoss Rich Faces SVN: r1261 - trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-06-21 12:05:45 -0400 (Thu, 21 Jun 2007)
New Revision: 1261
Modified:
trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java
Log:
http://jira.jboss.com/jira/browse/RF-296
Modified: trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java
===================================================================
--- trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java 2007-06-21 15:17:06 UTC (rev 1260)
+++ trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java 2007-06-21 16:05:45 UTC (rev 1261)
@@ -28,6 +28,7 @@
import javax.faces.component.ActionSource;
import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
@@ -46,6 +47,8 @@
public static final boolean COLLAPSED = false;
public static final boolean EXPANDED = true;
+ private boolean _opened = true;
+
//xxxx by nick - why properties here? just describe them in config and CDK generates
//valid fields & save/restore code
//for "public" (.tld etc.) properties you should create abstract getters/setters only
@@ -58,9 +61,31 @@
public abstract String getSwitchType();
- public abstract void setOpened(boolean opened);
+ /** A false value for this attribute makes a panel closed as default
+ * Setter for opened
+ * @param opened - new value
+ */
+ public void setOpened(boolean opened) {
+ _opened = opened;
+ }
- public abstract boolean isOpened();
+ /**
+ * A false value for this attribute makes a panel closed as default
+ * Getter for opened
+ * @return opened value from local variable or value bindings
+ */
+ public boolean isOpened() {
+ ValueBinding vb = getValueBinding("opened");
+ if (vb != null) {
+ Boolean value = (Boolean) vb.getValue(getFacesContext());
+ if (null == value) {
+ return this._opened;
+ }
+ return (value.booleanValue());
+ } else {
+ return (this._opened);
+ }
+ }
public boolean getRendersChildren() {
return true;
17 years, 6 months
JBoss Rich Faces SVN: r1260 - trunk.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-06-21 11:17:06 -0400 (Thu, 21 Jun 2007)
New Revision: 1260
Modified:
trunk/richfaces_classes.xls
Log:
Refactoring list updated
Modified: trunk/richfaces_classes.xls
===================================================================
(Binary files differ)
17 years, 6 months