Java Doc for Component.java in  » Ajax » NextApp-Echo2 » nextapp » echo2 » app » 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 » Ajax » NextApp Echo2 » nextapp.echo2.app 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   nextapp.echo2.app.Component

All known Subclasses:   nextapp.echo2.app.list.AbstractListComponent,  nextapp.echo2.app.text.TextComponent,  nextapp.echo2.app.SplitPane,  nextapp.echo2.app.test.NullComponent,  nextapp.echo2.app.Grid,  nextapp.echo2.app.test.LifecycleTestComponent,  nextapp.echo2.app.Column,  nextapp.echo2.app.Row,  nextapp.echo2.app.WindowPane,  nextapp.echo2.app.Table,  nextapp.echo2.app.Window,  nextapp.echo2.app.button.AbstractButton,  nextapp.echo2.app.Composite,  nextapp.echo2.app.ContentPane,  nextapp.echo2.app.Label,
Component
abstract public class Component implements RenderIdSupport,Serializable(Code)
A representation of an Echo component. This is an abstract base class from which all Echo components are derived.

A hierarchy of Component objects is used to represent the state of an application's user interface. A Component may have a single parent Component and may contain zero or more child Components. Certain Components may limit the number or type(s) of children which may be added to them, and may even establish requirements for what type(s) of parent Components they may be added to. In the event that an application attempts to add a child Component to a parent Component in spite of these requirements, an IllegalChildException is thrown.

Properties and Styles

The state of a single Component is represented by its properties. Properties can be categorized into two types: "style" and "non-style". Style properties are generally used to represent the "look-and-feel" of a Component--information such as colors, fonts, location, and borders. "Non-style" properties are generally used to represent non-stylistic information such as data models, selection models, and locale.

"Style Properties" have a special definition because they may be stored in Style or StyleSheet objects instead of as properties of a specific Component instance. Property values contained in a relevant Style or StyleSheet will be used for rendering when the property values are not specified by a Component itself. Style properties are identified by the presence of a public static constant name in a Component implementation with the prefix PROPERTY_. In the base Component class itself there are several examples of style properties, such as PROPERTY_BACKGROUND,PROPERTY_FONT and PROPERTY_LAYOUT_DATA. The rendering application container will use the Component.getRenderProperty() and Component.getRenderIndexedProperty() to retrieve the values of stylistic properties, in order that their values might be obtained from the Component's shared Style or the ApplicationInstance's StyleSheet in the event they are not directly set in the Component.

A Component implementation should not store the values of style properties as instance variables. Rather, the values of style properties should be stored in the local Style instance, by way of the setProperty() method. The getProperty() method may be used to obtain the value of such properties. Only style properties should be stored using these methods; properties such as models should never be stored using the getProperty()/setProperty() interface.

Events

Many Components will provide the capability to register EventListeners to notify interested parties when various state changes occur. The base Component class provides an EventListenerList as a convenient and memory efficient means of storing such listeners. The internal EventListenerList may be obtained using the getEventListenerList() method. The EventListenerList is lazy-created and will only be instantiated on the first invocation of the getEventListenerList() method. If the intent is only to inquire about the state of event listeners without necessarily forcing instantiation of an EventListenerList, the hasEventListenerList() should be queried prior to invoking getEventListenerList().



Field Summary
final public static  StringCHILDREN_CHANGED_PROPERTY
    
final public static  StringENABLED_CHANGED_PROPERTY
    
final public static  StringFOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY
    
final public static  StringFOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY
    
final public static  StringLAYOUT_DIRECTION_CHANGED_PROPERTY
    
final public static  StringLOCALE_CHANGED_PROPERTY
    
final public static  StringPROPERTY_BACKGROUND
    
final public static  StringPROPERTY_FONT
    
final public static  StringPROPERTY_FOREGROUND
    
final public static  StringPROPERTY_LAYOUT_DATA
    
final public static  StringSTYLE_CHANGED_PROPERTY
    
final public static  StringSTYLE_NAME_CHANGED_PROPERTY
    
final public static  StringVISIBLE_CHANGED_PROPERTY
    

Constructor Summary
public  Component()
     Creates a new Component.

