Java Doc for SComponentHelper.java in  » J2EE » Sofia » com » salmonllc » 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 » J2EE » Sofia » com.salmonllc.swing 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.salmonllc.swing.SComponentHelper

SComponentHelper
public class SComponentHelper implements FocusListener,KeyListener,MouseListener,DocumentListener,ActionListener,ItemListener,ListSelectionListener,ChangeListener(Code)
Because the SOFIA Swing components extend from standard Swing components, they cannot have a common ancestor. Instead they implement the SComponent interface. This class serves as a base class for all the SComponents in the absence of a real one. It contains helper functions that the various Scomponents need.

Inner Class :public class MaxLengthInput extends PlainDocument


Constructor Summary
public  SComponentHelper(SButtonGroup comp)
    
public  SComponentHelper(JComponent comp)
    

Method Summary
public static  voidacceptCurrentValue()
     Call acceptValue on the item that currently has focus.
public  voidacceptValue()
     Components update the model when they lose focus.
public  voidactionPerformed(ActionEvent e)
     Invoked when an action occurs.
public  voidaddKeyboardMappings(JComponent comp)
     Adds keyboard mappings to the component.
public  voidaddPopupMenu(JComponent comp)
    
public  voidaddValueChangedListener(ValueChangedListener l)
     This method adds a listener the will be notified when the value in this component changes.
public static  voidapplySkin(Skin sk, Container p)
    
public  voidchangedUpdate(DocumentEvent e)
    
public  voidfocusGained(FocusEvent e)
    
public  voidfocusLost(FocusEvent e)
    
 intgetMaxLength()
    
public  JPopupMenugetMenu()
    
public static  JFramegetParentFrame(JComponent comp)
    
public  voidinsertUpdate(DocumentEvent e)
    
public  booleanisDataDirty()
    
public  booleanisMenuVisible()
     Components may have a right click cut/copy/paste menu.
public  voiditemStateChanged(ItemEvent e)
     Invoked when an item has been selected or deselected by the user.
public  voidkeyPressed(KeyEvent e)
     Invoked when a key has been pressed.
public  voidkeyReleased(KeyEvent e)
     Invoked when a key has been released.
public  voidkeyTyped(KeyEvent e)
     Invoked when a key has been typed.
public  voidmouseClicked(MouseEvent e)
     Invoked when the mouse button has been clicked (pressed and released) on a component.
public  voidmouseEntered(MouseEvent e)
     Invoked when the mouse enters a component.
public  voidmouseExited(MouseEvent e)
     Invoked when the mouse exits a component.
public  voidmousePressed(MouseEvent e)
     Invoked when a mouse button has been pressed on a component.
public  voidmouseReleased(MouseEvent e)
     Invoked when a mouse button has been released on a component.
public  voidnotifyValueChangedListeners(ValueChangedEvent evt)
    
public  voidremoveKeyboardMappings(JComponent comp)
    
public  voidremovePopupMenu()
    
public  voidremoveUpdate(DocumentEvent e)
    
public  voidremoveValueChangedListener(ValueChangedListener l)
     This method removes a listener from the list that will be notified if the text in the component changes.
public static  voidsetAllComponentsEnabled(Container cont, boolean enabled)
    
public static  voidsetAllComponentsToFocusable(Container cont)
     Sets all components in the container to focusable, skipping ones that are currently set to false.
public static  voidsetAllComponentsToFocusable(Container cont, boolean skipFalse)
     Sets all components in the container to focusable, and will skip ones that are currently set to false depending on the argument passed.
public static  voidsetCursor(JComponent comp, Cursor cur)
    
public  voidsetDataDirty(boolean dataDirty)
    
public static  voidsetDefaultCursor(JComponent comp)
    
 voidsetMaxLength(int maxLength)
    
public static  voidsetWaitCursor(JComponent comp)
    
public  voidstateChanged(ChangeEvent e)
     Invoked when the target of the listener has changed its state.
public  voidvalueChanged(ListSelectionEvent e)
     Called whenever the value of the selection changes.
public static  booleanvaluesEqual(Object newValue, Object oldValue)
    


Constructor Detail
SComponentHelper
public SComponentHelper(SButtonGroup comp)(Code)
Creates a new SComponentHelper for a button group



SComponentHelper
public SComponentHelper(JComponent comp)(Code)
Creates a new SComponentHelper for a standard JComponent




Method Detail
acceptCurrentValue
public static void acceptCurrentValue()(Code)
Call acceptValue on the item that currently has focus.
See Also:   SComponentHelper.acceptValue()



acceptValue
public void acceptValue()(Code)
Components update the model when they lose focus. Just in case you want to update the model on a component with focus programatically like if the user presses a hot key, call accept value on a component to get it to move the value to the model.



actionPerformed
public void actionPerformed(ActionEvent e)(Code)
Invoked when an action occurs.



addKeyboardMappings
public void addKeyboardMappings(JComponent comp)(Code)
Adds keyboard mappings to the component. Sets shift+delete, shift+insert, control+insert to cut/paste/copy and sets the tab to a traversal key for a text area.
Parameters:
  comp -



addPopupMenu
public void addPopupMenu(JComponent comp)(Code)
Adds a right click cut/copy/paste menu to the component



