Source Code Cross Referenced for TreeFilter.java in  » Ajax » gwtext-2.01 » com » gwtext » client » widgets » tree » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » gwtext 2.01 » com.gwtext.client.widgets.tree 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * GWT-Ext Widget Library
003:         * Copyright(c) 2007-2008, GWT-Ext.
004:         * licensing@gwt-ext.com
005:         * 
006:         * http://www.gwt-ext.com/license
007:         */
008:        package com.gwtext.client.widgets.tree;
009:
010:        import com.google.gwt.core.client.JavaScriptObject;
011:        import com.gwtext.client.core.JsObject;
012:
013:        /**
014:         * Supports filtering of TreePanel nodes.
015:         */
016:        public class TreeFilter extends JsObject {
017:
018:            /**
019:             * Create a new TreeFilter.
020:             *
021:             * @param treePanel the tree panel to filter
022:             */
023:            public TreeFilter(TreePanel treePanel) {
024:                jsObj = create(treePanel.getOrCreateJsObj(), null);
025:            }
026:
027:            /**
028:             * Create a new TreeFilter.
029:             *
030:             * @param treePanel the tree panel to filter
031:             * @param config the TreePanelFilter config
032:             */
033:            public TreeFilter(TreePanel treePanel, TreeFilterConfig config) {
034:                jsObj = create(treePanel.getOrCreateJsObj(),
035:                        config == null ? null : config.getJsObj());
036:            }
037:
038:            protected native JavaScriptObject create(
039:                    JavaScriptObject treePanel, JavaScriptObject config)/*-{
040:                    return new $wnd.Ext.tree.TreeFilter(treePanel, config);
041:                }-*/;
042:
043:            /**
044:             * Clears the current filter. Note: with the "remove" TreeFilterConfig option set a filter cannot be cleared.
045:             */
046:            public native void clear() /*-{
047:                   var filter = this.@com.gwtext.client.core.JsObject::getJsObj()();
048:                   filter.clear();
049:               }-*/;
050:
051:            //TODO filter based on specific node attributes
052:            /**
053:             *  Filter the data.
054:             * 
055:             * @param value the node's text value
056:             */
057:            public native void filter(String value) /*-{
058:                   var filter = this.@com.gwtext.client.core.JsObject::getJsObj()();
059:                   filter.filter(value);
060:               }-*/;
061:
062:            /**
063:             *  Filter the data.
064:             *
065:             * @param value the node's text
066:             * @param startNode the node to start filtering from
067:             */
068:            public native void filter(String value, TreeNode startNode) /*-{
069:                   var filter = this.@com.gwtext.client.core.JsObject::getJsObj()();
070:                   var node = startNode.@com.gwtext.client.core.JsObject::getJsObj()();
071:                   filter.filter(value, null, node);
072:               }-*/;
073:
074:            /**
075:             *  Filter the data.
076:             *
077:             * @param regexp regexp to test the node value against
078:             */
079:            public native void filterRe(String regexp) /*-{
080:                   var filter = this.@com.gwtext.client.core.JsObject::getJsObj()();
081:                   filter.filter(new $wnd.RegExp(regexp));
082:               }-*/;
083:
084:            /**
085:             *  Filter the data.
086:             *
087:             * @param regexp regexp to test the node value against
088:             * @param startNode the node to start filtering from
089:             */
090:            public native void filterRe(String regexp, TreeNode startNode) /*-{
091:                   var filter = this.@com.gwtext.client.core.JsObject::getJsObj()();
092:                   var node = startNode.@com.gwtext.client.core.JsObject::getJsObj()();
093:                   filter.filter(new $wnd.RegExp(regexp), null, node);
094:               }-*/;
095:
096:            /**
097:             * Filter by a callback function. The passed function will be called with each node in the tree (or from the startNode).
098:             * If the callback returns true, the node is kept otherwise it is filtered. If a node is filtered, its children are also
099:             * filtered.
100:             *
101:             * @param callback the filter callback
102:             */
103:            public native void filterBy(TreeTraversalCallback callback) /*-{
104:                  var filter = this.@com.gwtext.client.core.JsObject::getJsObj()();
105:                  filter.filterBy(function(node) {
106:                       var nodeJ = @com.gwtext.client.widgets.tree.TreeNode::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(node);
107:                       return callback.@com.gwtext.client.widgets.tree.TreeTraversalCallback::execute(Lcom/gwtext/client/widgets/tree/TreeNode;)(nodeJ);
108:                   });
109:              }-*/;
110:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.