Method Summary
public  voidadd(Component c)
     Adds the specified Component as a child of this Component.
public  voidadd(Component c, int n)
     Adds the specified Component as the nth child of this component.
public  voidaddPropertyChangeListener(PropertyChangeListener l)
     Adds a property change listener to this component.
 voidassignRenderId(String renderId)
     Internal method to set the render identifier of theComponent. This method is invoked by the ApplicationInstance when the component is registered or unregistered, or by manual invocation of setRenderId().
public  voiddispose()
     Life-cycle method invoked when the Component is removed from a registered hierarchy.
 voiddoDispose()
     Recursively executes the dispose() life-cycle methods of this Component and its descendants.
 voiddoInit()
     Recursively executes the init() life-cycle methods of this Component and its descendants.
protected  voidfirePropertyChange(String propertyName, Object oldValue, Object newValue)
     Reports a bound property change to PropertyChangeListeners and to the ApplicationInstance's update management system.
public  ApplicationInstancegetApplicationInstance()
     Returns the ApplicationInstance to which this Component is registered, or null if it is not currently registered.
public  ColorgetBackground()
     Returns the default/base background color of the Component.
final public  ComponentgetComponent(int n)
     Returns the nth immediate child component.
final public  ComponentgetComponent(String id)
     Recursively searches for the component with the specified id by querying this component and its descendants. The id value is that retrieved and set via the getId() and setId() methods.
final public  intgetComponentCount()
     Returns the number of immediate child Components.
final public  Component[]getComponents()
     Returns an array of all immediate child Components.
protected  EventListenerListgetEventListenerList()
     Returns the local EventListenerList.
final public  intgetFocusTraversalIndex()
     Returns the focus traversal (tab) index of the component. Components with numerically lower indices will be focused before components with numerically higher indices.
public  FontgetFont()
     Returns the default/base font of the component.
public  ColorgetForeground()
     Returns the default/base foreground color of the Component.
public  StringgetId()
     Returns the user-defined identifier of the Component.
final public  ObjectgetIndexedProperty(String propertyName, int propertyIndex)
     Returns the value of the specified indexed property.
public  LayoutDatagetLayoutData()
     Returns the LayoutData object used to describe how this Component should be laid out within its parent container.
public  LayoutDirectiongetLayoutDirection()
     Returns the specific layout direction setting of this component, if any.
public  LocalegetLocale()
     Returns the specific locale setting of this component, if any.
final public  ComponentgetParent()
     Returns the parent component.
final public  ObjectgetProperty(String propertyName)
     Returns the value of the specified property.
public  StringgetRenderId()
     Returns the render id of this component.
final public  ObjectgetRenderIndexedProperty(String propertyName, int propertyIndex)
     Determines the "rendered state" of an indexed property. The rendered state is determined by first determining if the given property is locally set on this Component, and returning it in that case.
final public  ObjectgetRenderIndexedProperty(String propertyName, int propertyIndex, Object defaultValue)
     Determines the "rendered state" of an indexed property. The rendered state is determined by first determining if the given property is locally set on this Component, and returning it in that case.
final public  LayoutDirectiongetRenderLayoutDirection()
     Returns the rendered LayoutDirection of the Component.
final public  LocalegetRenderLocale()
     Returns the rendered Locale of the Component. If this Component does not itself specify a locale, its ancestors will be queried recursively until a Component providing a Locale is found.
final public  ObjectgetRenderProperty(String propertyName)
     Determines the "rendered state" of a property. The rendered state is determined by first determining if the given property is locally set on this Component, and returning it in that case.
final public  ObjectgetRenderProperty(String propertyName, Object defaultValue)
     Determines the "rendered state" of a property. The rendered state is determined by first determining if the given property is locally set on this Component, and returning it in that case.
final public  StylegetStyle()
     Returns the shared Style object assigned to this Component.
final public  StringgetStyleName()
     Returns the name of the Style in the ApplicationInstance'sStyleSheet from which the renderer will retrieve properties.
final public  ComponentgetVisibleComponent(int n)
     Returns the nth immediate visible child Component.
