Java Doc for SList.java in  » Swing-Library » Swinglets » com » javelin » swinglets » 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 » Swinglets » com.javelin.swinglets 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.javelin.swinglets.SComponent
      com.javelin.swinglets.SList

SList
public class SList extends SComponent (Code)
SList defines a list.

The .toString() is displayed as the string value.
author:
   Robin Sharp



Field Summary
protected  ListModelmodel
    
protected  ListSelectionModelselectionModel
    
protected  intvisibleRowCount
    

Constructor Summary
public  SList(ListModel model)
     Construct a SList that displays the elements in the specified, non-null model.
public  SList(Object[] items)
     Creates a SList that contains the elements in the specified array.
public  SList(Vector vector)
     Creates a SList that contains the elements in the specified vector.
public  SList()
     Creates a SList unslected.

Method Summary
public synchronized  SListaddItemListener(ItemListener listener)
     Adds the specified item listener to receive item events from this list.
public  voidaddSelectionInterval(int anchor, int lead)
     Set the selection to be the union of the specified interval with current selection.
public  voidclearSelection()
     Clears the selection - after calling this method isSelectionEmpty() will return true.
protected  ListSelectionModelcreateSelectionModel()
     Returns an instance of DefaultListSelectionModel.
public  intgetAnchorSelectionIndex()
     Returns the first index argument from the most recent addSelectionInterval or setSelectionInterval call.
public  ObjectgetElementAt(int index)
     Returns the nth item in the list.
public  intgetElementCount()
     Returns the number of items in the list.
public  intgetLeadSelectionIndex()
     Returns the second index argument from the most recent addSelectionInterval or setSelectionInterval call.
public  intgetMaxSelectionIndex()
     Returns the largest selected cell index.
public  intgetMinSelectionIndex()
     Returns the lisSelectionModelallest selected cell index.
public  ListModelgetModel()
     Returns the data model that holds the list of items displayed by the SList component.
public  intgetSelectedIndex()
     A convenience method that returns the first selected index.
public  int[]getSelectedIndices()
     Return an array of all of the selected indices in increasing order.
public  ObjectgetSelectedValue()
     A convenience method that returns the first selected value or null, if the selection is empty.
public  Object[]getSelectedValues()
     Return an array of the values for the selected cells.
public  intgetSelectionMode()
     Returns whether single-item or multiple-item selections are allowed.
public  ListSelectionModelgetSelectionModel()
     Returns the value of the current selection model.
public  ClassgetUIClass()
     Returns the name of the L&F class that renders this component.
public  intgetVisibleRowCount()
     Return the preferred number of visible rows.
public  booleanisSelectedIndex(int index)
     Returns true if the specified index is selected.
public  booleanisSelectionEmpty()
    
public synchronized  SListremoveItemListener(ItemListener listener)
     Removes the specified item listener so that it no longer receives item events from this list.
public  voidremoveSelectionInterval(int index0, int index1)
     Set the selection to be the set difference of the specified interval and the current selection.
public  SListsetListData(Object[] array)
     A convenience method that constructs a ListModel from an array of Objects and then applies setModel to it.
public  SListsetListData(Vector vector)
     A convenience method that constructs a ListModel from a Vector and then applies setModel to it.
public  SListsetModel(ListModel model)
     Sets the model that represents the contents or "value" of the list and clears the list selection after notifying PropertyChangeListeners.
public  SListsetSelectedIndex(int index)
     Select a single cell.
public  SListsetSelectedIndices(int[] indices)
     Select a set of cells.
public  SListsetSelectionInterval(int anchor, int lead)
     Select the specified interval.
public  SListsetSelectionMode(int selectionMode)
     Determines whether single-item or multiple-item selections are allowed. The following selectionMode values are allowed:
  • SINGLE_SELECTION Only one list index can be selected at a time.
public  SComponentsetValueAsText(String text)
     Set the value as Text.
public  SListsetVisibleRowCount(int visibleRowCount)
     Set the preferred number of rows in the list that can be displayed without a scollbar, as determined by the nearest JViewport ancestor, if any.

Field Detail
model
protected ListModel model(Code)



selectionModel
protected ListSelectionModel selectionModel(Code)



visibleRowCount
protected int visibleRowCount(Code)




Constructor Detail
SList
public SList(ListModel model)(Code)
Construct a SList that displays the elements in the specified, non-null model. All SList constructors delegate to this one.



SList
public SList(Object[] items)(Code)
Creates a SList that contains the elements in the specified array.



SList
public SList(Vector vector)(Code)
Creates a SList that contains the elements in the specified vector.



SList
public SList()(Code)
Creates a SList unslected.




Method Detail
addItemListener
public synchronized SList addItemListener(ItemListener listener)(Code)
Adds the specified item listener to receive item events from this list.



