Java Doc for SComponent.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.SComponent

All known Subclasses:   org.wings.STable,  org.wings.dnd.DragAndDropManager,  org.wings.SLabel,  org.wings.SPopup,  org.wings.SSpinner,  org.wingx.XColorPicker,  org.wingx.XPopupFrame,  org.wings.STree,  foo.bar.MyComponent,  org.wings.SSpacer,  org.wings.SSlider,  org.wings.SAbstractAdjustable,  org.wings.SComboBox,  org.wings.SProgressBar,  org.wings.SContainer,  org.wings.SFileChooser,  org.wings.STextComponent,  org.wings.SPopupMenu,  org.wings.SAbstractIconTextCompound,  org.wings.SRawTextComponent,  org.wings.SSeparator,  org.wings.SList,
SComponent
abstract public class SComponent implements Cloneable,Serializable,Renderable(Code)
Object having a graphical representation that can be displayed on the screen and that can interact with the user.
author:
   Armin Haaf


Field Summary
final public static  intDONE_RENDERING
    
final public static  SelectorSELECTOR_ALL
    
final public static  intSTART_RENDERING
    
final public static  intWHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT
     Constants for conditions on which actions are triggered.
final public static  intWHEN_IN_FOCUSED_FRAME
     Constants for conditions on which actions are triggered.
protected  Map<Selector, Style>dynamicStyles
     Map of Selector to CSS Style s currently assigned to this component.
protected  booleanenabled
     Enabled / disabled.
protected  booleanvisible
     Visibility of the component.

Constructor Summary
public  SComponent()
     Default empty constructor.

Method Summary
final public  voidaddComponentListener(SComponentListener l)
     Adds the specified component listener to receive component events from this component.
public  voidaddDynamicStyle(Style style)
     Register a new CSS style on this component for a specfic CSS selector.
final protected  voidaddEventListener(Class<T> type, T listener)
    
public  voidaddNotify()
     Method called to notify this SComponent that it has a new parent component.
final public  voidaddParentFrameListener(SParentFrameListener l)
     Registers a "parent frame listener" to receive events from this component when the parent frame chanegs i.e.
final public  voidaddRenderListener(SRenderListener renderListener)
     Adds a listenere to this component which wil get notified when the rendering of this components starts.
final public  voidaddScriptListener(ScriptListener listener)
     Adds the specified component listener to receive component events from this component.
public  voidaddStyle(String additionalCssClassName)
     Append a style class name to the style string.
public  Objectclone()
     Clone this component.
protected  voidfireComponentChangeEvent(SComponentEvent aEvent)
     Reports a component change.
public  voidfireFinalEvents()
     Internal event trigger used by CGs.
protected  voidfireKeyEvents()
     Internal method to trigger firing of key events.
final public  voidfireRenderEvent(int type)
     Internal method called by the CGs to indicate different states of the rendering process.
public  ActionMapgetActionMap()
    
public  ColorgetBackground()
     Returns the current background color of this component.
public  SBordergetBorder()
     Returns the border of this component or null if no border has been set.
public  ComponentCGgetCG()
     Return the look and feel delegate.
final public  ObjectgetClientProperty(Object key)
     Returns the value of the property with the specified key.
public  SPopupMenugetComponentPopupMenu()
    
public  StylegetDynamicStyle(Selector selector)
     Returns the style defined for the passed CSS selector.
Parameters:
  selector - The CSS selector the style to retrieve.
public  CollectiongetDynamicStyles()
     Returns the collection of currently defined CSS styles on this component.
public  intgetFocusTraversalIndex()
     returns the focus traversal index.
public  SFontgetFont()
     Return the font used inside this component.
public  ColorgetForeground()
     Return the components foreground color.
public  intgetHorizontalAlignment()
     Return the value of the horizontal alignment property.
public  InputMapgetInputMap()
    
public  InputMapgetInputMap(int condition)
    
final protected  intgetListenerCount(Class type)
     Returns the number of listeners of the specified type for this component.
final protected  Object[]getListenerList()
     Returns all the listeners of this component.
final public  EventListener[]getListeners(Class<? extends EventListener> type)
    
public  StringgetLowLevelEventId()
     Default implementation of the method in LowLevelEventListener .
final public  StringgetName()
     Gets the name property of a component.
final public  SContainergetParent()
     Return the parent container.
public  SFramegetParentFrame()
     Return the parent frame.

NOTE: You will receive null if you call this i.e.

public  SDimensiongetPreferredSize()
     Get the preferred size of this component.
public  RequestURLgetRequestURL()
     The URL under which this component is accessible for the browser.
public  booleangetResidesInForm()
     Return true, if this component is contained in a form.
public  List<ScriptListener>getScriptListenerList()
     Returns the script listeners of this component.
public  ScriptListener[]getScriptListeners()
    
final public  SessiongetSession()
     Return the session this component belongs to.
public  booleangetShowAsFormComponent()
     Test, what display method is set.
public  StringgetStyle()
     The current CSS style class name.