final public  intgetVisibleComponentCount()
     Returns the number of visible immediate child Components.
final public  Component[]getVisibleComponents()
     Returns an array of all visible immediate child Components.
protected  booleanhasEventListenerList()
     Determines if a local EventListenerList exists. If no listener list exists, it can be assured that there are thus no listeners registered to it.
final public  intindexOf(Component c)
     Determines the index of the given Component within the children of this Component.
public  voidinit()
     Life-cycle method invoked when the Component is added to a registered hierarchy.
final public  booleanisAncestorOf(Component c)
     Determines if this Component is or is an ancestor of the specified Component.
final public  booleanisEnabled()
     Determines the enabled state of this Component. DisabledComponents are not eligible to receive user input. The application container may render disabled components with an altered appearance.
public  booleanisFocusTraversalParticipant()
     Determines if the Component participates in (tab) focus traversal.
final public  booleanisRegistered()
     Determines if the Component is registered to an ApplicationInstance.
final public  booleanisRenderEnabled()
     Determines whether this Component should be rendered with an enabled state. DisabledComponents are not eligible to receive user input. The application container may render disabled components with an altered appearance.
final public  booleanisRenderVisible()
     Determines if the Component and all of its parents are visible.
public  booleanisValidChild(Component child)
     Determines if a given Component is valid to be added as a child to this Component.
public  booleanisValidParent(Component parent)
     Determines if this Component is valid to be added as a child of the given parent Component.
final public  booleanisVisible()
     Returns the visibility state of this Component. Non-visible components will not be seen by the rendering application container, and will not be rendered in any fashion on the user interface.
public  voidprocessInput(String inputName, Object inputValue)
     Processes client input specific to the Component received from the UpdateManager.
 voidregister(ApplicationInstance newValue)
     Sets the ApplicationInstance to which this component is registered.

The ApplicationInstance to which a component is registered may not be changed directly from one to another, i.e., if the component is registered to instance "A" and an attempt is made to set it to instance "B", an IllegalStateException will be thrown.

public  voidremove(Component c)
     Removes the specified child Component from this Component.

All Component remove operations use this method to remove Components.

public  voidremove(int n)
     Removes the Component at the nth index.
public  voidremoveAll()
     Removes all child Components.
public  voidremovePropertyChangeListener(PropertyChangeListener l)
     Removes a property change listener from this Component.
public  voidsetBackground(Color newValue)
     Sets the default background color of the Component.
public  voidsetEnabled(boolean newValue)
     Sets the enabled state of the Component.
public  voidsetFocusTraversalIndex(int newValue)
     Sets the focus traversal (tab) index of the component.
public  voidsetFocusTraversalParticipant(boolean newValue)
     Sets whether the component participates in the focus traversal order (tab order).
public  voidsetFont(Font newValue)
     Sets the default text font of the Component.
public  voidsetForeground(Color newValue)
     Sets the default foreground color of the Component.
public  voidsetId(String id)
     Sets a user-defined identifier for this Component.
public  voidsetIndexedProperty(String propertyName, int propertyIndex, Object newValue)
     Sets a generic indexed property of the Component.
public  voidsetLayoutData(LayoutData newValue)
     Sets the LayoutData of this Component.
public  voidsetLayoutDirection(LayoutDirection newValue)
     Sets the LayoutDirection of this Component, describing whether content is rendered left-to-right or right-to-left.
Parameters:
  newValue - the new LayoutDirection.
public  voidsetLocale(Locale newValue)
     Sets the locale of the Component.
public  voidsetProperty(String propertyName, Object newValue)
     Sets a generic property of the Component.
public  voidsetRenderId(String renderId)
     Sets a custom render identifier for this Component. The identifier may be changed without notification if another component is already using it. Identifiers are limited to ASCII alphanumeric values.
public  voidsetStyle(Style newValue)
     Sets the shared style of the Component.
public  voidsetStyleName(String newValue)
     Sets the name of the style to use from the ApplicationInstance-defined StyleSheet.
public  voidsetVisible(boolean newValue)
     Sets the visibility state of this Component.
public  voidvalidate()
     A life-cycle method invoked before the component is rendered to ensure it is in a valid state.