addSelectionInterval
public void addSelectionInterval(int anchor, int lead)(Code)
Set the selection to be the union of the specified interval with current selection. Both the anchor and lead indices are included. It's not neccessary for anchor to be less than lead.



clearSelection
public void clearSelection()(Code)
Clears the selection - after calling this method isSelectionEmpty() will return true.



createSelectionModel
protected ListSelectionModel createSelectionModel()(Code)
Returns an instance of DefaultListSelectionModel. This method is used by the constructor to initialize the selectionModel property.



getAnchorSelectionIndex
public int getAnchorSelectionIndex()(Code)
Returns the first index argument from the most recent addSelectionInterval or setSelectionInterval call.



getElementAt
public Object getElementAt(int index)(Code)
Returns the nth item in the list.



getElementCount
public int getElementCount()(Code)
Returns the number of items in the list.



getLeadSelectionIndex
public int getLeadSelectionIndex()(Code)
Returns the second index argument from the most recent addSelectionInterval or setSelectionInterval call.



getMaxSelectionIndex
public int getMaxSelectionIndex()(Code)
Returns the largest selected cell index.



getMinSelectionIndex
public int getMinSelectionIndex()(Code)
Returns the lisSelectionModelallest selected cell index. This is a convenience method that just delegates to the selectionModel.



getModel
public ListModel getModel()(Code)
Returns the data model that holds the list of items displayed by the SList component.



getSelectedIndex
public int getSelectedIndex()(Code)
A convenience method that returns the first selected index. Returns -1 if there is no selected item.



getSelectedIndices
public int[] getSelectedIndices()(Code)
Return an array of all of the selected indices in increasing order.



getSelectedValue
public Object getSelectedValue()(Code)
A convenience method that returns the first selected value or null, if the selection is empty.



getSelectedValues
public Object[] getSelectedValues()(Code)
Return an array of the values for the selected cells. The returned values are sorted in increasing index order.



getSelectionMode
public int getSelectionMode()(Code)
Returns whether single-item or multiple-item selections are allowed.



getSelectionModel
public ListSelectionModel getSelectionModel()(Code)
Returns the value of the current selection model. The selection model handles the task of making single selections, selections of contiguous ranges, and non-contiguous selections.



getUIClass
public Class getUIClass()(Code)
Returns the name of the L&F class that renders this component.



getVisibleRowCount
public int getVisibleRowCount()(Code)
Return the preferred number of visible rows.



isSelectedIndex
public boolean isSelectedIndex(int index)(Code)
Returns true if the specified index is selected.



isSelectionEmpty
public boolean isSelectionEmpty()(Code)
Returns true if nothing is selected



removeItemListener
public synchronized SList removeItemListener(ItemListener listener)(Code)
Removes the specified item listener so that it no longer receives item events from this list.



removeSelectionInterval
public void removeSelectionInterval(int index0, int index1)(Code)
Set the selection to be the set difference of the specified interval and the current selection. Both the anchor and lead indices are removed. It's not neccessary for anchor to be less than lead.



setListData
public SList setListData(Object[] array)(Code)
A convenience method that constructs a ListModel from an array of Objects and then applies setModel to it.



setListData
public SList setListData(Vector vector)(Code)
A convenience method that constructs a ListModel from a Vector and then applies setModel to it.



setModel
public SList setModel(ListModel model)(Code)
Sets the model that represents the contents or "value" of the list and clears the list selection after notifying PropertyChangeListeners.

This is a JavaBeans bound property.
Parameters:
  model - the ListModel that provides the list of items for display
See Also:   SList.getModel




setSelectedIndex
public SList setSelectedIndex(int index)(Code)
Select a single cell.



setSelectedIndices
public SList setSelectedIndices(int[] indices)(Code)
Select a set of cells.



setSelectionInterval
public SList setSelectionInterval(int anchor, int lead)(Code)
Select the specified interval. Both the anchor and lead indices are included. It's not neccessary for anchor to be less than lead.



setSelectionMode
public SList setSelectionMode(int selectionMode)(Code)
Determines whether single-item or multiple-item selections are allowed. The following selectionMode values are allowed:
  • SINGLE_SELECTION Only one list index can be selected at a time. In this mode the setSelectionInterval and addSelectionInterval methods are equivalent, and they only the first index argument is used.
  • MULTIPLE_INTERVAL_SELECTION In this mode, there's no restriction on what can be selected.



setValueAsText
public SComponent setValueAsText(String text)(Code)
Set the value as Text. This sets the text property. It is assumes that the text is the index.



setVisibleRowCount
public SList setVisibleRowCount(int visibleRowCount)(Code)
Set the preferred number of rows in the list that can be displayed without a scollbar, as determined by the nearest JViewport ancestor, if any.



