Java Doc for EnhancedSpinnerListModel.java in  » Swing-Library » Hitch » com » silvermindsoftware » hitch » swing » 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 » Swing Library » Hitch » com.silvermindsoftware.hitch.swing 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.swing.AbstractSpinnerModel
      javax.swing.SpinnerListModel
         com.silvermindsoftware.hitch.swing.EnhancedSpinnerListModel

EnhancedSpinnerListModel
public class EnhancedSpinnerListModel extends SpinnerListModel (Code)
This is a pretty much a direct copy of the SpinnerListModel from JDK 1.5 sources. It was copied out in order to expose methods that needed to be publicly available in order to allow for completion to work properly with a list of complex objects that present their human readable value from a toString(). The findNextMatch method was exposed as public.



Constructor Summary
public  EnhancedSpinnerListModel(List values)
     Constructs a SpinnerModel whose sequence of values is defined by the specified List.
public  EnhancedSpinnerListModel(Object[] values)
     Constructs a SpinnerModel whose sequence of values is defined by the specified array.
public  EnhancedSpinnerListModel()
     Constructs an effectively empty SpinnerListModel.

Method Summary
public  ObjectfindNextMatch(String substring)
     Returns the next object that starts with substring.
public  ListgetList()
     Returns the List that defines the sequence for this model.
public  ObjectgetNextValue()
     Returns the next legal value of the underlying sequence or null if value is already the last element.
public  ObjectgetPreviousValue()
     Returns the previous element of the underlying sequence or null if value is already the first element.
public  ObjectgetValue()
     Returns the current element of the sequence.
public  voidsetList(List list)
     Changes the list that defines this sequence and resets the index of the models value to zero.
public  voidsetValue(Object elt)
     Changes the current element of the sequence and notifies ChangeListeners.


Constructor Detail
EnhancedSpinnerListModel
public EnhancedSpinnerListModel(List values)(Code)
Constructs a SpinnerModel whose sequence of values is defined by the specified List. The initial value (current element) of the model will be values.get(0). If values is null or has zero size, an IllegalArugmentException is thrown.
Parameters:
  values - the sequence this model represents
throws:
  IllegalArugmentException - if values isnull or zero size



EnhancedSpinnerListModel
public EnhancedSpinnerListModel(Object[] values)(Code)
Constructs a SpinnerModel whose sequence of values is defined by the specified array. The initial value of the model will be values[0]. If values is null or has zero length, an IllegalArugmentException is thrown.
Parameters:
  values - the sequence this model represents
throws:
  IllegalArugmentException - if values isnull or zero length



EnhancedSpinnerListModel
public EnhancedSpinnerListModel()(Code)
Constructs an effectively empty SpinnerListModel. The model's list will contain a single "empty" string element.




Method Detail
findNextMatch
public Object findNextMatch(String substring)(Code)
Returns the next object that starts with substring.
Parameters:
  substring - the string to be matched the match



getList
public List getList()(Code)
Returns the List that defines the sequence for this model. the value of the list property
See Also:   EnhancedSpinnerListModel.setList



getNextValue
public Object getNextValue()(Code)
Returns the next legal value of the underlying sequence or null if value is already the last element. the next legal value of the underlying sequence ornull if value is already the last element
See Also:   javax.swing.SpinnerModel.getNextValue
See Also:   EnhancedSpinnerListModel.getPreviousValue



getPreviousValue
public Object getPreviousValue()(Code)
Returns the previous element of the underlying sequence or null if value is already the first element. the previous element of the underlying sequence ornull if value is already the first element
See Also:   javax.swing.SpinnerModel.getPreviousValue
See Also:   EnhancedSpinnerListModel.getNextValue



getValue
public Object getValue()(Code)
Returns the current element of the sequence. the value property
See Also:   javax.swing.SpinnerModel.getValue
See Also:   EnhancedSpinnerListModel.setValue



setList
public void setList(List list)(Code)
Changes the list that defines this sequence and resets the index of the models value to zero. Note that list is not copied, the model just stores a reference to it.

This method fires a ChangeEvent if list is not equal to the current list.
Parameters:
  list - the sequence that this model represents
throws:
  IllegalArgumentException - if list isnull or zero length
See Also:   EnhancedSpinnerListModel.getList




setValue
public void setValue(Object elt)(Code)
Changes the current element of the sequence and notifies ChangeListeners. If the specified value is not equal to an element of the underlying sequence then an IllegalArgumentException is thrown. In the following example the setValue call would cause an exception to be thrown:
 String[] values = {"one", "two", "free", "four"};
 SpinnerModel model = new SpinnerListModel(values);
 model.setValue("TWO");
 

Parameters:
  elt - the sequence element that will be model's current value
throws:
  IllegalArgumentException - if the specified value isn't allowed
See Also:   javax.swing.SpinnerModel.setValue
See Also:   EnhancedSpinnerListModel.getValue



Methods inherited from javax.swing.SpinnerListModel
public List getList()(Code)(Java Doc)
public Object getNextValue()(Code)(Java Doc)
public Object getPreviousValue()(Code)(Java Doc)
public Object getValue()(Code)(Java Doc)
public void setList(List list)(Code)(Java Doc)
public void setValue(Object elt)(Code)(Java Doc)

Fields inherited from javax.swing.AbstractSpinnerModel
protected EventListenerList listenerList(Code)(Java Doc)

Methods inherited from javax.swing.AbstractSpinnerModel
public void addChangeListener(ChangeListener l)(Code)(Java Doc)
protected void fireStateChanged()(Code)(Java Doc)
public ChangeListener[] getChangeListeners()(Code)(Java Doc)
public T[] getListeners(Class<T> listenerType)(Code)(Java Doc)
public void removeChangeListener(ChangeListener l)(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.