public  booleanverifyInput(String inputName, Object inputValue)
     Invoked by the ClientUpdateManager on each component in the hierarchy whose processInput() method will layer be invoked in the current transaction.
final public  intvisibleIndexOf(Component c)
     Determines the index of the given Component within the visible children of this Component.

Field Detail
CHILDREN_CHANGED_PROPERTY
final public static String CHILDREN_CHANGED_PROPERTY(Code)



ENABLED_CHANGED_PROPERTY
final public static String ENABLED_CHANGED_PROPERTY(Code)



FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY
final public static String FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY(Code)



FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY
final public static String FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY(Code)



LAYOUT_DIRECTION_CHANGED_PROPERTY
final public static String LAYOUT_DIRECTION_CHANGED_PROPERTY(Code)



LOCALE_CHANGED_PROPERTY
final public static String LOCALE_CHANGED_PROPERTY(Code)



PROPERTY_BACKGROUND
final public static String PROPERTY_BACKGROUND(Code)



PROPERTY_FONT
final public static String PROPERTY_FONT(Code)



PROPERTY_FOREGROUND
final public static String PROPERTY_FOREGROUND(Code)



PROPERTY_LAYOUT_DATA
final public static String PROPERTY_LAYOUT_DATA(Code)



STYLE_CHANGED_PROPERTY
final public static String STYLE_CHANGED_PROPERTY(Code)



STYLE_NAME_CHANGED_PROPERTY
final public static String STYLE_NAME_CHANGED_PROPERTY(Code)



VISIBLE_CHANGED_PROPERTY
final public static String VISIBLE_CHANGED_PROPERTY(Code)




Constructor Detail
Component
public Component()(Code)
Creates a new Component.




Method Detail
add
public void add(Component c)(Code)
Adds the specified Component as a child of this Component. The child will be added at the greatest index.
Parameters:
  c - the child Component to add



add
public void add(Component c, int n) throws IllegalChildException(Code)
Adds the specified Component as the nth child of this component. All component-add operations use this method to add components. Components that require notification of all child additions should override this method (making sure to call the superclass' implementation).
Parameters:
  c - the child component to add
Parameters:
  n - the index at which to add the child component, or -1 to add thecomponent at the end
throws:
  IllegalChildException - if the child is not allowed to be addedto this component, because it is either not valid for the component's state or is of an invalid type



addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener l)(Code)
Adds a property change listener to this component.
Parameters:
  l - the listener to add



assignRenderId
void assignRenderId(String renderId)(Code)
Internal method to set the render identifier of theComponent. This method is invoked by the ApplicationInstance when the component is registered or unregistered, or by manual invocation of setRenderId(). This method performs no error checking.
Parameters:
  renderId - the new identifier
See Also:   Component.getRenderId()
See Also:   Component.setRenderId()



dispose
public void dispose()(Code)
Life-cycle method invoked when the Component is removed from a registered hierarchy. Implementations should always invoke super.dispose(). Modifications to the component hierarchy are not allowed within this method.



doDispose
void doDispose()(Code)
Recursively executes the dispose() life-cycle methods of this Component and its descendants.



doInit
void doInit()(Code)
Recursively executes the init() life-cycle methods of this Component and its descendants.



firePropertyChange
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)(Code)
Reports a bound property change to PropertyChangeListeners and to the ApplicationInstance's update management system.
Parameters:
  propertyName - the name of the changed property
Parameters:
  oldValue - the previous value of the property
Parameters:
  newValue - the present value of the property



getApplicationInstance
public ApplicationInstance getApplicationInstance()(Code)
Returns the ApplicationInstance to which this Component is registered, or null if it is not currently registered. the application instance



getBackground
public Color getBackground()(Code)
Returns the default/base background color of the Component. This property may not be relevant to certain components, though even in such cases may be useful for setting a default for children. the background color



getComponent
final public Component getComponent(int n)(Code)
Returns the nth immediate child component.
Parameters:
  n - the index of the Component to retrieve the Component at index n
throws:
  IndexOutOfBoundsException - when the index is invalid