public  StringgetToolTipText()
     Return the tooltip text.
public  intgetVerticalAlignment()
     Return the value of the vertical alignment property.
public  voidinvite(ComponentVisitor visitor)
     Invite a ComponentVisitor.
protected static  booleanisDifferent(Object oldObject, Object newObject)
     use this method for changing a variable.
public  booleanisEnabled()
     Return true if this component is enabled.
public  booleanisFocusOwner()
     Returns true if this SComponent is owning the edit focus.
public  booleanisRecursivelyVisible()
     Return the visibility.
public  booleanisReloadForced()
    
protected  booleanisUpdatePossible()
    
public  booleanisVisible()
     Return the local visibility.
protected  StringparamString()
     Generates a string describing this SComponent.
protected  voidprocessComponentEvent(SComponentListener listener, SComponentEvent e)
     Processes component events occurring on this component by dispatching them to any registered SComponentListener objects.

This method is not called unless component events are enabled for this component.

protected  booleanprocessKeyEvents(String[] values)
    
protected  voidprocessLowLevelEvent(String name, String[] values)
    
final public  voidputClientProperty(Object key, Object value)
     Add an arbitrary key/value "client property" to this component.

The get/putClientProperty methods provide access to a small per-instance hashtable.

final  voidregister()
    
public  voidreload()
     Marks this component as subject to reload.
final protected  voidreloadIfChange(Object oldVal, Object newVal)
     Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.
final protected  voidreloadIfChange(int oldVal, int newVal)
     Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.
final protected  voidreloadIfChange(boolean oldVal, boolean newVal)
     Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.
final protected  voidreloadIfChange(byte oldVal, byte newVal)
     Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.
final protected  voidreloadIfChange(short oldVal, short newVal)
     Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.
final protected  voidreloadIfChange(long oldVal, long newVal)
     Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.
final protected  voidreloadIfChange(float oldVal, float newVal)
     Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.
final protected  voidreloadIfChange(double oldVal, double newVal)
     Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.
final protected  voidreloadIfChange(char oldVal, char newVal)
     Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.
final public  voidremoveComponentListener(SComponentListener l)
     Removes the specified component listener so that it no longer receives component events from this component.
public  voidremoveDynamicStyle(Selector selector)
     Remove all CSS style definitions defined for the passed CSS selector.
Parameters:
  selector - The selector.
final protected  voidremoveEventListener(Class<T> type, T listener)
     Removed named event listener.
public  voidremoveNotify()
     Method called to notify this SComponent that it has no longer a parent component.
final public  voidremoveParentFrameListener(SParentFrameListener l)
     Removes the specified parent frame listener so that it no longer receives events from this component.
final public  voidremoveRenderListener(SRenderListener renderListener)
     Removes the named render listener.
final public  voidremoveScriptListener(ScriptListener listener)
     Removes the specified component listener so that it no longer receives component events from this component.
public  voidremoveStyle(String cssStyleClassName)
     Remove a style class definiton from this component.
public  voidrequestFocus()
     Requests the edit focus for this component for the following renderings by calling SFrame.setFocus(SComponent) .
public  voidscrollRectToVisible(Rectangle aRect)
     Forwards the scrollRectToVisible() message to the SComponent's parent.
public  voidsetActionMap(ActionMap actionMap)
     Binds action names to Action s.
public  voidsetAttribute(String cssPropertyName, String value)
     Defines a free text css property / value pair to this component.
public  voidsetAttribute(CSSProperty property, String propertyValue)
     Assign or overwrite a CSS property/value pair on this component.
public  voidsetAttribute(Selector selector, CSSProperty property, String propertyValue)
     Assign or overwrite a CSS property/value pair at this component.
public  voidsetAttribute(Selector selector, CSSProperty property, SIcon icon)
     Convenience variant of SComponent.setAttribute(org.wings.style.Selector,org.wings.style.CSSProperty,String) . Converts the passed icon into a URL and applies the according CSS style.
Parameters:
  selector - A valid CSS selector.
public  voidsetAttribute(Selector selector, CSSProperty property, Color color)
     Convenience variant of SComponent.setAttribute(org.wings.style.Selector,org.wings.style.CSSProperty,String) . Converts the passed color into according color string.
Parameters:
  selector - A valid CSS selector.
public  voidsetAttributes(Selector selector, CSSAttributeSet attributes)
    
public  voidsetBackground(Color color)
     Set the components foreground color.
public  voidsetBorder(SBorder border)
     Sets the border for this component.
public  voidsetCG(ComponentCG newCG)
     Set the look and feel delegate for this component. SComponent subclasses generally override this method to narrow the argument type, e.g.
public  voidsetComponentPopupMenu(SPopupMenu popupMenu)
    
public  voidsetDynamicStyles(Collection dynamicStyles)
     Adds the passed collection of Style definitions.
public  voidsetEnabled(boolean enabled)
     Set wether this component should be enabled.
public  voidsetFocusTraversalIndex(int index)
     The index in which the focus is traversed using Tab.
public  voidsetFont(SFont font)
     Set the font.
