Java Doc for FeatureTableControl.java in  » GIS » udig-1.1 » net » refractions » udig » ui » 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 » GIS » udig 1.1 » net.refractions.udig.ui 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.refractions.udig.ui.FeatureTableControl

FeatureTableControl
public class FeatureTableControl implements ISelectionProvider(Code)
A TreeViewer control for viewing a table of Feature attributes.

The object is used by using a FeatureCollection. In this case the control hangs on to a reference to the FeatureCollection and populates the table entries directory from it. This method results in a single page containing all features.

If the FeatureCollection implements the IAdaptable interface and adapts to ICellModifier then the table is editable. The ICellModifier is used to modify the features. The Column properties passed to the ICellModifier are the attribute name of the attribute being modified.

If the FeatureCollection implements the IAdaptable interface and adapts to CellEditor[] then the cell editors will be used to edit the cells. This is optional for editing. By default a TextCellEditor is used for editing most cells, and an AttributeValidator is used to validate the new values. The first column is for the fid column and will not be used since FIDS are assigned by the datastore and can not be modified. The number of Items the array (this is the same for the cell editor validators and cell editor listeners) must be either the number of attributes in the feature type or the number of attributes + 1 (one for the FID column). If the number of editors it Attributes+1 then the first element in the array will not be used as it is assumed to be a placeholder for the fid column.

If the FeatureCollection implements the IAdaptable interface and adapts to ICellEditorValidator[] then the validators will be used to validate the cells.

If the FeatureCollection implements the IAdaptable interface and adapts to ICellEditorListener[] then the listeners will be added to the CellEditor s.


author:
   jdeolive
author:
   jeichar
since:
   0.3


Field Summary
final public static  String[]ALL
    
final public static  StringCACHING_WARNING
     Key for indicating whether the warning should be displayed.
final public static  ObjectERROR_COLUMN_PROPERTY
    
final public static  StringFEATURE_ID_COLUMN_PROPERTY
    
final public static  ObjectLOADING
    
 FeatureCollectionfeatures
    

Constructor Summary
public  FeatureTableControl()
     Construct FeatureTableControl.
public  FeatureTableControl(Composite parent, FeatureCollection features)
     Construct a FeatureTableControl.
public  FeatureTableControl(IProvider<IProgressMonitor> monitorProvider)
     Construct FeatureTableControl.
public  FeatureTableControl(IProvider<IProgressMonitor> monitorProvider, Composite parent, FeatureCollection features)
     Construct a FeatureTableControl.

Method Summary
public  voidaddLoadingListener(IFeatureTableLoadingListener listener)
    
public  voidaddSelectionChangedListener(ISelectionChangedListener listener)
    
public  voidassertInternallyConsistent()
     Checks all the lists, caches, content providers, etc...
public  voidclear()
    
public  voidcreateTableControl(Composite parent)
     Creates the table control.
protected  voidcreateTableViewer(Composite parent)
     Creates the table control itself.
public  FeatureCollectiondeleteSelection()
     Removes the selected features (the features selected by the owning FeatureTableControl ).
public  voiddispose()
    
public  ControlgetControl()
     Returns the control representing the table control.
public  FeatureCollectiongetFeatures()
    
public  intgetPageSize()
     Returns the number of features viewed in the table per page.
public  ISelectiongetSelection()
    
public  intgetSelectionCount()
    
 FeatureTableSelectionProvidergetSelectionProvider()
    
public  TableViewergetViewer()
    
public  voidmessage(String text, Color background, Color foreground)
     Displays a message.
public  voidmessage(String text)
     Displays a message.
protected  voidnotifyLoadingListeners(LoadingEvent event)
    
public  voidpromoteSelection()
     Sorts the table so that the selection is at the top of the table. It does not last.
public  voidremove(IFeatureTableLoadingListener listener)
    
public  voidremoveSelectionChangedListener(ISelectionChangedListener listener)
    
public  voidselect(String text, String[] attributes, boolean selectAll)
     select the features found that has the text.
public  voidsetFeatures(FeatureCollection features)
    
public  voidsetFocus()
     Does nothing.
public  voidsetMenuManager(MenuManager contextMenu)
     Sets the context Menu used by the table view.
public  voidsetPageSize(int resPerPage)
     Sets the number of features viewed in the table per page.
public  voidsetSelection(ISelection newSelection)
    
public  voidsetSelection(StructuredSelection selection, boolean reveal)
    
public  voidsort(Comparator<Feature> comparator, int dir, TableColumn sortColumn)
     Sorts the features in the tableView.
Parameters:
  comparator - comparator to use for the sorting.
Parameters:
  dir - the direction to set the column SWT.UP or SWT.DOWN.
 voidsort(boolean refreshTable)
     Resorts the table using the last comparator.
public  voidupdate()
     Updates the table control with the current set of features.
public  voidupdate(FeatureCollection features2)
     Updates the features that have the same feature ID to match the new feature or adds the features if they are not part of the current collection.

Field Detail
ALL
final public static String[] ALL(Code)
Indicates that all attribute types will be searched by the select method
See Also:   FeatureTableControl.select(String,String[],boolean)



CACHING_WARNING
final public static String CACHING_WARNING(Code)
Key for indicating whether the warning should be displayed. false if the warning is displayed



ERROR_COLUMN_PROPERTY
final public static Object ERROR_COLUMN_PROPERTY(Code)



FEATURE_ID_COLUMN_PROPERTY
final public static String FEATURE_ID_COLUMN_PROPERTY(Code)



LOADING
final public static Object LOADING(Code)



features
FeatureCollection features(Code)




Constructor Detail
FeatureTableControl
public FeatureTableControl()(Code)
Construct FeatureTableControl.

Must call setFeatures before use.