getComponent
final public Component getComponent(String id)(Code)
Recursively searches for the component with the specified id by querying this component and its descendants. The id value is that retrieved and set via the getId() and setId() methods. This method is in no way related to renderIds.
Parameters:
  id - the user-defined id of the component to be retrieved the component with the specified id, if it either is thiscomponent or is a descendant of it, or null otherwise



getComponentCount
final public int getComponentCount()(Code)
Returns the number of immediate child Components. the number of immediate child Components



getComponents
final public Component[] getComponents()(Code)
Returns an array of all immediate child Components. an array of all immediate child Components



getEventListenerList
protected EventListenerList getEventListenerList()(Code)
Returns the local EventListenerList. The listener list is lazily created; invoking this method will create the EventListenerList if required. the listener list



getFocusTraversalIndex
final public int getFocusTraversalIndex()(Code)
Returns the focus traversal (tab) index of the component. Components with numerically lower indices will be focused before components with numerically higher indices. The value 0 has special meaning, in that components with a value of 0 will be focused last. The default value is 0. the focus traversal index, a value between 0 and 32767



getFont
public Font getFont()(Code)
Returns the default/base font of the component. This property may not be relevant to certain components, though even in such cases may be useful for setting a default for children. the font



getForeground
public Color getForeground()(Code)
Returns the default/base foreground color of the Component. This property may not be relevant to certain components, though even in such cases may be useful for setting a default for children. the foreground color



getId
public String getId()(Code)
Returns the user-defined identifier of the Component. Note that the user defined identifier has no relation to the renderId. the user-defined identifier



getIndexedProperty
final public Object getIndexedProperty(String propertyName, int propertyIndex)(Code)
Returns the value of the specified indexed property. This method is generally used only internally by a Component, however there are exceptions. The more specific getXXX() methods to retrieve property values from a Component whenever possible. See the class-level documentation for a more detailed explanation of the use of this method.
Parameters:
  propertyName - the property name
Parameters:
  propertyIndex - the property index the property value



getLayoutData
public LayoutData getLayoutData()(Code)
Returns the LayoutData object used to describe how this Component should be laid out within its parent container. the layout data, or null if unset
See Also:   LayoutData



getLayoutDirection
public LayoutDirection getLayoutDirection()(Code)
Returns the specific layout direction setting of this component, if any. This method will return null unless a LayoutDirection is specifically set on this Component. the layout direction property of thisComponent
See Also:   Component.getRenderLayoutDirection()



getLocale
public Locale getLocale()(Code)
Returns the specific locale setting of this component, if any. This method will return null unless a Locale is specifically set on this Component. the locale property of this Component
See Also:   Component.getRenderLocale()



getParent
final public Component getParent()(Code)
Returns the parent component. the parent component, or null if this component has no parent



getProperty
final public Object getProperty(String propertyName)(Code)
Returns the value of the specified property. This method is generally used only internally by a Component, however there are exceptions. The more specific getXXX() methods to retrieve property values from a Component whenever possible. See the class-level documentation for a more detailed explanation of the use of this method.
Parameters:
  propertyName - the property name the property value



getRenderId
public String getRenderId()(Code)
Returns the render id of this component. This id is only guaranteed to be unique within the ApplicationInstance to which this component is registered. This method returns null in the event that the component is not registered to an ApplicationInstance. the ApplicationInstance-wide unique id of this component
See Also:   nextapp.echo2.app.RenderIdSupport.getRenderId



getRenderIndexedProperty
final public Object getRenderIndexedProperty(String propertyName, int propertyIndex)(Code)
Determines the "rendered state" of an indexed property. The rendered state is determined by first determining if the given property is locally set on this Component, and returning it in that case. If the property state is not set locally, the shared Style assigned to this component will be queried for the property value. If the property state is not set in the shared Style, the StyleSheet of the ApplicationInstance to which this Component is registered will be queried for the property value. In the event the property is not set in any of these resources, null is returned.

The application container will invoke this method rather than individual property getter methods to determine the state of properties when rendering.
Parameters:
  propertyName - the name of the property the rendered property value




