com.oktiva.mogno
Class Visual

java.lang.Object
  extended bycom.oktiva.mogno.Component
      extended bycom.oktiva.mogno.Visual
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
ActiveList, Container, EmptyTag, Include, Input, Radiogroup, SimpleList, Template

public class Visual
extends Component

This is the base class for all the components that are visual components.

Version:
$Id: Visual.java,v 1.1.1.1 2005/01/05 16:52:49 ruoso Exp $

Field Summary
 java.lang.String evOnShow
          Event dispatched when a visual component is shown
 java.lang.String evOnSyntaxError
          Event dispatched when a syntax error occour
 int gridHeight
          Used by container to know how many rows this component will use defaults to 1
 int gridWeightX
          Defines the weight of this column.
 int gridWeightY
          Defines the weight of this column.
 int gridWidth
          Used by container to know how many columns this component will use defaults to 1
 java.lang.String id
          Core HTML attribute
 java.lang.String lastError
          What was the last error in this component?
 int left
          Ordering variable
 java.lang.String parent
          The component in which this component is inside
protected  boolean problematic
          Signalization if this component had a error
 java.lang.String style
          Core HTML attribute
 java.lang.String styleClass
          Mapped core HTML attribute
Because class is a reserved word, the property class is mapped to styleClass.
 java.lang.String title
          Core HTML attribute
 int top
          Ordering variable
 
Fields inherited from class com.oktiva.mogno.Component
bag, componentFiler, componentFilerParams, designing, eventQueue, evOnCreate, name, owned, ownedClasses, owner, tag, xmlFileName
 
Constructor Summary
Visual()
           
 
Method Summary
 java.lang.String buildHtmlAttributes(java.util.Vector att)
          Return the string with the name="value" pairs to be used inside html tags.
 java.util.Vector cellhalignHtmlAttributes()
          Return the cellhalign elements as defined by W3C.
 java.util.Vector cellvalignHtmlAttributes()
          Return the cellvalign elements as defined by W3C.
 void checkSyntax()
          Check the syntax for this component.
 java.util.Vector coreHtmlAttributes()
          Return the core elements as defined by W3C.
 boolean descendentOf(java.lang.String name)
          Verify if this component has an ancestor named name
 java.util.Vector eventsHtmlAttributes()
          Return the events elements as defined by W3C.
 java.lang.String getEvOnShow()
           
 java.lang.String getEvOnSyntaxError()
           
 int getGridHeight()
           
 int getGridWeightX()
           
 int getGridWeightY()
           
 int getGridWidth()
           
 java.lang.String getId()
           
 java.lang.String getLastError()
           
 int getLeft()
           
 java.lang.String getParent()
           
 java.lang.String getStyle()
           
 java.lang.String getStyleClass()
           
 java.lang.String getTitle()
           
 int getTop()
           
 java.util.Vector htmlAttributes()
          Valid HTML attributes for this component.
 java.util.Vector i18nHtmlAttributes()
          Return the internationalization (i18n) elements as defined by W3C.
 java.util.Vector localizableAttributes()
          Attributes that will be localized.
 void receiveRequest(javax.servlet.http.HttpServletRequest request)
          Receive the request and rebuild the properties using the data that the user has filled in.
 void setEvOnShow(java.lang.String evOnShow)
           
 void setEvOnSyntaxError(java.lang.String evOnSyntaxError)
           
 void setGridHeight(int gridHeight)
           
 void setGridWeightX(int gridWeightX)
           
 void setGridWeightY(int gridWeightY)
           
 void setGridWidth(int gridWidth)
           
 void setId(java.lang.String id)
           
 void setLastError(java.lang.String lastError)
           
 void setLeft(int left)
           
 void setParent(java.lang.String parent)
           
 void setStyle(java.lang.String style)
           
 void setStyleClass(java.lang.String styleClass)
           
 void setTitle(java.lang.String title)
           
 void setTop(int top)
           
 java.lang.String show()
          Implements just the dispatching of the onShow event
 java.lang.String showHtmlAttributes()
          Return the string with the name="value" pairs to be used inside html tags, for the current component.
 
Methods inherited from class com.oktiva.mogno.Component
attribsHash, createOwnedComponents, dispatch, dispatchAll, dispatchFunction, eventParamTypes, eventParamValues, freeChild, getApplication, getAttrsTypes, getBag, getChild, getChildClass, getClone, getEvOnCreate, getFromBag, getName, getOrderedChildNames, getOwner, initialize, initialize, initialize, initialize, isDesigning, listChilds, nonAttributeGetters, putInBag, queue, registerChild, removeFromBag, serializedBag, setBag, setComponentFiler, setComponentFilerParams, setDesigning, setEvOnCreate, setName, setOwner, setProperties, store, unserializeBag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

public java.lang.String id
Core HTML attribute


styleClass

public java.lang.String styleClass
Mapped core HTML attribute
Because class is a reserved word, the property class is mapped to styleClass.

See Also:
showHtmlAttributes()

style

public java.lang.String style
Core HTML attribute


title

public java.lang.String title
Core HTML attribute


parent

public java.lang.String parent
The component in which this component is inside


top

public int top
Ordering variable


left

public int left
Ordering variable


gridHeight

public int gridHeight
Used by container to know how many rows this component will use defaults to 1


gridWidth

public int gridWidth
Used by container to know how many columns this component will use defaults to 1