public  voidsetForeground(Color color)
     Set the foreground color.
public  voidsetHorizontalAlignment(int alignment)
     Set the horizontal alignment.
public  voidsetInputMap(InputMap inputMap)
     Map for key binding feature.
public  voidsetInputMap(int condition, InputMap inputMap)
     Sets The current input map.
public  voidsetName(String uniqueName)
     Sets the name property of a component which must be unique!
Assigning the same name multiple times will cause strange results!

Valid names must begin with a letter ([A-Za-z]), underscores ("_") or dollars ("$") and may be followed by any number of letters, digits ([0-9]), underscores ("_") and dollars ("$")

If no name is set, it is generated when necessary.

Explanation: This property is an identifier which is used inside the generated HTML as an element identifier (id="") and sometimes as a javascript function name.
Parameters:
  uniqueName - A unique name to set.

public  voidsetNameRaw(String uncheckedName)
     Direct setter for name.
public  voidsetParent(SContainer parent)
     Sets the parent container.
protected  voidsetParentFrame(SFrame parentFrame)
     Sets the parent frame.
public  voidsetPreferredSize(SDimension preferredSize)
     Set the preferred size of the receiving component in pixel.
public  voidsetReloadForced(boolean forced)
    
public  voidsetShowAsFormComponent(boolean showAsFormComponent)
     Set display mode (href or form-component). An AbstractButton can appear as HTML-Form-Button or as HTML-HREF.
public  voidsetStyle(String cssClassName)
     Set an CSS class name provided by the laf-provided Cascading Style Sheet (CSS), which should be applied to this component.

Note: Probably the SComponent.addStyle(String) method is more what you want.

