com.oktiva.mogno
Class Container

java.lang.Object
  extended bycom.oktiva.mogno.Component
      extended bycom.oktiva.mogno.Visual
          extended bycom.oktiva.mogno.Container
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
A, Address, Bdo, Blockquote, Body, Button, Caption, Div, Fieldset, Form, Frameset, H, Iframe, Label, Legend, ListElement, Map, Noframes, Object, Optgroup, Option, P, PhraseElement, Pre, Q, Script, Select, Span, Style, Sub, Sup, Table, TableElement, Textarea, TopLevel, XmlContainer

public class Container
extends Visual

This is the base class for container components.


Field Summary
protected  java.lang.String afterEnd
          Something to be put after the tag.
 java.lang.String content
           
 
Fields inherited from class com.oktiva.mogno.Visual
evOnShow, evOnSyntaxError, gridHeight, gridWeightX, gridWeightY, gridWidth, id, lastError, left, parent, problematic, style, styleClass, title, top
 
Fields inherited from class com.oktiva.mogno.Component
bag, componentFiler, componentFilerParams, designing, eventQueue, evOnCreate, name, owned, ownedClasses, owner, tag, xmlFileName
 
Constructor Summary
Container()
           
 
Method Summary
protected  void addChildsVector(Container c, java.util.Vector v)
           
 java.lang.String betweenColumns()
          Method betweenColumns.
 java.lang.String betweenRows()
          Method betweenRows.
 java.lang.String endColumn(int top, int left, Visual comp)
          Method endColumn.
 java.lang.String endContainer()
          Ends container's tag.
 java.lang.String endRow(int top)
          Method endRow.
protected  java.util.Vector getChildsVector(Component obj)
          Discover which components are inside obj.
 java.lang.String getContent()
           
 java.util.Vector getFullComponentsVector()
           
protected  java.util.Vector getOrderedChildNames()
           
 java.util.Vector getOrderedChildsVector()
          Discover which components are inside me, ordered by top and left.
 java.util.Vector nonAttributeGetters()
          Method used to define what methods started with "get" or "is" are not component attributes getter methods.
protected  java.util.Vector orderChildsVector(java.util.Vector v)
           
protected  Component selectParentComponent()
          The parent component: this one or his owner.
 void setContent(java.lang.String content)
           
 java.lang.String show()
          Builds the HTML from the ordered childs list.
 java.lang.String startColumn(int top, int left, Visual comp)
          Method startColumn.
 java.lang.String startContainer()
          Starts container's tag.
 java.lang.String startRow(int top)
          Method startRow.
 
Methods inherited from class com.oktiva.mogno.Visual
buildHtmlAttributes, cellhalignHtmlAttributes, cellvalignHtmlAttributes, checkSyntax, coreHtmlAttributes, descendentOf, eventsHtmlAttributes, getEvOnShow, getEvOnSyntaxError, getGridHeight, getGridWeightX, getGridWeightY, getGridWidth, getId, getLastError, getLeft, getParent, getStyle, getStyleClass, getTitle, getTop, htmlAttributes, i18nHtmlAttributes, localizableAttributes, receiveRequest, setEvOnShow, setEvOnSyntaxError, setGridHeight, setGridWeightX, setGridWeightY, setGridWidth, setId, setLastError, setLeft, setParent, setStyle, setStyleClass, setTitle, setTop, showHtmlAttributes
 
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, getOwner, initialize, initialize, initialize, initialize, isDesigning, listChilds, 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

content

public java.lang.String content

afterEnd

protected java.lang.String afterEnd
Something to be put after the tag. Default to emtpy string. It is intended primarily to put a new line after some tags.

Constructor Detail

Container

public Container()
Method Detail

getContent

public java.lang.String getContent()

setContent

public void setContent(java.lang.String content)

show

public java.lang.String show()
                      throws java.lang.Exception
Builds the HTML from the ordered childs list. When a component has gridWidth or gridHeight, the number of startColumns, endColumns, startRow and endRows called will still depend of the last top and left. Ex.: If you have a component with left 0 and gridWidth 2 and you have another component with left 2, there will be three calls to startColumn

Overrides:
show in class Visual
Throws:
java.lang.Exception

selectParentComponent

protected Component selectParentComponent()
The parent component: this one or his owner.

Returns:
(Component)owner==null?this:owner

getChildsVector

protected java.util.Vector getChildsVector(Component obj)
Discover which components are inside obj.

Parameters:
obj -
Returns:
A vector with the components.

orderChildsVector

protected java.util.Vector orderChildsVector(java.util.Vector v)

getOrderedChildsVector

public java.util.Vector getOrderedChildsVector()
Discover which components are inside me, ordered by top and left.

Returns:
A vector of vectors, where the first vector index is ordered by top and the second, by left.
See Also:
Visual.top, Visual.left

getFullComponentsVector

public java.util.Vector getFullComponentsVector()
Returns:
A vector with all components, starting with this container, ordered by hierarchy, top and left of each one.

getOrderedChildNames

protected java.util.Vector getOrderedChildNames()
Overrides:
getOrderedChildNames in class Component

addChildsVector

protected void addChildsVector(Container c,
                               java.util.Vector v)

nonAttributeGetters

public java.util.Vector nonAttributeGetters()
Description copied from class: Component
Method used to define what methods started with "get" or "is" are not component attributes getter methods.
This method in all subclasses of Component must start with the following line:
Vector v = super.nonAttributeGetters();
and end with the following:
return v;

Overrides:
nonAttributeGetters in class Component
Returns:
Vector with the name of the methods that starts with "get" or "is", but shoud not be used to set or get attributes automatically for this component.
See Also:
Component.setProperties(Hashtable), Component.attribsHash(), Component.store()

endRow

public java.lang.String endRow(int top)
Method endRow.

Returns:
String

betweenRows

public java.lang.String betweenRows()
Method betweenRows.

Returns:
String

endColumn

public java.lang.String endColumn(int top,
                                  int left,
                                  Visual comp)
Method endColumn.

Parameters:
top - The top index.
left - The left index.
comp - the Visual for wich this column is
Returns:
String

betweenColumns

public java.lang.String betweenColumns()
Method betweenColumns.

Returns:
String

startColumn

public java.lang.String startColumn(int top,
                                    int left,
                                    Visual comp)
Method startColumn.

Parameters:
top - The top index.
left - The left index.
comp - the Visual for wich this column is
Returns:
String

startRow

public java.lang.String startRow(int top)
Method startRow.

Returns:
String

startContainer

public java.lang.String startContainer()
Starts container's tag.
If the tag attribute is not null, assumes the default behavior:
< + tag + htmlAttributes + >

Returns:
String

endContainer

public java.lang.String endContainer()
Ends container's tag.
If the tag attribute is not null, assumes the default behavior:
< + tag + htmlAttributes + >

Returns:
String