getRenderIndexedProperty
final public Object getRenderIndexedProperty(String propertyName, int propertyIndex, Object defaultValue)(Code)
Determines the "rendered state" of an indexed property. The rendered state is determined by first determining if the given property is locally set on this Component, and returning it in that case. If the property state is not set locally, the shared Style assigned to this component will be queried for the property value. If the property state is not set in the shared Style, the StyleSheet of the ApplicationInstance to which this Component is registered will be queried for the property value. In the event the property is not set in any of these resources, defaultValue is returned.
Parameters:
  propertyName - the name of the property
Parameters:
  defaultValue - the value to be returned if the property is not set the property state



getRenderLayoutDirection
final public LayoutDirection getRenderLayoutDirection()(Code)
Returns the rendered LayoutDirection of the Component. the layout direction of this component



getRenderLocale
final public Locale getRenderLocale()(Code)
Returns the rendered Locale of the Component. If this Component does not itself specify a locale, its ancestors will be queried recursively until a Component providing a Locale is found. If no ancestors have Locales set, the ApplicationInstance's locale will be returned. In the event that no locale information is available from the ancestral hierarchy of Components and no ApplicationInstance is registered, null is returned. the locale for this component



getRenderProperty
final public Object getRenderProperty(String propertyName)(Code)
Determines the "rendered state" of a property. The rendered state is determined by first determining if the given property is locally set on this Component, and returning it in that case. If the property state is not set locally, the shared Style assigned to this component will be queried for the property value. If the property state is not set in the shared Style, the StyleSheet of the ApplicationInstance to which this Component is registered will be queried for the property value. In the event the property is not set in any of these resources, null is returned.

The application container will invoke this method rather than individual property getter methods to determine the state of properties when rendering.
Parameters:
  propertyName - the name of the property the rendered property value




getRenderProperty
final public Object getRenderProperty(String propertyName, Object defaultValue)(Code)
Determines the "rendered state" of a property. The rendered state is determined by first determining if the given property is locally set on this Component, and returning it in that case. If the property state is not set locally, the shared Style assigned to this component will be queried for the property value. If the property state is not set in the shared Style, the StyleSheet of the ApplicationInstance to which this Component is registered will be queried for the property value. In the event the property is not set in any of these resources, defaultValue is returned.
Parameters:
  propertyName - the name of the property
Parameters:
  defaultValue - the value to be returned if the property is not set the property state



getStyle
final public Style getStyle()(Code)
Returns the shared Style object assigned to this Component. As its name implies, the shared Style may be shared amongst multiple Components. Style properties will be rendered from the specified Style when they are not specified locally in the Component itself. the shared Style



getStyleName
final public String getStyleName()(Code)
Returns the name of the Style in the ApplicationInstance'sStyleSheet from which the renderer will retrieve properties. The renderer will only query the StyleSheet when properties are not specified directly by the Component or by the Component's shared Style. the style name



getVisibleComponent
final public Component getVisibleComponent(int n)(Code)
Returns the nth immediate visible child Component.
Parameters:
  n - the index of the Component to retrieve the Component at index n
throws:
  IndexOutOfBoundsException - when the index is invalid



getVisibleComponentCount
final public int getVisibleComponentCount()(Code)
Returns the number of visible immediate child Components. the number of visible immediate child Components



getVisibleComponents
final public Component[] getVisibleComponents()(Code)
Returns an array of all visible immediate child Components. an array of all visible immediate child Components



hasEventListenerList
protected boolean hasEventListenerList()(Code)
Determines if a local EventListenerList exists. If no listener list exists, it can be assured that there are thus no listeners registered to it. This method should be invoked by event firing code prior to invoking getListenerList() to avoid unnecessary creation of an EventListenerList in response to their query. true if a local EventListenerList exists



indexOf
final public int indexOf(Component c)(Code)
Determines the index of the given Component within the children of this Component. If the given Component is not a child, -1 is returned.
Parameters:
  c - the Component to analyze the index of the specified Component amongst the children of this Component



init
public void init()(Code)
Life-cycle method invoked when the Component is added to a registered hierarchy. Implementations should always invoke super.init(). Modifications to the component hierarchy are not allowed within this method.