addValueChangedListener
public void addValueChangedListener(ValueChangedListener l)(Code)
This method adds a listener the will be notified when the value in this component changes.
Parameters:
  l - The listener to add.



applySkin
public static void applySkin(Skin sk, Container p)(Code)
Applies a SOFIA skin to the look and feel defaults for the application



changedUpdate
public void changedUpdate(DocumentEvent e)(Code)

See Also:   DocumentListener.changedUpdate(DocumentEvent)



focusGained
public void focusGained(FocusEvent e)(Code)

See Also:   FocusListener.focusGained(FocusEvent)



focusLost
public void focusLost(FocusEvent e)(Code)

See Also:   FocusListener.focusLost(FocusEvent)



getMaxLength
int getMaxLength()(Code)



getMenu
public JPopupMenu getMenu()(Code)
Returns the right click popup menu for this component



getParentFrame
public static JFrame getParentFrame(JComponent comp)(Code)
Finds the parent frame of the component or null if there isn't one



insertUpdate
public void insertUpdate(DocumentEvent e)(Code)

See Also:   DocumentListener.insertUpdate(DocumentEvent)



isDataDirty
public boolean isDataDirty()(Code)
Test to see if the data in the component is dirty (changed, but not moved to the model)



isMenuVisible
public boolean isMenuVisible()(Code)
Components may have a right click cut/copy/paste menu. This method indicates that whether or not it is currently visible



itemStateChanged
public void itemStateChanged(ItemEvent e)(Code)
Invoked when an item has been selected or deselected by the user. The code written for this method performs the operations that need to occur when an item is selected (or deselected).



keyPressed
public void keyPressed(KeyEvent e)(Code)
Invoked when a key has been pressed. See the class description for KeyEvent for a definition of a key pressed event.



keyReleased
public void keyReleased(KeyEvent e)(Code)
Invoked when a key has been released. See the class description for KeyEvent for a definition of a key released event.



keyTyped
public void keyTyped(KeyEvent e)(Code)
Invoked when a key has been typed. See the class description for KeyEvent for a definition of a key typed event.



mouseClicked
public void mouseClicked(MouseEvent e)(Code)
Invoked when the mouse button has been clicked (pressed and released) on a component.



mouseEntered
public void mouseEntered(MouseEvent e)(Code)
Invoked when the mouse enters a component.



mouseExited
public void mouseExited(MouseEvent e)(Code)
Invoked when the mouse exits a component.



mousePressed
public void mousePressed(MouseEvent e)(Code)
Invoked when a mouse button has been pressed on a component.



mouseReleased
public void mouseReleased(MouseEvent e)(Code)
Invoked when a mouse button has been released on a component.



notifyValueChangedListeners
public void notifyValueChangedListeners(ValueChangedEvent evt)(Code)
Called from the framework when value changed listeners for the component need to be fired
Parameters:
  evt -



removeKeyboardMappings
public void removeKeyboardMappings(JComponent comp)(Code)
Removes the keyboard mappings from a component added with addKeyboardMappings



removePopupMenu
public void removePopupMenu()(Code)
Removes a right click menu from the component



removeUpdate
public void removeUpdate(DocumentEvent e)(Code)

See Also:   DocumentListener.removeUpdate(DocumentEvent)



removeValueChangedListener
public void removeValueChangedListener(ValueChangedListener l)(Code)
This method removes a listener from the list that will be notified if the text in the component changes.
Parameters:
  l - The listener to remove.



setAllComponentsEnabled
public static void setAllComponentsEnabled(Container cont, boolean enabled)(Code)
Enables or disables all components in the container



setAllComponentsToFocusable
public static void setAllComponentsToFocusable(Container cont)(Code)
Sets all components in the container to focusable, skipping ones that are currently set to false. This method is mainly used as a work around for a bug in JDK 1.4 with respect to applets. Without explicitly calling setFocusable(true) on each component, they do not respond to the tab key.



setAllComponentsToFocusable
public static void setAllComponentsToFocusable(Container cont, boolean skipFalse)(Code)
Sets all components in the container to focusable, and will skip ones that are currently set to false depending on the argument passed. This method is mainly used as a work around for a bug in JDK 1.4 with respect to applets. Without explicitly calling setFocusable(true) on each component, they do not respond to the tab key.



setCursor
public static void setCursor(JComponent comp, Cursor cur)(Code)
Sets the mouse cursor for a component



setDataDirty
public void setDataDirty(boolean dataDirty)(Code)
Sets the data dirty flag for the component (data is changed, but not moved to the model)



setDefaultCursor
public static void setDefaultCursor(JComponent comp)(Code)
Sets the default mouse cursor for this component



setMaxLength
void setMaxLength(int maxLength)(Code)



setWaitCursor
public static void setWaitCursor(JComponent comp)(Code)
Sets the wait mouse cursor for this component



stateChanged
public void stateChanged(ChangeEvent e)(Code)
Invoked when the target of the listener has changed its state.
Parameters:
  e - a ChangeEvent object



valueChanged
public void valueChanged(ListSelectionEvent e)(Code)
Called whenever the value of the selection changes.
Parameters:
  e - the event that characterizes the change.



valuesEqual
public static boolean valuesEqual(Object newValue, Object oldValue)(Code)
Utility method that compares two values to see if they are equal



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.