Copyright 2002 by aragost

com.aragost.araspect
Class HtmlUtils

java.lang.Object
  |
  +--com.aragost.araspect.HtmlUtils

public class HtmlUtils
extends java.lang.Object


Constructor Summary
HtmlUtils(Inspector inspector)
          Creates a new HtmlUtils object.
 
Method Summary
 Element createBooleanEditElement(Path path, PathElement elm, boolean withNull)
          Create an HTML element to edit a Boolean or boolean field
 Element createEditElement(Path path, PathElement elm, boolean withNull)
          Create an HTML element to edit a field
 Element createExecuteButton(Path path, PathElement elm)
           
 Link createOmniDocLink(java.lang.Class type, java.lang.String label)
          Create a link element that links to omnidoc
 Link createOmniDocLink(java.lang.Object obj, java.lang.Class type)
          Create a link element that links to omnidoc
 CellHeader createRowHeader(Path path, TableEntry entry, int modifierMask)
          Create a CellHeader that is meant to be the label of the row represented by the specified TableEntry.
 Table createSubHeaderedTable(java.lang.String mainTitle, java.lang.String[] subTitles, java.util.List entries, Path path, int modifierMask)
           
 Table createTable(java.lang.String mainTitle, java.lang.String[] subTitles, java.util.List entries, Path path, int modifierMask)
           
 Table createTable(java.lang.String title, java.lang.String[] subTitles, java.util.Map map, Path path, MapEvaluator evaluator)
          Create a table with values from a Map
 Inspector getInspector()
          Gets the inspector.
 Element pathElement(Path path)
          Create an html Element to represent the current path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlUtils

public HtmlUtils(Inspector inspector)
Creates a new HtmlUtils object.

Parameters:
inspector - The inspector for this util object
Method Detail

createEditElement

public Element createEditElement(Path path,
                                 PathElement elm,
                                 boolean withNull)
Create an HTML element to edit a field

Parameters:
path - The path to the containing object
elm - The element corresponding to the field
withNull - Can it be set to null?
Returns:
a HTML element to edit the field

createBooleanEditElement

public Element createBooleanEditElement(Path path,
                                        PathElement elm,
                                        boolean withNull)
Create an HTML element to edit a Boolean or boolean field

Parameters:
path - The path to the containing object
elm - The element corresponding to the field
withNull - Can it be set to null?
Returns:
a HTML element to edit the field

createTable

public Table createTable(java.lang.String title,
                         java.lang.String[] subTitles,
                         java.util.Map map,
                         Path path,
                         MapEvaluator evaluator)
Create a table with values from a Map

Parameters:
title - The title of the table
map - The map
path - Path that will evaluate to the map
Returns:
a com.aragost.html.Table

createExecuteButton

public Element createExecuteButton(Path path,
                                   PathElement elm)

createRowHeader

public CellHeader createRowHeader(Path path,
                                  TableEntry entry,
                                  int modifierMask)
Create a CellHeader that is meant to be the label of the row represented by the specified TableEntry. The CellHeader might or might not contain a Link, it depends if the value is null, or if the type is a primitive type.


createOmniDocLink

public Link createOmniDocLink(java.lang.Object obj,
                              java.lang.Class type)
Create a link element that links to omnidoc


createOmniDocLink

public Link createOmniDocLink(java.lang.Class type,
                              java.lang.String label)
Create a link element that links to omnidoc


createSubHeaderedTable

public Table createSubHeaderedTable(java.lang.String mainTitle,
                                    java.lang.String[] subTitles,
                                    java.util.List entries,
                                    Path path,
                                    int modifierMask)

createTable

public Table createTable(java.lang.String mainTitle,
                         java.lang.String[] subTitles,
                         java.util.List entries,
                         Path path,
                         int modifierMask)

pathElement

public Element pathElement(Path path)
Create an html Element to represent the current path. Each element in the path is a link to inspect that value.


getInspector

public Inspector getInspector()
Gets the inspector.

Returns:
Returns a Inspector

Copyright 2002 by aragost