Java Doc for SButtonGroup.java in  » Swing-Library » wings3 » org » wings » 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 » wings3 » org.wings 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.wings.SButtonGroup

SButtonGroup
public class SButtonGroup implements SDelayedEventModel,Serializable(Code)
Used to create a multiple-exclusion scope for a set of buttons.

Creating a set of buttons with the same ButtonGroup object means that turning "on" one of those buttons turns off all other buttons in the group.

A SButtonGroup can be used with any set of objects that inherit from SAbstractButton , because they support the selected state.

Initially, all buttons in the group are unselected. Once any button is selected, one button is always selected in the group. There is no way to turn a button programmatically to "off", in order to clear the button group.

Details:The implementation of the button group is a bit tricky for the HTML generation. In HTML, groups of components are usually formed by giving them all the same name. The problem is, that any SComponent , especially the SAbstractButton , have globally unique names. So this implementation gives all buttons in the group the name of this SButtonGroup, and sets their value to their actual name. So a bit of dispatching is already done here.
author:
   Armin Haaf
See Also:   javax.swing.ButtonGroup



Field Summary
final public static  StringSELECTION_CHANGED
    
final protected  ArrayListbuttons
    
final protected  ArrayListdelayedEvents
     all delayed events are stored here.
final protected  EventListenerListlistenerList
    

Constructor Summary
public  SButtonGroup()
    

Method Summary
public  voidadd(SAbstractButton button)
     adds a button to the group.
public  voidaddActionListener(ActionListener listener)
     Adds an action listener to this group of buttons.
protected  voidfireActionEvent(ActionEvent e)
     Fire an ActionEvent at each registered listener.
protected  voidfireActionPerformed(String command)
     Fire an ActionEvent at each registered listener.
public  voidfireDelayedFinalEvents()
    
public  voidfireDelayedIntermediateEvents()
    
public  ActionListener[]getActionListeners()
     Returns an array of all the ActionListeners added to this group of buttons with addActionListener().
final public  StringgetComponentId()
     Return a jvm wide unique id.
public  booleangetDelayEvents()
    
public  EnumerationgetElements()
     Gets all the buttons the group consists of.
public  StringgetLowLevelEventId()
     Gets the id of the component.
final public  SAbstractButtongetSelection()
     Gets the button of the group that is selected.
public  booleanisSelected(SAbstractButton button)
     Returns the state of the button.
public  Iteratoriterator()
    
public  voidremove(SAbstractButton button)
     removes a button from the group.
public  voidremoveActionListener(ActionListener listener)
    
public  voidremoveAll()
     removes all buttons from the group.
public  voidsetDelayEvents(boolean b)
    
public  voidsetSelected(SAbstractButton b, boolean selected)
     Sets a button in the selected state.
protected  voidsetSelection(SAbstractButton button)
    

Field Detail
SELECTION_CHANGED
final public static String SELECTION_CHANGED(Code)



buttons
final protected ArrayList buttons(Code)



delayedEvents
final protected ArrayList delayedEvents(Code)
all delayed events are stored here.



listenerList
final protected EventListenerList listenerList(Code)




Constructor Detail
SButtonGroup
public SButtonGroup()(Code)




Method Detail
add
public void add(SAbstractButton button)(Code)
adds a button to the group.
Parameters:
  button - the button that is to be added



addActionListener
public void addActionListener(ActionListener listener)(Code)
Adds an action listener to this group of buttons. If one of the buttons contained in this group gets selected, an action event will occur.
Parameters:
  listener -



fireActionEvent
protected void fireActionEvent(ActionEvent e)(Code)
Fire an ActionEvent at each registered listener.



fireActionPerformed
protected void fireActionPerformed(String command)(Code)
Fire an ActionEvent at each registered listener.



fireDelayedFinalEvents
public void fireDelayedFinalEvents()(Code)



fireDelayedIntermediateEvents
public void fireDelayedIntermediateEvents()(Code)



getActionListeners
public ActionListener[] getActionListeners()(Code)
Returns an array of all the ActionListeners added to this group of buttons with addActionListener(). all of the ActionListeners added or an emptyarray if no listeners have been added



getComponentId
final public String getComponentId()(Code)
Return a jvm wide unique id. an id



getDelayEvents
public boolean getDelayEvents()(Code)



getElements
public Enumeration getElements()(Code)
Gets all the buttons the group consists of. an enumeration of the buttons of the group



getLowLevelEventId
public String getLowLevelEventId()(Code)
Gets the id of the component. the component id



getSelection
final public SAbstractButton getSelection()(Code)
Gets the button of the group that is selected.
See Also:   SButtonGroup.setSelection(SAbstractButton) the selected button



isSelected
public boolean isSelected(SAbstractButton button)(Code)
Returns the state of the button. True if the button is selected, false if not.
Parameters:
  button - the button. true if the button is selected, otherwise false.



iterator
public Iterator iterator()(Code)



remove
public void remove(SAbstractButton button)(Code)
removes a button from the group.
Parameters:
  button - the button that is to be removed



removeActionListener
public void removeActionListener(ActionListener listener)(Code)
Removes the supplied Listener from the listener list



removeAll
public void removeAll()(Code)
removes all buttons from the group.



setDelayEvents
public void setDelayEvents(boolean b)(Code)



setSelected
public void setSelected(SAbstractButton b, boolean selected)(Code)
Sets a button in the selected state. There can be only one button selected at a time.
Parameters:
  b - the button.
Parameters:
  selected - true if this button is to be selected, otherwise false.



setSelection
protected void setSelection(SAbstractButton button)(Code)



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.