|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.xerces.dom.NodeImpl
org.apache.xerces.dom.ChildNode
org.apache.xerces.dom.ParentNode
org.apache.xerces.dom.ElementImpl
org.apache.xerces.dom.ElementNSImpl
fi.hut.tml.xsmiles.dom.XSmilesElementImpl
fi.hut.tml.xsmiles.dom.VisualElementImpl
fi.hut.tml.xsmiles.mlfc.xforms.dom.XFormsElementImpl
fi.hut.tml.xsmiles.mlfc.xforms.dom.DynBoundElementImpl
fi.hut.tml.xsmiles.mlfc.xforms.dom.XFormsControl
The base class for the XForm controls, such as buttons and textboxes. It uses the abstract component model of X-SMiles in the package fi.hut.tml.xsmiles.gui.components
| Nested Class Summary | |
class |
XFormsControl.ValuePseudoElement
|
| Nested classes inherited from class fi.hut.tml.xsmiles.dom.XSmilesElementImpl |
XSmilesElementImpl.PseudoNodeList |
| Field Summary | |
protected XCaption |
captionComp
the label (caption) component |
protected XComponent |
component
the abstract component for this control |
protected boolean |
componentInited
|
protected CompoundServiceImpl |
compoundService
this is a kludge that is used to create a compound component if used with a host document that does not support CSS, such as SMIL and SVG |
protected boolean |
incremental
is this control incremental |
protected java.lang.String |
inputMode
the current value of input mode |
protected boolean |
insideUpdateEvent
this flag ensures, that updates are not done many times, and that we dont get into a loop |
protected boolean |
isInputComponent
|
protected boolean |
isOutput
Am I a xforms:output element |
protected boolean |
outOfRange
am I in-range or out-of-range, default is in-range. |
protected java.util.Vector |
pseudoElements
get the vector containing all pseudoelements of this element. |
protected VisualElementImpl |
valuePseudoElement
|
| Fields inherited from class fi.hut.tml.xsmiles.mlfc.xforms.dom.DynBoundElementImpl |
bind, BINDING_ATTRIBUTES_NOT_FOUND, BINDING_FAILED, BINDING_OK, binding_state, bindingAttributesRequired, BOUND_NODE_NOT_FOUND, contextNode, init, myModel, refExpr, UNINITIALIZED |
| Fields inherited from class fi.hut.tml.xsmiles.mlfc.xforms.dom.XFormsElementImpl |
debugEvents, EVENTS_NS, handler, inited, ownerDoc |
| Fields inherited from class fi.hut.tml.xsmiles.dom.VisualElementImpl |
views |
| Fields inherited from class fi.hut.tml.xsmiles.dom.XSmilesElementImpl |
DESTROYED, elementStatus, INITIALIZED, INITIALIZING, setPseudoClasses, style, xblpropname |
| Fields inherited from class org.apache.xerces.dom.ElementNSImpl |
localName, namespaceURI |
| Fields inherited from class org.apache.xerces.dom.ElementImpl |
attributes, name |
| Fields inherited from class org.apache.xerces.dom.ParentNode |
firstChild, fNodeListCache, ownerDocument |
| Fields inherited from class org.apache.xerces.dom.ChildNode |
nextSibling, previousSibling |
| Fields inherited from class org.apache.xerces.dom.NodeImpl |
DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, ID, IGNORABLEWS, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_DISCONNECTED, TREE_POSITION_EQUIVALENT, TREE_POSITION_FOLLOWING, TREE_POSITION_PRECEDING, TREE_POSITION_SAME_NODE, UNNORMALIZED |
| Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
| Constructor Summary | |
XFormsControl(XFormsElementHandler owner,
java.lang.String ns,
java.lang.String name)
Constructs a new XFormsControl (AnyControl in XForms spec). |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent ae)
JButton clicks are handled by actionPerformed |
void |
addCaption()
|
protected abstract void |
changeComponentValue(java.lang.String newValue)
|
protected void |
checkBindingState()
this is called in init, so that button can override the default behaviour |
protected CaptionElementImpl |
checkCaption()
|
protected void |
checkInitialMIPState()
|
void |
checkStyling()
the modelelementimpl notifies this after calling setReadonly et al. |
void |
checkValidity(InstanceItem item)
An instance item instructs the control to check its validity, when the status changes |
void |
checkVisibility()
This is called when a binding goes to zero nodes |
void |
checkVisibility(InstanceItem item)
An instance item instructs the control to check its visibility, when the status changes |
java.lang.Object |
clone()
|
void |
clonePseudoElements(PseudoElementContainerService from,
PseudoElementContainerService to)
overridden, because there is always just one pseudoelement |
protected void |
componentInit()
this is only called on-demand, when getComponent is called for the valuepseudoelement |
abstract XComponent |
createComponent()
Creates the visible containing component of this control |
protected void |
createValuePseudoElement()
|
void |
destroy()
Destroy this element and its descendants recursively. |
boolean |
dispatchEvent(org.w3c.dom.events.Event event)
this method is overridden so that default actions for certain events can be processed |
protected void |
doHelp(java.awt.event.ActionEvent event)
|
void |
focusGained(java.awt.event.FocusEvent ae)
|
void |
focusLost(java.awt.event.FocusEvent ae)
|
protected void |
formatCaption()
|
protected void |
formatComponent()
Formats the content according to the CSS style attribute, this can be overridden by the extending classes |
java.lang.String |
getAppearance()
|
CaptionElementImpl |
getCaption()
|
static CaptionElementImpl |
getCaption(org.w3c.dom.Element e)
|
protected java.lang.String |
getCaptionSide()
Returns the string value of the caption-side CSS property, used as a hack when the host language does not support CSS flow layout to position the label |
protected java.lang.String |
getCaptionText()
|
protected int |
getDatatypeId()
|
ECMAScripter |
getECMAScripter()
|
boolean |
getIncremental()
|
InstanceItemListener |
getInstanceItemListener()
|
java.lang.String |
getLabelAsText()
|
java.lang.String |
getOutputValue()
|
org.w3c.dom.css.CSSStyleDeclaration |
getOwnerStyle()
|
org.w3c.dom.Node |
getParentNodeForPseudoElement()
|
protected org.w3c.dom.Document |
getParentOwnerDocument()
|
java.util.Vector |
getPseudoElements()
get the vector containing all pseudoelements of this element. |
VisualComponentService |
getVisualComponent()
Return the visual component for this extension element This would return e.g. |
void |
handleEvent(org.w3c.dom.events.Event evt)
|
void |
init()
Initialize this element. |
boolean |
isPseudoClass(java.lang.String pseudoclass)
ask whether this element belongs to a certain CSS pseudoclass |
boolean |
isVisible()
should this be visible. |
void |
mouseClicked(java.awt.event.MouseEvent evt)
Mouse events. |
void |
mouseEntered(java.awt.event.MouseEvent evt)
|
void |
mouseExited(java.awt.event.MouseEvent evt)
|
void |
mousePressed(java.awt.event.MouseEvent evt)
|
void |
mouseReleased(java.awt.event.MouseEvent evt)
|
void |
notifyBindingChanged(org.w3c.dom.NodeList newBinding)
notifies the listener that the binding and the value changed |
void |
notifyError(java.lang.Exception e,
boolean atSubmission)
notify this listener that there was an error in the value of the instance item. |
void |
notifyPseudoRemoved(org.w3c.dom.Element elem)
since the pseudoelement removals are not catched by the xsmilesvisualelement, this method can be used to notify a remove |
protected void |
registerListener()
|
void |
setAttribute(java.lang.String name,
java.lang.String value)
interactive attributes |
org.w3c.dom.Attr |
setAttributeNode(org.w3c.dom.Attr newAttr)
|
protected void |
setAttributeValue(java.lang.String name,
java.lang.String value)
|
void |
setHint(HintElementImpl h)
Sets the components Tooltip (Hint) text |
protected void |
setInputMode(java.lang.String im)
|
void |
setOutOfRange(boolean range)
|
void |
setReadonly(boolean ro)
|
protected void |
setRefNodeValue(java.lang.Object value,
boolean valueChanging)
Sets the reference instance node value |
void |
setRequired(boolean ro)
|
void |
styleChanged()
marks the component that is has failed the schema test |
void |
valueChanged(java.lang.String newValue)
The value of this instanceItem has changed |
| Methods inherited from class fi.hut.tml.xsmiles.mlfc.xforms.dom.XFormsElementImpl |
debugNode, dispatch, dispatch, dispatchActivateEvent, dispatchClickEvent, findFirstRelevantControl, getBrowser, getClassName, getComponentFactory, getId, getModel, getModelId, getModelInScope, getSrc, getStyleAttrValue, getXMLDocument, handleXFormsException, initializeXMLEvents, isCSSLayoutDoc, moveNodes, printEvent, removeAllChildren, retrieveInstanceItem, retrieveResourceAsString, serializeNode, setClassName, setHandler, setId, setOwnerDoc |
| Methods inherited from class fi.hut.tml.xsmiles.dom.VisualElementImpl |
addView, belongsToTree, getViews, insertBefore, isCurrentlyVisible, isFocusPoint, isVisibleByCSSProperties, removeAllViews, removeAttribute, removeChild, replaceChild, setStatus, updateViews |
| Methods inherited from class org.apache.xerces.dom.ElementNSImpl |
getBaseURI, getLocalName, getNamespaceURI, getPrefix, getTypeName, getTypeNamespace, setPrefix, setType, setValues |
| Methods inherited from class org.apache.xerces.dom.ElementImpl |
cloneNode, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDefaultAttributes, getElementsByTagName, getElementsByTagNameNS, getNodeName, getNodeType, getSchemaTypeInfo, getTagName, getXercesAttribute, hasAttribute, hasAttributeNS, hasAttributes, isEqualNode, normalize, reconcileDefaultAttributes, removeAttributeNode, removeAttributeNS, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setReadOnly, setupDefaultAttributes, setXercesAttributeNode, synchronizeData |
| Methods inherited from class org.apache.xerces.dom.ParentNode |
getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, getTextContent, hasChildNodes, item, setTextContent, synchronizeChildren |
| Methods inherited from class org.apache.xerces.dom.ChildNode |
getNextSibling, getParentNode, getPreviousSibling |
| Methods inherited from class org.apache.xerces.dom.NodeImpl |
addEventListener, appendChild, changed, changes, compareDocumentPosition, compareTreePosition, getContainer, getFeature, getNodeNumber, getNodeValue, getReadOnly, getUserData, getUserData, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, removeEventListener, setNodeValue, setUserData, setUserData, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface fi.hut.tml.xsmiles.dom.StylableElement |
getRuleNode, getStyle, getStyleAttrValue, hasStyle, setRuleNode, setStyle |
| Methods inherited from interface org.w3c.dom.Element |
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttributeNodeNS, setAttributeNS |
| Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
| Methods inherited from interface fi.hut.tml.xsmiles.dom.VisualElement |
getStyle |
| Methods inherited from interface fi.hut.tml.xsmiles.dom.PseudoClassController |
getPseudoClass, setPseudoClass |
| Field Detail |
protected boolean incremental
protected java.lang.String inputMode
protected boolean isInputComponent
protected boolean componentInited
protected boolean insideUpdateEvent
protected XComponent component
protected XCaption captionComp
protected boolean isOutput
protected boolean outOfRange
protected CompoundServiceImpl compoundService
protected java.util.Vector pseudoElements
protected VisualElementImpl valuePseudoElement
| Constructor Detail |
public XFormsControl(XFormsElementHandler owner,
java.lang.String ns,
java.lang.String name)
| Method Detail |
public void notifyPseudoRemoved(org.w3c.dom.Element elem)
notifyPseudoRemoved in interface PseudoElementContainerServicenotifyPseudoRemoved in class VisualElementImplelem - public void init()
XSmilesElementImpl
init in interface XFormsElementinit in class XFormsElementImplprotected void componentInit()
public java.lang.String getAppearance()
getAppearance in interface LabeledElementpublic VisualComponentService getVisualComponent()
getVisualComponent in interface CompoundServiceprotected java.lang.String getCaptionSide()
protected void checkBindingState()
protected void checkInitialMIPState()
public java.lang.String getOutputValue()
public void destroy()
XSmilesElementImpl
destroy in interface XFormsElementdestroy in class DynBoundElementImplprotected CaptionElementImpl checkCaption()
public CaptionElementImpl getCaption()
public static CaptionElementImpl getCaption(org.w3c.dom.Element e)
public void addCaption()
public abstract XComponent createComponent()
protected void formatComponent()
protected void formatCaption()
protected abstract void changeComponentValue(java.lang.String newValue)
public void styleChanged()
styleChanged in interface CSSStyleChangeListenerstyleChanged in class VisualElementImplpublic void setHint(HintElementImpl h)
protected java.lang.String getCaptionText()
public java.lang.String getLabelAsText()
getLabelAsText in interface LabeledElementpublic void setReadonly(boolean ro)
setReadonly in interface InstanceItemListenerpublic void setRequired(boolean ro)
setRequired in interface InstanceItemListenerpublic void setOutOfRange(boolean range)
public void checkVisibility(InstanceItem item)
checkVisibility in interface InstanceItemListenerpublic void checkValidity(InstanceItem item)
checkValidity in interface InstanceItemListenerpublic void valueChanged(java.lang.String newValue)
valueChanged in interface InstanceItemListenerpublic void checkStyling()
checkStyling in interface InstanceItemListenercheckStyling in class DynBoundElementImpl
protected void setRefNodeValue(java.lang.Object value,
boolean valueChanging)
DynBoundElementImpl