public interface ItsNatComponent extends ItsNatUserData
Some components have property change tracking like ItsNatLabel
and
ItsNatHTMLInputTextFormatted
components. If no property is tracked
by the component, listeners registered using addPropertyChangeListener(PropertyChangeListener)
addPropertyChangeListener(String,PropertyChangeListener)
or addVetoableChangeListener(VetoableChangeListener)
are never called.
ItsNatComponentManager.createItsNatComponent(org.w3c.dom.Node,String,org.itsnat.core.NameValue[])
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(ClientDocument clientDoc,
java.lang.String type,
org.w3c.dom.events.EventListener listener)
Registers the specified event listener to the component node for the specific client.
|
void |
addEventListener(ClientDocument clientDoc,
java.lang.String type,
org.w3c.dom.events.EventListener listener,
boolean before)
Registers the specified event listener to the component node for the specific client.
|
void |
addEventListener(java.lang.String type,
org.w3c.dom.events.EventListener listener)
Registers the specified event listener to the component node.
|
void |
addEventListener(java.lang.String type,
org.w3c.dom.events.EventListener listener,
boolean before)
Registers the specified event listener to the component node.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Registers a new property change listener listening for any property change.
|
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Registers a new property change listener listening for the specified property name.
|
void |
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Registers a new vetoable property change listener listening for any property change.
|
void |
disableEventListener(ClientDocument clientDoc,
java.lang.String type)
Disables the component to receive events of the specified type and client.
|
void |
disableEventListener(java.lang.String type)
Disables the component to receive events of the specified type.
|
void |
dispose()
Disposes this component.
|
void |
enableEventListener(ClientDocument clientDoc,
java.lang.String type)
Enable the component to receive events of the specified type and client.
|
void |
enableEventListener(java.lang.String type)
Enable the component to receive events of the specified type.
|
java.lang.Object |
getArtifact(java.lang.String name)
Returns the artifact with the specified name.
|
java.lang.Object |
getArtifact(java.lang.String name,
boolean cascade)
Returns the artifact with the specified name.
|
ItsNatComponentManager |
getItsNatComponentManager()
Returns the ItsNat component manager parent of this component.
|
ItsNatComponentUI |
getItsNatComponentUI()
Returns the user interface manager of this component.
|
ItsNatDocument |
getItsNatDocument()
Returns the ItsNat document this document is associated to.
|
org.w3c.dom.Node |
getNode()
Returns the associated DOM node to this component.
|
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners()
Returns all registered listeners listening for any property change.
|
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners(java.lang.String propertyName)
Returns all registered listeners listening for changes in the specified property.
|
java.beans.VetoableChangeListener[] |
getVetoableChangeListeners()
Returns all registered listeners listening for any vetoable property change.
|
boolean |
isDisposed()
Informs whether this component was disposed.
|
boolean |
isEnabled()
Informs whether this component receives UI events.
|
void |
registerArtifact(java.lang.String name,
java.lang.Object value)
Registers an artifact with the specified name.
|
java.lang.Object |
removeArtifact(java.lang.String name)
Removes the artifact with the specified name.
|
void |
removeEventListener(ClientDocument clientDoc,
java.lang.String type,
org.w3c.dom.events.EventListener listener)
Unregisters the specified event listener from the component node for the specific client.
|
void |
removeEventListener(ClientDocument clientDoc,
java.lang.String type,
org.w3c.dom.events.EventListener listener,
boolean before)
Unregisters the specified event listener from the component node for the specific client.
|
void |
removeEventListener(java.lang.String type,
org.w3c.dom.events.EventListener listener)
Unregisters the specified event listener from the component node.
|
void |
removeEventListener(java.lang.String type,
org.w3c.dom.events.EventListener listener,
boolean before)
Unregisters the specified event listener from the component node.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes the specified property change listener listening for any property change.
|
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Removes the specified property change listener listening for the specified property name.
|
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes the specified vetoable property change listener listening for any property change.
|
void |
setEnabled(boolean b)
Sets whether this component can receive UI events.
|
void |
setEventListenerParams(ClientDocument clientDoc,
java.lang.String type,
boolean useCapture,
int commMode,
ParamTransport[] extraParams,
java.lang.String preSendCode,
long eventTimeout)
Sets the parameters used to fire and receive AJAX/SCRIPT events by this component and specified client.
|
void |
setEventListenerParams(java.lang.String type,
boolean useCapture,
int commMode,
ParamTransport[] extraParams,
java.lang.String preSendCode,
long eventTimeout)
Sets the parameters used to fire and receive AJAX/SCRIPT events by this component.
|
void |
setNode(org.w3c.dom.Node node)
Changes the associated DOM node (reattachment).
|
containsUserValueName, getUserValue, getUserValueNames, removeUserValue, setUserValue
org.w3c.dom.Node getNode()
void setNode(org.w3c.dom.Node node)
node
- the new DOM node.void addEventListener(java.lang.String type, org.w3c.dom.events.EventListener listener, boolean before)
The specified event type is automatically enabled (see enableEventListener(String)
).
If this component has a default behavior associated to the specified event type, the listener
is executed before this default behavior if before
parameter is true,
otherwise is executed after.
Several listeners may be registered to the same event type.
type
- the event type to listen.listener
- the listener to be executed.before
- if true the listener is executed before the default behavior of the component.removeEventListener(String,EventListener,boolean)
,
addEventListener(ClientDocument,String,EventListener,boolean)
void removeEventListener(java.lang.String type, org.w3c.dom.events.EventListener listener, boolean before)
type
- the event type of the listener to unregister.listener
- to unregister.before
- if the listener to unregister is a "before" or "after" listener.addEventListener(String,EventListener,boolean)
,
removeEventListener(ClientDocument,String,EventListener,boolean)
void addEventListener(java.lang.String type, org.w3c.dom.events.EventListener listener)
Current implementation calls addEventListener(String,EventListener,boolean)
with before
parameter set to false (executed after).
type
- the event type to listen.listener
- the listener to be executed.addEventListener(ClientDocument,String,EventListener)
void removeEventListener(java.lang.String type, org.w3c.dom.events.EventListener listener)
Current implementation calls removeEventListener(String,EventListener,boolean)
with before
parameter set to false (unregisters the "after" listener).
type
- the event type of the listener to unregister.listener
- to unregister.removeEventListener(ClientDocument,String,EventListener)
void addEventListener(ClientDocument clientDoc, java.lang.String type, org.w3c.dom.events.EventListener listener, boolean before)
The specified event type is automatically enabled (see enableEventListener(String)
).
If this component has a default behavior associated to the specified event type, the listener
is executed before this default behavior if before
parameter is true,
otherwise is executed after.
Several listeners may be registered to the same event type.
clientDoc
- the client source of events.type
- the event type to listen.listener
- the listener to be executed.before
- if true the listener is executed before the default behavior of the component.removeEventListener(String,EventListener,boolean)
,
addEventListener(String,EventListener,boolean)
void removeEventListener(ClientDocument clientDoc, java.lang.String type, org.w3c.dom.events.EventListener listener, boolean before)
clientDoc
- the client source of events.type
- the event type of the listener to unregister.listener
- to unregister.before
- if the listener to unregister is a "before" or "after" listener.addEventListener(String,EventListener,boolean)
,
removeEventListener(String,EventListener,boolean)
void addEventListener(ClientDocument clientDoc, java.lang.String type, org.w3c.dom.events.EventListener listener)
Current implementation calls addEventListener(String,EventListener,boolean)
with before
parameter set to false (executed after).
clientDoc
- the client source of events.type
- the event type to listen.listener
- the listener to be executed.addEventListener(String,EventListener)
void removeEventListener(ClientDocument clientDoc, java.lang.String type, org.w3c.dom.events.EventListener listener)
Current implementation calls removeEventListener(String,EventListener,boolean)
with before
parameter set to false (unregisters the "after" listener).
clientDoc
- the client source of events.type
- the event type of the listener to unregister.listener
- to unregister.removeEventListener(String,EventListener)
void enableEventListener(java.lang.String type)
If this component has a default behavior associated to the specified type (and is disabled by default) then is enabled.
type
- the event type to enable.addEventListener(String,org.w3c.dom.events.EventListener)
,
enableEventListener(ClientDocument,String)
void disableEventListener(java.lang.String type)
No event listener added with addEventListener(String,org.w3c.dom.events.EventListener)
is unregistered.
type
- the event type to enable.disableEventListener(ClientDocument,String)
void enableEventListener(ClientDocument clientDoc, java.lang.String type)
If this component has a default behavior associated to the specified type (and is disabled by default) then is enabled.
clientDoc
- the client source of events.type
- the event type to enable.addEventListener(String,org.w3c.dom.events.EventListener)
,
enableEventListener(String)
void disableEventListener(ClientDocument clientDoc, java.lang.String type)
No event listener added with addEventListener(String,org.w3c.dom.events.EventListener)
is unregistered.
clientDoc
- the client source of events.type
- the event type to enable.disableEventListener(String)
void setEventListenerParams(java.lang.String type, boolean useCapture, int commMode, ParamTransport[] extraParams, java.lang.String preSendCode, long eventTimeout)
All current registered event listeners are affected.
type
- the DOM event type name (click, change etc).useCapture
- if event capture is enabled. False is the most portable value (MSIE v6 does not support event capture).commMode
- communication mode.extraParams
- optional client to server data transport and synchronization rules. May be null.preSendCode
- custom JavaScript code to execute before an event of this listener type is fired. May be null.eventTimeout
- the timeout of events. If negative no timeout is defined.ItsNatDocument.addEventListener(org.w3c.dom.events.EventTarget,String,org.w3c.dom.events.EventListener,boolean,int,org.itsnat.core.event.ParamTransport[],String,long)
,
setEventListenerParams(ClientDocument,String,boolean,int,ParamTransport[],String,long)
void setEventListenerParams(ClientDocument clientDoc, java.lang.String type, boolean useCapture, int commMode, ParamTransport[] extraParams, java.lang.String preSendCode, long eventTimeout)
All current registered event listeners are affected.
clientDoc
- the client source of events.type
- the DOM event type name (click, change etc).useCapture
- if event capture is enabled. False is the most portable value (MSIE v6 does not support event capture).commMode
- communication mode.extraParams
- optional client to server data transport and synchronization rules. May be null.preSendCode
- custom JavaScript code to execute before an event of this listener type is fired. May be null.eventTimeout
- the timeout of events. If negative no timeout is defined.ItsNatDocument.addEventListener(org.w3c.dom.events.EventTarget,String,org.w3c.dom.events.EventListener,boolean,int,org.itsnat.core.event.ParamTransport[],String,long)
,
setEventListenerParams(String,boolean,int,ParamTransport[],String,long)
ItsNatDocument getItsNatDocument()
ItsNatComponentManager getItsNatComponentManager()
ItsNatComponentUI getItsNatComponentUI()
void dispose()
Typical dispose operations are: disable event listeners and disconnect data and selection models. A component "disposed" should be garbage collected.
isDisposed()
,
disableEventListener(String).
boolean isDisposed()
dispose()
void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the property change listener to register.void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the property change listener to unregister.java.beans.PropertyChangeListener[] getPropertyChangeListeners()
void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- the property name.listener
- the property change listener to register.void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- the property name.listener
- the property change listener to unregister.java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String propertyName)
propertyName
- the property name.void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- the vetoable property change listener to register.void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- the vetoable property change listener to unregister.java.beans.VetoableChangeListener[] getVetoableChangeListeners()
void registerArtifact(java.lang.String name, java.lang.Object value)
name
- the artifact namevalue
- the artifact.getArtifact(String)
,
removeArtifact(String)
,
NameValue
java.lang.Object getArtifact(java.lang.String name)
name
- the artifact name to look for.registerArtifact(String,Object)
,
getArtifact(String,boolean)
java.lang.Object removeArtifact(java.lang.String name)
name
- the artifact name to look for.registerArtifact(String,Object)
java.lang.Object getArtifact(java.lang.String name, boolean cascade)
If no artifact is found and cascade
is true,
the method ItsNatDocument.getArtifact(String,boolean)
is called with cascade
set to true to continue searching.
name
- the artifact name to look for.getArtifact(String)
boolean isEnabled()
void setEnabled(boolean b)
b
- true to enable this component.Copyright © 2007 Innowhere Software Services S.L. All Rights Reserved.