By default this is set to the wingS component class name (i.e.

public  voidsetToolTipText(String t)
     Set the tooltip text.
public  voidsetVerticalAlignment(int alignment)
     Set the vertical alignment.
public  voidsetVisible(boolean visible)
     Set the visibility.
public  StringtoString()
     A string representation of this component.
final  voidunregister()
    
public  voidupdate(Update update)
     Hands the given update to the Reload Manager.
public  voidupdateCG()
     Notification from the CGFactory that the L&F has changed.
public  voidwrite(Device s)
     Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.

Field Detail
DONE_RENDERING
final public static int DONE_RENDERING(Code)
Internal constants for SComponent.fireRenderEvent(int)



SELECTOR_ALL
final public static Selector SELECTOR_ALL(Code)
Global CSS selector



START_RENDERING
final public static int START_RENDERING(Code)
Internal constants for SComponent.fireRenderEvent(int)



WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT
final public static int WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT(Code)
Constants for conditions on which actions are triggered. Mainly two cases: the focus has either to be at the component (or at a child) or somewhere in the parent frame.
See Also:   SComponent.setInputMap(int,javax.swing.InputMap)



WHEN_IN_FOCUSED_FRAME
final public static int WHEN_IN_FOCUSED_FRAME(Code)
Constants for conditions on which actions are triggered. Mainly two cases: the focus has either to be at the component (or at a child) or somewhere in the parent frame.
See Also:   SComponent.setInputMap(int,javax.swing.InputMap)



dynamicStyles
protected Map<Selector, Style> dynamicStyles(Code)
Map of Selector to CSS Style s currently assigned to this component.



enabled
protected boolean enabled(Code)
Enabled / disabled.



visible
protected boolean visible(Code)
Visibility of the component.




Constructor Detail
SComponent
public SComponent()(Code)
Default empty constructor. The method updateCG is called during construction time to get a cg delegate installed (renderer).




Method Detail
addComponentListener
final public void addComponentListener(SComponentListener l)(Code)
Adds the specified component listener to receive component events from this component. If l is null, no exception is thrown and no action is performed.
Parameters:
  l - the component listener.
See Also:   org.wings.event.SComponentEvent
See Also:   org.wings.event.SComponentListener
See Also:   org.wings.SComponent.removeComponentListener



addDynamicStyle
public void addDynamicStyle(Style style)(Code)
Register a new CSS style on this component for a specfic CSS selector.

Typically you will want to use the method SComponent.setAttribute(org.wings.style.CSSProperty,String) to specify a single CSS property/value pair on this component.
Parameters:
  style - A Style instance.




addEventListener
final protected void addEventListener(Class<T> type, T listener)(Code)
Adds an event listener for the given event class
Parameters:
  type - The class/type of events to listen to.
Parameters:
  listener - The listener itself.



addNotify
public void addNotify()(Code)
Method called to notify this SComponent that it has a new parent component. This Method is called internal and should not be called directly, but can be overerloaded to react on this event.



addParentFrameListener
final public void addParentFrameListener(SParentFrameListener l)(Code)
Registers a "parent frame listener" to receive events from this component when the parent frame chanegs i.e. via SComponent.setParentFrame(SFrame) . If l is null, no exception is thrown and no action is performed.
Parameters:
  l - the parent frame listener. May be null.
See Also:   org.wings.event.SParentFrameEvent
See Also:   org.wings.event.SParentFrameListener
See Also:   org.wings.SComponent.removeParentFrameListener
See Also:   SComponent.removeNotify
See Also:   SComponent.addNotify



addRenderListener
final public void addRenderListener(SRenderListener renderListener)(Code)
Adds a listenere to this component which wil get notified when the rendering of this components starts. (This happens after all events / request has been processed and wingS starts to build the response).
Parameters:
  renderListener -
See Also:   SRenderListener



addScriptListener
final public void addScriptListener(ScriptListener listener)(Code)
Adds the specified component listener to receive component events from this component. If l is null, no exception is thrown and no action is performed. If there is already a ScriptListener which is equal, the new one is not added.
Parameters:
  listener - the component listener.
See Also:   org.wings.event.SComponentEvent
See Also:   org.wings.event.SComponentListener
See Also:   org.wings.SComponent.removeComponentListener



addStyle
public void addStyle(String additionalCssClassName)(Code)
Append a style class name to the style string. Use this method if you want to append a specific CSS class to a componentn without loosing the other CSS styles assigned to the component (i.e. the wingS default styles.)
Parameters:
  additionalCssClassName - The style class to remove (if existing).
See Also:   SComponent.removeStyle(String)



clone
public Object clone()(Code)
Clone this component. a clone of this component



fireComponentChangeEvent
protected void fireComponentChangeEvent(SComponentEvent aEvent)(Code)
Reports a component change.
Parameters:
  aEvent - report this event to all listeners
See Also:   org.wings.event.SComponentListener



fireFinalEvents
public void fireFinalEvents()(Code)
Internal event trigger used by CGs. This Method is called internal and should not be called directly



fireKeyEvents
protected void fireKeyEvents()(Code)
Internal method to trigger firing of key events.



fireRenderEvent
final public void fireRenderEvent(int type)(Code)
Internal method called by the CGs to indicate different states of the rendering process.
Parameters:
  type - Either SComponent.DONE_RENDERING or SComponent.START_RENDERING.



getActionMap
public ActionMap getActionMap()(Code)
Action map for key binding feature The current action map
See Also:   SComponent.setActionMap(javax.swing.ActionMap)



getBackground
public Color getBackground()(Code)
Returns the current background color of this component. The current background color or null



getBorder
public SBorder getBorder()(Code)
Returns the border of this component or null if no border has been set. the border object
See Also:   SComponent.setBorder(SBorder)



getCG
public ComponentCG getCG()(Code)
Return the look and feel delegate. the componet's cg



getClientProperty
final public Object getClientProperty(Object key)(Code)
Returns the value of the property with the specified key. Only properties added with putClientProperty will return a non-null value. the value of this property or null
See Also:   SComponent.putClientProperty



getComponentPopupMenu
public SPopupMenu getComponentPopupMenu()(Code)



getDynamicStyle
public Style getDynamicStyle(Selector selector)(Code)
Returns the style defined for the passed CSS selector.
Parameters:
  selector - The CSS selector the style to retrieve. See org.wings.style.Style.getSelector.The default selector for most CSS styles is SComponent.SELECTOR_ALL. A style (collection of css property/value pairs) or null



getDynamicStyles
public Collection getDynamicStyles()(Code)
Returns the collection of currently defined CSS styles on this component. A unmodifyable collection of Style instances.



getFocusTraversalIndex
public int getFocusTraversalIndex()(Code)
returns the focus traversal index.
See Also:   SComponent.setFocusTraversalIndex(int)



getFont
public SFont getFont()(Code)
Return the font used inside this component. The current font declaration or null



getForeground
public Color getForeground()(Code)
Return the components foreground color. the foreground color or null



getHorizontalAlignment
public int getHorizontalAlignment()(Code)
Return the value of the horizontal alignment property. the horizontal alignment
See Also:   SConstants



getInputMap
public InputMap getInputMap()(Code)
The input map for the condition SComponent.WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT
See Also:   SComponent.setInputMap(javax.swing.InputMap)



getInputMap
public InputMap getInputMap(int condition)(Code)

Parameters:
  condition - Either SComponent.WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT or SComponent.WHEN_IN_FOCUSED_FRAME The input map for the given condition.
See Also:   SComponent.setInputMap(int,javax.swing.InputMap)



getListenerCount
final protected int getListenerCount(Class type)(Code)
Returns the number of listeners of the specified type for this component.
Parameters:
  type - The type of listeners The number of listeners
See Also:   EventListenerList



getListenerList
final protected Object[] getListenerList()(Code)
Returns all the listeners of this component. For performance reasons, this is the actual data structure and so no modification of this array should be made. All listeners of this component. The result array has a pair structure,the first element of each pair is the listener type, the second the listeneritself. It is guaranteed that this returns a non-null array.
See Also:   EventListenerList



getListeners
final public EventListener[] getListeners(Class<? extends EventListener> type)(Code)
Creates an typed array of all listeners of the specified type
Parameters:
  type - All listeners of this type are added to the result array an array of the specified type with all listeners of the specified type
See Also:   EventListenerList



getLowLevelEventId
public String getLowLevelEventId()(Code)
Default implementation of the method in LowLevelEventListener .



getName
final public String getName()(Code)
Gets the name property of a component. This property is an identifier,so it should be always unique. For details refer to SComponent.setName(String) The name of the component.



getParent
final public SContainer getParent()(Code)
Return the parent container. the container this component resides in



getParentFrame
public SFrame getParentFrame()(Code)
Return the parent frame.

NOTE: You will receive null if you call this i.e. during component creation time, as the parent frame is set when you add it to a visible SContainer . Use SComponent.addParentFrameListener(org.wings.event.SParentFrameListener) in this case. the parent frame
See Also:   SComponent.addParentFrameListener(org.wings.event.SParentFrameListener)




getPreferredSize
public SDimension getPreferredSize()(Code)
Get the preferred size of this component.
See Also:   SComponent.setPreferredSize



getRequestURL
public RequestURL getRequestURL()(Code)
The URL under which this component is accessible for the browser. This is equivalent to the URL of the component's root frame, as this is the node externalized to the browser via the org.wings.resource.ReloadResource externalizer. The HTTP URL where this component can be accessed.



getResidesInForm
public boolean getResidesInForm()(Code)
Return true, if this component is contained in a form. true, if this component resides in a form, false otherwise



getScriptListenerList
public List<ScriptListener> getScriptListenerList()(Code)
Returns the script listeners of this component. The ScriptListeners in a List.



getScriptListeners
public ScriptListener[] getScriptListeners()(Code)
returns the script listeners of this component the ScriptListener Array.



getSession
final public Session getSession()(Code)
Return the session this component belongs to. the session



getShowAsFormComponent
public boolean getShowAsFormComponent()(Code)
Test, what display method is set. true, if displayed as link, false when displayed as html form component.
See Also:   SComponent.setShowAsFormComponent(boolean)



getStyle
public String getStyle()(Code)
The current CSS style class name. Defaults to the unqualified wingS component class name.
See Also:   SComponent.setStyle(String)



getToolTipText
public String getToolTipText()(Code)
Return the tooltip text. the tooltip text



getVerticalAlignment
public int getVerticalAlignment()(Code)
Return the value of the vertical alignment property. the vertical alignment
See Also:   SConstants



invite
public void invite(ComponentVisitor visitor) throws Exception(Code)
Invite a ComponentVisitor. Invokes visit(SComponent) on the ComponentVisitor.
Parameters:
  visitor - the visitor to be invited



isDifferent
protected static boolean isDifferent(Object oldObject, Object newObject)(Code)
use this method for changing a variable. if a new value is different from the old value set the new one and notify e.g. the reloadmanager...



isEnabled
public boolean isEnabled()(Code)
Return true if this component is enabled. true if component is enabled



isFocusOwner
public boolean isFocusOwner()(Code)
Returns true if this SComponent is owning the edit focus. true if this SComponent is owning the edit focus otherwise false
See Also:   SComponent.requestFocus()



isRecursivelyVisible
public boolean isRecursivelyVisible()(Code)
Return the visibility. If the Component itself or any of it's parent is invisible, this method will return false. true if this component and all it's ancestors are visible, false otherwise.



isReloadForced
public boolean isReloadForced()(Code)



isUpdatePossible
protected boolean isUpdatePossible()(Code)



isVisible
public boolean isVisible()(Code)
Return the local visibility. If set to true this ccmponent should be visible if all parent components are visible, too. true If the component and it's children should show, false otherwise
See Also:   SComponent.isRecursivelyVisible()



paramString
protected String paramString()(Code)
Generates a string describing this SComponent. This method is mainly for debugging purposes. a string containing all properties



processComponentEvent
protected void processComponentEvent(SComponentListener listener, SComponentEvent e)(Code)
Processes component events occurring on this component by dispatching them to any registered SComponentListener objects.

This method is not called unless component events are enabled for this component. Component events are enabled when one of the following occurs:

  • A SComponentListener object is registered via addComponentListener.

Parameters:
  e - the component event.
See Also:   org.wings.event.SComponentEvent
See Also:   org.wings.event.SComponentListener
See Also:   org.wings.SComponent.addComponentListener



processKeyEvents
protected boolean processKeyEvents(String[] values)(Code)



processLowLevelEvent
protected void processLowLevelEvent(String name, String[] values)(Code)



putClientProperty
final public void putClientProperty(Object key, Object value)(Code)
Add an arbitrary key/value "client property" to this component.

The get/putClientProperty methods provide access to a small per-instance hashtable. Callers can use get/putClientProperty to annotate components that were created by another module, e.g. a layout manager might store per child constraints this way. For example:

 componentA.putClientProperty("to the left of", componentB);
 

If value is null this method will remove the property. Changes to client properties are reported with PropertyChange events. The name of the property (for the sake of PropertyChange events) is key.toString().

The clientProperty dictionary is not intended to support large scale extensions to SComponent nor should be it considered an alternative to subclassing when designing a new component.
See Also:   SComponent.getClientProperty




register
final void register()(Code)



reload
public void reload()(Code)
Marks this component as subject to reload. The component will be registered with the ReloadManager.



reloadIfChange
final protected void reloadIfChange(Object oldVal, Object newVal)(Code)
Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.
Parameters:
  oldVal - the old value of some property
Parameters:
  newVal - the new value of some property



reloadIfChange
final protected void reloadIfChange(int oldVal, int newVal)(Code)
Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.
Parameters:
  oldVal - the old value of some property
Parameters:
  newVal - the new value of some property



reloadIfChange
final protected void reloadIfChange(boolean oldVal, boolean newVal)(Code)
Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.
Parameters:
  oldVal - the old value of some property
Parameters:
  newVal - the new value of some property



reloadIfChange
final protected void reloadIfChange(byte oldVal, byte newVal)(Code)
Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.
Parameters:
  oldVal - the old value of some property
Parameters:
  newVal - the new value of some property



reloadIfChange
final protected void reloadIfChange(short oldVal, short newVal)(Code)
Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.
Parameters:
  oldVal - the old value of some property
Parameters:
  newVal - the new value of some property



reloadIfChange
final protected void reloadIfChange(long oldVal, long newVal)(Code)
Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.
Parameters:
  oldVal - the old value of some property
Parameters:
  newVal - the new value of some property



reloadIfChange
final protected void reloadIfChange(float oldVal, float newVal)(Code)
Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.
Parameters:
  oldVal - the old value of some property
Parameters:
  newVal - the new value of some property



reloadIfChange
final protected void reloadIfChange(double oldVal, double newVal)(Code)
Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.
Parameters:
  oldVal - the old value of some property
Parameters:
  newVal - the new value of some property



reloadIfChange
final protected void reloadIfChange(char oldVal, char newVal)(Code)
Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.
Parameters:
  oldVal - the old value of some property
Parameters:
  newVal - the new value of some property



removeComponentListener
final public void removeComponentListener(SComponentListener l)(Code)
Removes the specified component listener so that it no longer receives component events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If l is null, no exception is thrown and no action is performed.
Parameters:
  l - the component listener.
See Also:   org.wings.event.SComponentEvent
See Also:   org.wings.event.SComponentListener
See Also:   org.wings.SComponent.addComponentListener



removeDynamicStyle
public void removeDynamicStyle(Selector selector)(Code)
Remove all CSS style definitions defined for the passed CSS selector.
Parameters:
  selector - The selector. The default selector for most CSS attributes is SComponent.SELECTOR_ALL.



removeEventListener
final protected void removeEventListener(Class<T> type, T listener)(Code)
Removed named event listener.
Parameters:
  type - The class/type of events to listen to.
Parameters:
  listener - The listener itself.



removeNotify
public void removeNotify()(Code)
Method called to notify this SComponent that it has no longer a parent component. This Method is called internal and should not be called directly, but can be overerloaded to react on this event.



removeParentFrameListener
final public void removeParentFrameListener(SParentFrameListener l)(Code)
Removes the specified parent frame listener so that it no longer receives events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If l is null, no exception is thrown and no action is performed.
Parameters:
  l - the parent frame listener.
See Also:   org.wings.event.SParentFrameEvent
See Also:   org.wings.event.SParentFrameListener
See Also:   org.wings.SComponent.addParentFrameListener
See Also:   SComponent.removeNotify
See Also:   SComponent.addNotify



removeRenderListener
final public void removeRenderListener(SRenderListener renderListener)(Code)
Removes the named render listener.
Parameters:
  renderListener - Render listener to remove
See Also:   SComponent.addRenderListener(org.wings.event.SRenderListener)
See Also:   SRenderListener



removeScriptListener
final public void removeScriptListener(ScriptListener listener)(Code)
Removes the specified component listener so that it no longer receives component events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If l is null, no exception is thrown and no action is performed.
Parameters:
  listener - the component listener.
See Also:   org.wings.event.SComponentEvent
See Also:   org.wings.event.SComponentListener
See Also:   org.wings.SComponent.addComponentListener



removeStyle
public void removeStyle(String cssStyleClassName)(Code)
Remove a style class definiton from this component.
Parameters:
  cssStyleClassName - The style class to remove (if existing).



requestFocus
public void requestFocus()(Code)
Requests the edit focus for this component for the following renderings by calling SFrame.setFocus(SComponent) .



scrollRectToVisible
public void scrollRectToVisible(Rectangle aRect)(Code)
Forwards the scrollRectToVisible() message to the SComponent's parent. Components that can service the request, such as SScrollPane, override this method and perform the scrolling.
Parameters:
  aRect - the visible Rectangle
See Also:   SScrollPane



setActionMap
public void setActionMap(ActionMap actionMap)(Code)
Binds action names to Action s. Use for key binding feature.
Parameters:
  actionMap - The new action map.
See Also:   SComponent.setInputMap(javax.swing.InputMap)
See Also:   ActionMap
See Also:   InputMap



setAttribute
public void setAttribute(String cssPropertyName, String value)(Code)
Defines a free text css property / value pair to this component. The CSS property will appear as an inline style in the generated HTML code.



setAttribute
public void setAttribute(CSSProperty property, String propertyValue)(Code)
Assign or overwrite a CSS property/value pair on this component. This CSS property definition will use a CSS selector which adresses this component as whole as CSS selector (new CSSProperty(this)). The CSS property will appear as an inline style in the generated HTML code.
Parameters:
  property - The CSS property (i.e. CSSProperty.BACKGROUND).
Parameters:
  propertyValue - A valid string value for this CSS property (i.e. red or #fff in our example).



setAttribute
public void setAttribute(Selector selector, CSSProperty property, String propertyValue)(Code)
Assign or overwrite a CSS property/value pair at this component. This CSS property definition will use the CSS selector you passed, so in the most exotic case it could affect a totally different component or component area. Typically you use this method to assign CSS property values to pseudo CSS selectors Selector . This are selector affecting only a part of a component and not the component at all.. The CSS property will appear as an inline style in the generated HTML code.
Parameters:
  selector - A valid CSS selector. Typically values are i.e. the SComponent.SELECTOR_ALLor other SELECTOR_xxx value instances declared in the component.(look ie. at STabbedPane.SELECTOR_CONTENT) or manually constructed instances ofSelector. In most case SComponent.setAttribute(org.wings.style.CSSProperty,String) will be yourchoice.
Parameters:
  property - The css property you want to define a value for
Parameters:
  propertyValue - A valid string value for this property.



setAttribute
public void setAttribute(Selector selector, CSSProperty property, SIcon icon)(Code)
Convenience variant of SComponent.setAttribute(org.wings.style.Selector,org.wings.style.CSSProperty,String) . Converts the passed icon into a URL and applies the according CSS style.
Parameters:
  selector - A valid CSS selector. Typically values are i.e. the SComponent.SELECTOR_ALLor other SELECTOR_xxx value instances declared in the component.(look ie. at STabbedPane.SELECTOR_CONTENT) or manually constructed instances ofSelector. In most case SComponent.setAttribute(org.wings.style.CSSProperty,String) will be yourchoice.
Parameters:
  property - The css property you want to define a value for (in this casemostly something like CSSProperty.BACKGROUND_IMAGE.
Parameters:
  icon - The icon you want to assign.



setAttribute
public void setAttribute(Selector selector, CSSProperty property, Color color)(Code)
Convenience variant of SComponent.setAttribute(org.wings.style.Selector,org.wings.style.CSSProperty,String) . Converts the passed color into according color string.
Parameters:
  selector - A valid CSS selector. Typically values are i.e. the SComponent.SELECTOR_ALLor other SELECTOR_xxx value instances declared in the component.(look ie. at STabbedPane.SELECTOR_CONTENT) or manually constructed instances ofSelector. In most case SComponent.setAttribute(org.wings.style.CSSProperty,String) will be yourchoice.
Parameters:
  property - The css property you want to define a value for (in this casemostly something like CSSProperty.BACKGROUND_IMAGE.
Parameters:
  color - The color value you want to assign.



setAttributes
public void setAttributes(Selector selector, CSSAttributeSet attributes)(Code)



setBackground
public void setBackground(Color color)(Code)
Set the components foreground color.
Parameters:
  color - the new foreground color or null



setBorder
public void setBorder(SBorder border)(Code)
Sets the border for this component.
Parameters:
  border - the border to be set for the component



setCG
public void setCG(ComponentCG newCG)(Code)
Set the look and feel delegate for this component. SComponent subclasses generally override this method to narrow the argument type, e.g. in STextField:
 public void setCG(TextFieldCG newCG) {
 super.setCG(newCG);
 }
 

See Also:   SComponent.updateCG
See Also:   org.wings.plaf.CGManager.getLookAndFeel
See Also:   org.wings.plaf.CGManager.getCG



setComponentPopupMenu
public void setComponentPopupMenu(SPopupMenu popupMenu)(Code)



setDynamicStyles
public void setDynamicStyles(Collection dynamicStyles)(Code)
Adds the passed collection of Style definitions. Existing Styles for the same CSS selectors (see org.wings.style.Style.getSelector ) are overwritten.
Parameters:
  dynamicStyles - A collection collection of Style definitions.



setEnabled
public void setEnabled(boolean enabled)(Code)
Set wether this component should be enabled.
Parameters:
  enabled - true if the component is enabled, false otherwise



setFocusTraversalIndex
public void setFocusTraversalIndex(int index)(Code)
The index in which the focus is traversed using Tab. This is a very simplified notion of traversing the focus, but that is, what browser like interfaces currently offer. This has a bit rough edge, since you have to make sure, that the index is unique within the whole frame. You probably don't want to change this programmatically, but this is set usually by the template property manager.
Parameters:
  index - the focus traversal index. Pressing the focus traversalkey (usually TAB) in the browser jumps to the next index.Must not be zero.



setFont
public void setFont(SFont font)(Code)
Set the font.
Parameters:
  font - the new font



setForeground
public void setForeground(Color color)(Code)
Set the foreground color.
Parameters:
  color - the new foreground color or null



setHorizontalAlignment
public void setHorizontalAlignment(int alignment)(Code)
Set the horizontal alignment.
Parameters:
  alignment - new value for the horizontal alignment
See Also:   SConstants



setInputMap
public void setInputMap(InputMap inputMap)(Code)
Map for key binding feature. (?) Binds input keystrokes to action names (?).
Parameters:
  inputMap - The current input map.
See Also:   InputMap
See Also:   ActionMap
See Also:   SComponent.setActionMap(javax.swing.ActionMap)
See Also:   JComponent.setInputMap(intjavax.swing.InputMap)



setInputMap
public void setInputMap(int condition, InputMap inputMap)(Code)
Sets The current input map.
Parameters:
  inputMap - The new input map
Parameters:
  condition - Either SComponent.WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT or SComponent.WHEN_IN_FOCUSED_FRAME
See Also:   JComponent.setInputMap(intjavax.swing.InputMap)



setName
public void setName(String uniqueName)(Code)
Sets the name property of a component which must be unique!
Assigning the same name multiple times will cause strange results!

Valid names must begin with a letter ([A-Za-z]), underscores ("_") or dollars ("$") and may be followed by any number of letters, digits ([0-9]), underscores ("_") and dollars ("$")

If no name is set, it is generated when necessary.

Explanation: This property is an identifier which is used inside the generated HTML as an element identifier (id="") and sometimes as a javascript function name.
Parameters:
  uniqueName - A unique name to set. Only valid identifier as described are allowed!
See Also:   Character




setNameRaw
public void setNameRaw(String uncheckedName)(Code)
Direct setter for name. Do not use unless you explicitly know what you're doing! (Former package) protected raw setter for component name to avoid sanity check.
Parameters:
  uncheckedName - String to use as componentn name/identifier.



setParent
public void setParent(SContainer parent)(Code)
Sets the parent container. Also gets the parent frame from the parent.
Parameters:
  parent - the container



setParentFrame
protected void setParentFrame(SFrame parentFrame)(Code)
Sets the parent frame.
Parameters:
  parentFrame - the frame



setPreferredSize
public void setPreferredSize(SDimension preferredSize)(Code)
Set the preferred size of the receiving component in pixel. It is not guaranteed that the component accepts this property because of missing implementations in the component cg or html properties. If width or height is zero, it is ignored and the browser defines the size.
See Also:   org.wings.SComponent.getPreferredSize



setReloadForced
public void setReloadForced(boolean forced)(Code)



setShowAsFormComponent
public void setShowAsFormComponent(boolean showAsFormComponent)(Code)
Set display mode (href or form-component). An AbstractButton can appear as HTML-Form-Button or as HTML-HREF. If button is inside a SForm the default is displaying it as html form button. Setting showAsFormComponent to false will force displaying as href even if button is inside a form.
Parameters:
  showAsFormComponent - if true, display as link, if false as html form component.



setStyle
public void setStyle(String cssClassName)(Code)
Set an CSS class name provided by the laf-provided Cascading Style Sheet (CSS), which should be applied to this component.

Note: Probably the SComponent.addStyle(String) method is more what you want.

By default this is set to the wingS component class name (i.e. "SLabel").

The PLAFs render the value of this String to an class="cssClassName" attribute inside the generated HTML code of this component.

The default wingS plaf initializes this by default to the wingS component class name (i.e. SButton for button instances).
Please be aware if you replace this default value, the default wingS style will no longer take effect, as they operate on these default styles. To avoid this you should append your CSS styles via spaces i.e.
c.setStyle(c.getStyle + "myStyle");
Parameters:
  cssClassName - The new CSS name value for this component
See Also:   SComponent.addStyle(String)
See Also:   SComponent.removeStyle(String)




setToolTipText
public void setToolTipText(String t)(Code)
Set the tooltip text. To style use HTML tags.
Parameters:
  t - the new tooltip text



setVerticalAlignment
public void setVerticalAlignment(int alignment)(Code)
Set the vertical alignment.
Parameters:
  alignment - new value for the vertical alignment
See Also:   SConstants



setVisible
public void setVisible(boolean visible)(Code)
Set the visibility.
Parameters:
  visible - wether this component will show or not



toString
public String toString()(Code)
A string representation of this component. Uses the SComponent.paramString() methods string representation of this component with all properties.



unregister
final void unregister()(Code)



update
public void update(Update update)(Code)
Hands the given update to the Reload Manager.
Parameters:
  update - the update for this component



updateCG
public void updateCG()(Code)
Notification from the CGFactory that the L&F has changed.
See Also:   SComponent.updateCG



write
public void write(Device s) throws IOException(Code)
Mark this component as subject to reload if the property, that is given in its old and new fashion, changed.



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.