Java Doc for Viewer.java in  » Ajax » MyGWT » net » mygwt » ui » client » viewer » 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 » MyGWT » net.mygwt.ui.client.viewer 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.mygwt.ui.client.util.Observable
      net.mygwt.ui.client.viewer.Viewer

All known Subclasses:   net.mygwt.ui.client.viewer.ColumnViewer,  net.mygwt.ui.client.viewer.TemplateViewer,  net.mygwt.ui.client.viewer.TreeViewer,  net.mygwt.ui.client.viewer.ListViewer,
Viewer
abstract public class Viewer extends Observable implements ISelectionProvider(Code)
A Viewer is a model-based adapter for a Widget. Supports custom sorting, filtering.


Field Summary
protected  Object[]elements
    
protected  Objectinput
     This viewer's input, or null if none.


Method Summary
abstract protected  voidadd(Object elem)
     Adds the element.
public  voidaddFilter(ViewerFilter filter)
     Adds the given filter to this viewer, and triggers refiltering and resorting of the elements.
public  voidaddSelectionListener(ISelectionChangedListener listener)
    
public  voidapplyFilters()
     Applies the viewer's filters.
protected  Object[]filter(Object[] elements)
     Returns the result of running the given elements through the filters.
abstract public  WidgetfindItem(Object elem)
     Finds the widget which represents the given element.
protected  voidfireSelectionChanged(SelectionChangedEvent se)
     Notifies any selection listeners that the viewer's selection has changed.
public  Object[]getActiveElements()
     Returns the active elements in the order being displayed.
public  IElementComparergetComparer()
     Returns the comparer to use for comparing elements, or null if none has been set.
public  IContentProvidergetContentProvider()
     Returns the viewer's content provider.
public  Object[]getElements()
    
public  ViewerFilter[]getFilters()
     Returns the viewer's filters.
public  ObjectgetInput()
     Returns the viewer's input.
public  IBaseLabelProvidergetLabelProvider()
     Returns the viewer's label provider.
protected  ObjectgetRoot()
     Returns the root element.

The default implementation of this framework method forwards to getInput.

abstract protected  ListgetSelectedFromWidget()
     Retrieves the selection of the viewer.
public  ISelectiongetSelection()
     Returns the current selection for this provider.
public  ViewerSortergetSorter()
     Returns this viewer's sorter, or null if it does not have one.
abstract public  WidgetgetWidget()
     Returns the primary widget associated with this viewer.
protected  voidhookWidget(Component widget)
    
abstract protected  voidinsert(Object elem, int index)
     Inserts the element.
public  booleanisFiltered(Object parent, Object elem)
     Returns true if the element is filtered.
abstract protected  voidonInputReceived(Object input)
     Internal hook method called when the input to this viewer is initially set or subsequently changed.
protected  voidpreserveSelections(ISelection selection)
    
public  voidrefresh()
     Refreshes this viewer completely with information freshly obtained from this viewer's model.
abstract public  voidremove(Object elem)
     Removes the element.
protected  voidremoveElement(Object elem)
    
public  voidremoveFilter(ViewerFilter filter)
     Removes the given filter from this viewer, and triggers refiltering and resorting of the elements if required.
public  voidremoveSelectionListener(ISelectionChangedListener listener)
    
public  voidsetComparer(IElementComparer comparer)
     Sets the comparer to use for comparing elements, or null to use the default equals and hashCode methods on the elements themselves.
public  voidsetContentProvider(IContentProvider contentProvider)
     Sets the viewer's content provider.
public  voidsetInput(Object input)
     Sets the viewer's input.
public  voidsetLabelProvider(IBaseLabelProvider labelProvider)
     Sets the viewer's label provider.
public  voidsetSelection(ISelection selection)
     The viewer implementation of this ISelectionProvider method make the new selection for this viewer without making it visible.
abstract public  voidsetSelection(ISelection selection, boolean reveal)
     Sets a new selection for this viewer and optionally makes it visible.
public  voidsetSorter(ViewerSorter sorter)
     Sets this viewer's sorter and triggers refiltering and resorting of this viewer's element.
protected  Object[]sortElements(Object[] elements)
    
abstract public  voidupdate()
     Refreshes labels with information from the viewer's label provider.
abstract public  voidupdate(Object elem)
     Refreshes labels with information from the viewer's label provider.

Field Detail
elements
protected Object[] elements(Code)



input
protected Object input(Code)
This viewer's input, or null if none. The viewer's input provides the "model" for the viewer's content.





Method Detail
add
abstract protected void add(Object elem)(Code)
Adds the element.
Parameters:
  elem - the element to be added



addFilter
public void addFilter(ViewerFilter filter)(Code)
Adds the given filter to this viewer, and triggers refiltering and resorting of the elements.
Parameters:
  filter - the filter to be added



addSelectionListener
public void addSelectionListener(ISelectionChangedListener listener)(Code)



applyFilters
public void applyFilters()(Code)
Applies the viewer's filters.



filter
protected Object[] filter(Object[] elements)(Code)
Returns the result of running the given elements through the filters.
Parameters:
  elements - the elements to filter only the elements which all filters accept



findItem
abstract public Widget findItem(Object elem)(Code)
Finds the widget which represents the given element.
Parameters:
  elem - the element the corresponding widget, or null if none