FeatureTableControl
public FeatureTableControl(Composite parent, FeatureCollection features)(Code)
Construct a FeatureTableControl.
Parameters:
  monitorProvider - a provider that will provider progress monitors for displaying loadinginformation.
Parameters:
  fReader - The FeatureReader that returns the actual features.
Parameters:
  resPerPage - Results per page to be shown in the table.



FeatureTableControl
public FeatureTableControl(IProvider<IProgressMonitor> monitorProvider)(Code)
Construct FeatureTableControl.

Must call setFeatures before use.


Parameters:
  monitorProvider - a provider that will provider progress monitors for displaying loadinginformation.



FeatureTableControl
public FeatureTableControl(IProvider<IProgressMonitor> monitorProvider, Composite parent, FeatureCollection features)(Code)
Construct a FeatureTableControl.
Parameters:
  monitorProvider - a provider that will provider progress monitors for displaying loadinginformation.
Parameters:
  fReader - The FeatureReader that returns the actual features.
Parameters:
  resPerPage - Results per page to be shown in the table.




Method Detail
addLoadingListener
public void addLoadingListener(IFeatureTableLoadingListener listener)(Code)



addSelectionChangedListener
public void addSelectionChangedListener(ISelectionChangedListener listener)(Code)



assertInternallyConsistent
public void assertInternallyConsistent()(Code)
Checks all the lists, caches, content providers, etc... are consistent with each other. This is an expensive method so should be called with care. A test is a good example.



clear
public void clear()(Code)
Don't display nothing :-)



createTableControl
public void createTableControl(Composite parent)(Code)
Creates the table control.
Parameters:
  parent - The to be parent of the control.



createTableViewer
protected void createTableViewer(Composite parent)(Code)
Creates the table control itself.
Parameters:
  parent -



deleteSelection
public FeatureCollection deleteSelection()(Code)
Removes the selected features (the features selected by the owning FeatureTableControl ). returns a collection of the deleted features
See Also:   FeatureTableControl.setSelection(ISelection)
See Also:   FeatureTableControl.setSelection(StructuredSelection,boolean)



dispose
public void dispose()(Code)



getControl
public Control getControl()(Code)
Returns the control representing the table control. The internal table viewer control.



getFeatures
public FeatureCollection getFeatures()(Code)
Contents of the current page of features



getPageSize
public int getPageSize()(Code)
Returns the number of features viewed in the table per page. positive integer.



getSelection
public ISelection getSelection()(Code)
Returns a selection with a single FidFilter indicating the features selected



getSelectionCount
public int getSelectionCount()(Code)



getSelectionProvider
FeatureTableSelectionProvider getSelectionProvider()(Code)



getViewer
public TableViewer getViewer()(Code)



message
public void message(String text, Color background, Color foreground)(Code)
Displays a message. If text == null or "" then the message is hidden and tableViewer is shown again.
Parameters:
  text - message to display
Parameters:
  background - color of the background of the text widget. If null the default color is used
Parameters:
  foreground - color of the foreground of the text widget. If null the default color is used



message
public void message(String text)(Code)
Displays a message. If text == null or "" then the message is hidden and tableViewer is shown again.
Parameters:
  text - message to display



notifyLoadingListeners
protected void notifyLoadingListeners(LoadingEvent event)(Code)



promoteSelection
public void promoteSelection()(Code)
Sorts the table so that the selection is at the top of the table. It does not last. The next selection will not be at the top.



remove
public void remove(IFeatureTableLoadingListener listener)(Code)



removeSelectionChangedListener
public void removeSelectionChangedListener(ISelectionChangedListener listener)(Code)



select
public void select(String text, String[] attributes, boolean selectAll) throws PatternSyntaxException(Code)
select the features found that has the text. Only the attributes indicated are searched. If FeatureTableControl.ALL is selected then all attributes will be searched
Parameters:
  text - text to search for it will first be assumed that it is a reg ex expression
Parameters:
  attributes - the attributes to search. See FeatureTableControl.ALL
Parameters:
  selectAll - if true all matched features will be selected otherwise just the first feature



setFeatures
public void setFeatures(FeatureCollection features)(Code)
Set up for a single page of content



setFocus
public void setFocus()(Code)
Does nothing.
See Also:   org.eclipse.ui.IWorkbenchPart.setFocus



setMenuManager
public void setMenuManager(MenuManager contextMenu)(Code)
Sets the context Menu used by the table view. Not menu is used for the message box.
Parameters:
  contextMenu - menu manager used for creating the menu.



setPageSize
public void setPageSize(int resPerPage)(Code)
Sets the number of features viewed in the table per page.
Parameters:
  resPerPage - positive integer.



setSelection
public void setSelection(ISelection newSelection)(Code)
Useable selections are: selection of features, FIDS and Filters/Queries that adapt to a FeatureSource



setSelection
public void setSelection(StructuredSelection selection, boolean reveal)(Code)



sort
public void sort(Comparator<Feature> comparator, int dir, TableColumn sortColumn)(Code)
Sorts the features in the tableView.
Parameters:
  comparator - comparator to use for the sorting.
Parameters:
  dir - the direction to set the column SWT.UP or SWT.DOWN. If SWT.UP then the table item with index 0 is at the top of the table otherwise it is at the bottom of the table.
Parameters:
  sortColumn - the column that is being sorted



sort
void sort(boolean refreshTable)(Code)
Resorts the table using the last comparator. This is useful for cases where features have been added to the table
Parameters:
  refreshTable -



update
public void update()(Code)
Updates the table control with the current set of features.

This method will ensure that the column information gets updated




update
public void update(FeatureCollection features2)(Code)
Updates the features that have the same feature ID to match the new feature or adds the features if they are not part of the current collection.
Parameters:
  features2 - the feature collection that contains the modified or new features.



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.