Fields inherited from com.javelin.swinglets.SComponent
protected static long COUNTER(Code)(Java Doc)
protected ActionListener actionListener(Code)(Java Doc)
protected SColor background(Code)(Java Doc)
protected SBorder border(Code)(Java Doc)
protected boolean cached(Code)(Java Doc)
protected Hashtable clientProperties(Code)(Java Doc)
protected String componentUrl(Code)(Java Doc)
protected Cursor cursor(Code)(Java Doc)
protected boolean dirty(Code)(Java Doc)
protected boolean enabled(Code)(Java Doc)
protected boolean firingSuspended(Code)(Java Doc)
protected SFont font(Code)(Java Doc)
protected SColor foreground(Code)(Java Doc)
protected int horizontalAlignment(Code)(Java Doc)
protected Locale locale(Code)(Java Doc)
protected SLookAndFeel lookAndFeel(Code)(Java Doc)
protected String name(Code)(Java Doc)
protected boolean opaque(Code)(Java Doc)
protected SContainer parent(Code)(Java Doc)
protected PropertyChangeSupport propertyChangeSupport(Code)(Java Doc)
PrintWriter pw(Code)(Java Doc)
protected boolean rendered(Code)(Java Doc)
protected Vector scripts(Code)(Java Doc)
protected Dimension size(Code)(Java Doc)
StringWriter sw(Code)(Java Doc)
protected int tabIndex(Code)(Java Doc)
protected String toolTipText(Code)(Java Doc)
protected SComponentUI ui(Code)(Java Doc)
protected int verticalAlignment(Code)(Java Doc)
protected boolean visible(Code)(Java Doc)