isAncestorOf
final public boolean isAncestorOf(Component c)(Code)
Determines if this Component is or is an ancestor of the specified Component.
Parameters:
  c - the Component to test for ancestry true if this Component is an ancestor of the specified Component



isEnabled
final public boolean isEnabled()(Code)
Determines the enabled state of this Component. DisabledComponents are not eligible to receive user input. The application container may render disabled components with an altered appearance. true if the component is enabled
See Also:   Component.verifyInput(java.lang.String,java.lang.Object)



isFocusTraversalParticipant
public boolean isFocusTraversalParticipant()(Code)
Determines if the Component participates in (tab) focus traversal. true if the Component participates in focus traversal



isRegistered
final public boolean isRegistered()(Code)
Determines if the Component is registered to an ApplicationInstance. true if the Component is registered to an ApplicationInstance



isRenderEnabled
final public boolean isRenderEnabled()(Code)
Determines whether this Component should be rendered with an enabled state. DisabledComponents are not eligible to receive user input. The application container may render disabled components with an altered appearance. true if the component should be rendered enabled.



isRenderVisible
final public boolean isRenderVisible()(Code)
Determines if the Component and all of its parents are visible. true if the Component is recursively visible



isValidChild
public boolean isValidChild(Component child)(Code)
Determines if a given Component is valid to be added as a child to this Component. Default implementation always returns true, may be overridden to provide specific behavior.
Parameters:
  child - the Component to evaluate as a child true if the Component is a valid child



isValidParent
public boolean isValidParent(Component parent)(Code)
Determines if this Component is valid to be added as a child of the given parent Component. Default implementation always returns true, may be overridden to provide specific behavior.
Parameters:
  parent - the Component to evaluate as a parent true if the Component is a valid parent



isVisible
final public boolean isVisible()(Code)
Returns the visibility state of this Component. Non-visible components will not be seen by the rendering application container, and will not be rendered in any fashion on the user interface. Rendering Application Containers should ensure that no information about the state of an invisible component is provided to the user interface for security purposes. the visibility state of this Component



processInput
public void processInput(String inputName, Object inputValue)(Code)
Processes client input specific to the Component received from the UpdateManager. Derivative implementations should take care to invoke super.processInput().
Parameters:
  inputName - the name of the input
Parameters:
  inputValue - the value of the input
See Also:   nextapp.echo2.app.update.UpdateManager



register
void register(ApplicationInstance newValue)(Code)
Sets the ApplicationInstance to which this component is registered.

The ApplicationInstance to which a component is registered may not be changed directly from one to another, i.e., if the component is registered to instance "A" and an attempt is made to set it to instance "B", an IllegalStateException will be thrown. In order to change the instance to which a component is registered, the instance must first be set to null.
Parameters:
  newValue - the new ApplicationInstance
throws:
  IllegalStateException - in the event that an attempt is made tore-add a Component to a hierarchy during a dispose() operation or if an attempt is made toremove a Component during an init()operation.




remove
public void remove(Component c)(Code)
Removes the specified child Component from this Component.

All Component remove operations use this method to remove Components. Components that require notification of all child removals should override this method (while ensuring to call the superclass' implementation).
Parameters:
  c - the child Component to remove




remove
public void remove(int n)(Code)
Removes the Component at the nth index.
Parameters:
  n - the index of the child Component to remove
throws:
  IndexOutOfBoundsException - if the index is not valid



removeAll
public void removeAll()(Code)
Removes all child Components.



removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener l)(Code)
Removes a property change listener from this Component.
Parameters:
  l - the listener to be removed



setBackground
public void setBackground(Color newValue)(Code)
Sets the default background color of the Component.
Parameters:
  newValue - the new background Color



setEnabled
public void setEnabled(boolean newValue)(Code)
Sets the enabled state of the Component.
Parameters:
  newValue - the new state
See Also:   Component.isEnabled



setFocusTraversalIndex
public void setFocusTraversalIndex(int newValue)(Code)
Sets the focus traversal (tab) index of the component.
Parameters:
  newValue - the new focus traversal index
See Also:   Component.getFocusTraversalIndex()