gridWeightX

public int gridWeightX
Defines the weight of this column. defaults to 0


gridWeightY

public int gridWeightY
Defines the weight of this column. defaults to 0


evOnShow

public java.lang.String evOnShow
Event dispatched when a visual component is shown


problematic

protected boolean problematic
Signalization if this component had a error


lastError

public java.lang.String lastError
What was the last error in this component?


evOnSyntaxError

public java.lang.String evOnSyntaxError
Event dispatched when a syntax error occour

Constructor Detail

Visual

public Visual()
Method Detail

getId

public java.lang.String getId()

setId

public void setId(java.lang.String id)

getStyleClass

public java.lang.String getStyleClass()

setStyleClass

public void setStyleClass(java.lang.String styleClass)

getStyle

public java.lang.String getStyle()

setStyle

public void setStyle(java.lang.String style)

getTitle

public java.lang.String getTitle()

setTitle

public void setTitle(java.lang.String title)

getParent

public java.lang.String getParent()

setParent

public void setParent(java.lang.String parent)

getTop

public int getTop()

setTop

public void setTop(int top)

getLeft

public int getLeft()

setLeft

public void setLeft(int left)

getGridHeight

public int getGridHeight()

setGridHeight

public void setGridHeight(int gridHeight)

getGridWidth

public int getGridWidth()

setGridWidth

public void setGridWidth(int gridWidth)

getGridWeightX

public int getGridWeightX()

setGridWeightX

public void setGridWeightX(int gridWeightX)

getGridWeightY

public int getGridWeightY()

setGridWeightY

public void setGridWeightY(int gridWeightY)

getEvOnShow

public java.lang.String getEvOnShow()

setEvOnShow

public void setEvOnShow(java.lang.String evOnShow)

getLastError

public java.lang.String getLastError()

setLastError

public void setLastError(java.lang.String lastError)

getEvOnSyntaxError

public java.lang.String getEvOnSyntaxError()

setEvOnSyntaxError

public void setEvOnSyntaxError(java.lang.String evOnSyntaxError)

show

public java.lang.String show()
                      throws java.lang.Exception
Implements just the dispatching of the onShow event

Throws:
java.lang.Exception

receiveRequest

public void receiveRequest(javax.servlet.http.HttpServletRequest request)
Receive the request and rebuild the properties using the data that the user has filled in. This is a stub method

Parameters:
request - HttpServletRequest

checkSyntax

public void checkSyntax()
                 throws SyntaxErrorException
Check the syntax for this component. This is a stub method.

Throws:
SyntaxErrorException - When the syntax is wrong.

showHtmlAttributes

public java.lang.String showHtmlAttributes()
Return the string with the name="value" pairs to be used inside html tags, for the current component.

NOTE: Because class is a reserved word, the property styleClass is mapped to class here, and for the same reason, charOn is mapped to char and forId is mapped to for.
Because accept-charset is a invalid identifier, the property acceptCharset is mapped to accept-charset here.

Returns:
the string
See Also:
styleClass, TableElement.charOn, Label.forId, Form.acceptCharset, buildHtmlAttributes(Vector)

buildHtmlAttributes

public java.lang.String buildHtmlAttributes(java.util.Vector att)
Return the string with the name="value" pairs to be used inside html tags.

NOTE: Because class is a reserved word, the property styleClass is mapped to class here, and for the same reason, charOn is mapped to char and forId is mapped to for.
Because accept-charset is a invalid identifier, the property acceptCharset is mapped to accept-charset here.

Returns:
the string
See Also:
styleClass, TableElement.charOn, Label.forId, Form.acceptCharset, showHtmlAttributes()

htmlAttributes

public java.util.Vector htmlAttributes()
Valid HTML attributes for this component.
All this attributes must be properties of the class.


coreHtmlAttributes

public java.util.Vector coreHtmlAttributes()
Return the core elements as defined by W3C.
To be pasted on classes that uses this attributes:
        public String id;
        public String styleClass;
        public String style;
        public String title;
 


i18nHtmlAttributes

public java.util.Vector i18nHtmlAttributes()
Return the internationalization (i18n) elements as defined by W3C.
To be pasted on classes that uses this attributes:
        public String lang;
        public String dir;
 


eventsHtmlAttributes

public java.util.Vector eventsHtmlAttributes()
Return the events elements as defined by W3C.
To be pasted on classes that uses this attributes:
        public String onmouseup;
        public String onmousedown;
        public String onclick;
        public String ondblclick;
        public String onmouseover;
        public String onmousemove;
        public String onmouseout;
        public String onkeypress;
        public String onkeydown;
        public String onkeyup;
 


cellhalignHtmlAttributes

public java.util.Vector cellhalignHtmlAttributes()
Return the cellhalign elements as defined by W3C.
To be pasted on classes that uses this attributes:
        public String align;
        public String charOn;
        public String charoff;
 


cellvalignHtmlAttributes

public java.util.Vector cellvalignHtmlAttributes()
Return the cellvalign elements as defined by W3C.
To be pasted on classes that uses this attributes:
        public String valign;
 


localizableAttributes

public java.util.Vector localizableAttributes()
Attributes that will be localized.


descendentOf

public boolean descendentOf(java.lang.String name)
Verify if this component has an ancestor named name

Overrides:
descendentOf in class Component
Parameters:
name - The name of the ancestor component
Returns:
boolean true if it is a descendent of name