Methods inherited from com.javelin.swinglets.SComponent
public SComponent addActionListener(ActionListener l)(Code)(Java Doc)
public SComponent addComponentListener(ComponentListener listener)(Code)(Java Doc)
public SComponent addFocusListener(FocusListener listener)(Code)(Java Doc)
public SComponent addKeyListener(KeyListener listener)(Code)(Java Doc)
public SComponent addMouseListener(MouseListener listener)(Code)(Java Doc)
public SComponent addMouseMotionListener(MouseMotionListener listener)(Code)(Java Doc)
public void addNotify()(Code)(Java Doc)
public synchronized SComponent addPropertyChangeListener(PropertyChangeListener listener) throws TooManyListenersException(Code)(Java Doc)
public synchronized SComponent addPropertyChangeListener(String propertyName, PropertyChangeListener listener) throws TooManyListenersException(Code)(Java Doc)
public SComponent addScript(SScript script)(Code)(Java Doc)
protected SComponent addUIListener(EventListener listener)(Code)(Java Doc)
protected String constructComponentName()(Code)(Java Doc)
public void dispatchEvent(AWTEvent event)(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
public void firePropertyChange()(Code)(Java Doc)
final public void firePropertyChange(String propertyName, Object oldValue, Object newValue)(Code)(Java Doc)
final protected void firePropertyChange(String propertyName, byte oldValue, byte newValue)(Code)(Java Doc)
final protected void firePropertyChange(String propertyName, char oldValue, char newValue)(Code)(Java Doc)
final protected void firePropertyChange(String propertyName, short oldValue, short newValue)(Code)(Java Doc)
final protected void firePropertyChange(String propertyName, int oldValue, int newValue)(Code)(Java Doc)
final protected void firePropertyChange(String propertyName, long oldValue, long newValue)(Code)(Java Doc)
final protected void firePropertyChange(String propertyName, float oldValue, float newValue)(Code)(Java Doc)
final protected void firePropertyChange(String propertyName, double oldValue, double newValue)(Code)(Java Doc)
final protected void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)(Code)(Java Doc)
public SContainer getAncestorNamed(String name)(Code)(Java Doc)
public SContainer getAncestorOfClass(Class clazz)(Code)(Java Doc)
public SColor getBackground()(Code)(Java Doc)
public SBorder getBorder()(Code)(Java Doc)
public Enumeration getClientKeys()(Code)(Java Doc)
final public Object getClientProperty(Object key)(Code)(Java Doc)
final public Object getClientProperty(Object key, Object defaultValue)(Code)(Java Doc)
public int getClientPropertyCount()(Code)(Java Doc)
public SComponent getComponent(String name)(Code)(Java Doc)
public String getComponentUrl()(Code)(Java Doc)
public String getContentType()(Code)(Java Doc)
public Cursor getCursor()(Code)(Java Doc)
public SFont getFont()(Code)(Java Doc)
public SColor getForeground()(Code)(Java Doc)
public int getHorizontalAlignment()(Code)(Java Doc)
public Locale getLocale()(Code)(Java Doc)
public SLookAndFeel getLookAndFeel()(Code)(Java Doc)
public String getName()(Code)(Java Doc)
public SContainer getParent()(Code)(Java Doc)
public int getScriptCount()(Code)(Java Doc)
public Enumeration getScripts()(Code)(Java Doc)
public Dimension getSize()(Code)(Java Doc)
public SwingletManager getSwingletManager()(Code)(Java Doc)
public int getTabIndex()(Code)(Java Doc)
public String getToolTipText()(Code)(Java Doc)
public SContainer getTopLevelAncestor()(Code)(Java Doc)
public SComponentUI getUI()(Code)(Java Doc)
public Class getUIClass()(Code)(Java Doc)
public int getVerticalAlignment()(Code)(Java Doc)
final protected boolean hasListeners()(Code)(Java Doc)
final protected boolean hasListeners(String propertyName)(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public boolean isCached()(Code)(Java Doc)
public boolean isEnabled()(Code)(Java Doc)
public boolean isFiringSuspended()(Code)(Java Doc)
public boolean isOpaque()(Code)(Java Doc)
public boolean isVisible()(Code)(Java Doc)
public void onFirstPaint()(Code)(Java Doc)
public void onPaintComponent()(Code)(Java Doc)
public void onPaintComponentFooter()(Code)(Java Doc)
public void onPaintComponentHeader()(Code)(Java Doc)
public void onPaintHeader()(Code)(Java Doc)
public void paint(Object out)(Code)(Java Doc)
public void paintComponent(Object out)(Code)(Java Doc)
public void paintComponentFooter(Object out)(Code)(Java Doc)
public void paintComponentHeader(Object out)(Code)(Java Doc)
public void paintHeader(Object out)(Code)(Java Doc)
public void processActionEvent(ActionEvent event)(Code)(Java Doc)
protected void processEvent(AWTEvent event)(Code)(Java Doc)
final public SComponent putClientProperty(Object key, Object value)(Code)(Java Doc)
public SComponent removeActionListener(ActionListener l)(Code)(Java Doc)
public SComponent removeComponentListener(ComponentListener listener)(Code)(Java Doc)
public SComponent removeFocusListener(FocusListener listener)(Code)(Java Doc)
public SComponent removeKeyListener(KeyListener listener)(Code)(Java Doc)
public SComponent removeMouseListener(MouseListener listener)(Code)(Java Doc)
public SComponent removeMouseMotionListener(MouseMotionListener listener)(Code)(Java Doc)
public void removeNotify()(Code)(Java Doc)
public synchronized SComponent removePropertyChangeListener(PropertyChangeListener listener)(Code)(Java Doc)
public synchronized SComponent removePropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)(Java Doc)
public SComponent removeScript(SScript script)(Code)(Java Doc)
protected SComponent removeUIListener(EventListener listener)(Code)(Java Doc)
public SComponent setBackground(SColor background)(Code)(Java Doc)
public SComponent setBorder(SBorder border)(Code)(Java Doc)
public void setCached(boolean cached)(Code)(Java Doc)
public void setCursor(Cursor cursor)(Code)(Java Doc)
public SComponent setEnabled(boolean enabled)(Code)(Java Doc)
public void setFiringSuspended(boolean firingSuspended)(Code)(Java Doc)
public SComponent setFont(String name, int style, int size)(Code)(Java Doc)
public SComponent setFont(SFont font)(Code)(Java Doc)
public SComponent setForeground(SColor foreground)(Code)(Java Doc)
public SComponent setHorizontalAlignment(int horizontalAlignment)(Code)(Java Doc)
public SComponent setLocale(Locale locale)(Code)(Java Doc)
public SComponent setLookAndFeel(String lookAndFeel)(Code)(Java Doc)
public SComponent setLookAndFeel(SLookAndFeel lookAndFeel)(Code)(Java Doc)
public SComponent setName(String name)(Code)(Java Doc)
public SComponent setOpaque(boolean opaque)(Code)(Java Doc)
public SComponent setParent(SContainer parent)(Code)(Java Doc)
public SComponent setSize(int width, int height)(Code)(Java Doc)
public SComponent setSize(Dimension size)(Code)(Java Doc)
public void setSwingletManager(SwingletManager swingletManager)(Code)(Java Doc)
public SComponent setTabIndex(int tabIndex)(Code)(Java Doc)
public SComponent setToolTipText(String toolTipText)(Code)(Java Doc)
public SComponent setUI(SComponentUI ui)(Code)(Java Doc)
public SComponent setValueAsText(String text)(Code)(Java Doc)
public SComponent setVerticalAlignment(int verticalAlignment)(Code)(Java Doc)
public SComponent setVisible(boolean visible)(Code)(Java Doc)
public String toString()(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.