setFocusTraversalParticipant
public void setFocusTraversalParticipant(boolean newValue)(Code)
Sets whether the component participates in the focus traversal order (tab order).
Parameters:
  newValue - true if the component participates in the focus traversal order



setFont
public void setFont(Font newValue)(Code)
Sets the default text font of the Component.
Parameters:
  newValue - the new Font



setForeground
public void setForeground(Color newValue)(Code)
Sets the default foreground color of the Component.
Parameters:
  newValue - the new foreground Color



setId
public void setId(String id)(Code)
Sets a user-defined identifier for this Component.
Parameters:
  id - the new identifier



setIndexedProperty
public void setIndexedProperty(String propertyName, int propertyIndex, Object newValue)(Code)
Sets a generic indexed property of the Component. The value will be stored in this Component's local style.
Parameters:
  propertyName - the name of the property
Parameters:
  propertyIndex - the index of the property
Parameters:
  newValue - the value of the property
See Also:   Component.getIndexedProperty(java.lang.String,int)



setLayoutData
public void setLayoutData(LayoutData newValue)(Code)
Sets the LayoutData of this Component. A LayoutData implementation describes how this Component is laid out within/interacts with its containing parent Component.
Parameters:
  newValue - the new LayoutData
See Also:   LayoutData



setLayoutDirection
public void setLayoutDirection(LayoutDirection newValue)(Code)
Sets the LayoutDirection of this Component, describing whether content is rendered left-to-right or right-to-left.
Parameters:
  newValue - the new LayoutDirection.



setLocale
public void setLocale(Locale newValue)(Code)
Sets the locale of the Component.
Parameters:
  newValue - the new locale
See Also:   Component.getLocale()



setProperty
public void setProperty(String propertyName, Object newValue)(Code)
Sets a generic property of the Component. The value will be stored in this Component's local style.
Parameters:
  propertyName - the name of the property
Parameters:
  newValue - the value of the property
See Also:   Component.getProperty(java.lang.String)



setRenderId
public void setRenderId(String renderId)(Code)
Sets a custom render identifier for this Component. The identifier may be changed without notification if another component is already using it. Identifiers are limited to ASCII alphanumeric values. The first character must be an upper- or lower-case ASCII letter. Underscores and other punctuation characters are not permitted. Use of "TitleCase" or "camelCase" is recommended.
Parameters:
  renderId - the new identifier



setStyle
public void setStyle(Style newValue)(Code)
Sets the shared style of the Component. Setting the shared style will have no impact on the local stylistic properties of the Component.
Parameters:
  newValue - the new shared style
See Also:   Component.getStyle()



setStyleName
public void setStyleName(String newValue)(Code)
Sets the name of the style to use from the ApplicationInstance-defined StyleSheet. Setting the style name will have no impact on the local stylistic properties of the Component.
Parameters:
  newValue - the new style name
See Also:   Component.getStyleName



setVisible
public void setVisible(boolean newValue)(Code)
Sets the visibility state of this Component.
Parameters:
  newValue - the new visibility state
See Also:   Component.isVisible()



validate
public void validate()(Code)
A life-cycle method invoked before the component is rendered to ensure it is in a valid state. Default implementation is empty. Overriding implementations should ensure to invoke super.validate() out of convention.



verifyInput
public boolean verifyInput(String inputName, Object inputValue)(Code)
Invoked by the ClientUpdateManager on each component in the hierarchy whose processInput() method will layer be invoked in the current transaction. This method should return true if the component will be capable of processing the given input in its current state or false otherwise. This method should not do any of the actual processing work if overridden (any actual processing should be done in the processInput() implementation).

The default implementation verifies that the component is visible, enabled, and not "obscured" by the presence of any modal component. If overriding this method, your implementation should invoke super.verifyInput().
Parameters:
  inputName - the name of the input
Parameters:
  inputValue - the value of the input true if the input is allowed to be processed by this componentin its current state




visibleIndexOf
final public int visibleIndexOf(Component c)(Code)
Determines the index of the given Component within the visible children of this Component. If the given Component is not a child, -1 is returned.
Parameters:
  c - the Component to analyze the index of the specified Component amongst the visible children of this Component



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.