fireSelectionChanged
protected void fireSelectionChanged(SelectionChangedEvent se)(Code)
Notifies any selection listeners that the viewer's selection has changed.
Parameters:
  se - the selection event



getActiveElements
public Object[] getActiveElements()(Code)
Returns the active elements in the order being displayed. the active elements



getComparer
public IElementComparer getComparer()(Code)
Returns the comparer to use for comparing elements, or null if none has been set. If specified, the viewer uses this to compare and hash elements rather than the elements' own equals and hashCode methods. the comparer to use for comparing elements or null



getContentProvider
public IContentProvider getContentProvider()(Code)
Returns the viewer's content provider. the content provider



getElements
public Object[] getElements()(Code)



getFilters
public ViewerFilter[] getFilters()(Code)
Returns the viewer's filters. the filters



getInput
public Object getInput()(Code)
Returns the viewer's input. the input



getLabelProvider
public IBaseLabelProvider getLabelProvider()(Code)
Returns the viewer's label provider. the label provider



getRoot
protected Object getRoot()(Code)
Returns the root element.

The default implementation of this framework method forwards to getInput. Override if the root element is different from the viewer's input element.

the root element, or null if none



getSelectedFromWidget
abstract protected List getSelectedFromWidget()(Code)
Retrieves the selection of the viewer. the list of selected elements



getSelection
public ISelection getSelection()(Code)
Returns the current selection for this provider. the current selection



getSorter
public ViewerSorter getSorter()(Code)
Returns this viewer's sorter, or null if it does not have one. a viewer sorter, or null if none



getWidget
abstract public Widget getWidget()(Code)
Returns the primary widget associated with this viewer. the widget which displays this viewer's content



hookWidget
protected void hookWidget(Component widget)(Code)



insert
abstract protected void insert(Object elem, int index)(Code)
Inserts the element.
Parameters:
  elem - the element
Parameters:
  index - the insert location



isFiltered
public boolean isFiltered(Object parent, Object elem)(Code)
Returns true if the element is filtered. Filtered elements will not be displayed by the viewer.
Parameters:
  parent - the parent element
Parameters:
  elem - the element to test true if the element is filtered



onInputReceived
abstract protected void onInputReceived(Object input)(Code)
Internal hook method called when the input to this viewer is initially set or subsequently changed.
Parameters:
  input - the new input



preserveSelections
protected void preserveSelections(ISelection selection)(Code)



refresh
public void refresh()(Code)
Refreshes this viewer completely with information freshly obtained from this viewer's model.



remove
abstract public void remove(Object elem)(Code)
Removes the element.
Parameters:
  elem - the element to be removed



removeElement
protected void removeElement(Object elem)(Code)



removeFilter
public void removeFilter(ViewerFilter filter)(Code)
Removes the given filter from this viewer, and triggers refiltering and resorting of the elements if required.
Parameters:
  filter - the filter to be removed



removeSelectionListener
public void removeSelectionListener(ISelectionChangedListener listener)(Code)



setComparer
public void setComparer(IElementComparer comparer)(Code)
Sets the comparer to use for comparing elements, or null to use the default equals and hashCode methods on the elements themselves.
Parameters:
  comparer - the comparer to use for comparing elements or null



setContentProvider
public void setContentProvider(IContentProvider contentProvider)(Code)
Sets the viewer's content provider.
Parameters:
  contentProvider - the new content provider



setInput
public void setInput(Object input)(Code)
Sets the viewer's input.
Parameters:
  input - the new input



setLabelProvider
public void setLabelProvider(IBaseLabelProvider labelProvider)(Code)
Sets the viewer's label provider.
Parameters:
  labelProvider - the new label provider



setSelection
public void setSelection(ISelection selection)(Code)
The viewer implementation of this ISelectionProvider method make the new selection for this viewer without making it visible.

This method is equivalent to setSelection(selection,false).




setSelection
abstract public void setSelection(ISelection selection, boolean reveal)(Code)
Sets a new selection for this viewer and optionally makes it visible.

Subclasses must implement this method.


Parameters:
  selection - the new selection
Parameters:
  reveal - true if the selection is to be made visible,and false otherwise



setSorter
public void setSorter(ViewerSorter sorter)(Code)
Sets this viewer's sorter and triggers refiltering and resorting of this viewer's element. Passing null turns sorting off.
Parameters:
  sorter - a viewer sorter, or null if none



sortElements
protected Object[] sortElements(Object[] elements)(Code)



update
abstract public void update()(Code)
Refreshes labels with information from the viewer's label provider.



update
abstract public void update(Object elem)(Code)
Refreshes labels with information from the viewer's label provider.
Parameters:
  elem - the element to be updated



Fields inherited from net.mygwt.ui.client.util.Observable
public EventTable eventTable(Code)(Java Doc)

Methods inherited from net.mygwt.ui.client.util.Observable
public void addListener(int eventType, Listener listener)(Code)(Java Doc)
public boolean fireEvent(int eventType)(Code)(Java Doc)
public boolean fireEvent(int eventType, BaseEvent be)(Code)(Java Doc)
public void removeAllListeners()(Code)(Java Doc)
public void removeListener(int eventType, Listener listener)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.