BrightSide Workbench Full Report + Source Code
org.turro.elephant.impl.util.ScriptaculousAutoCompletionBuilder Class Reference
Collaboration diagram for org.turro.elephant.impl.util.ScriptaculousAutoCompletionBuilder:

Public Member Functions

 ScriptaculousAutoCompletionBuilder ()
 
void addItem (String value)
 
String toString ()
 

Protected Attributes

ArrayList items = new ArrayList()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 27 of file ScriptaculousAutoCompletionBuilder.java.

Constructor & Destructor Documentation

◆ ScriptaculousAutoCompletionBuilder()

org.turro.elephant.impl.util.ScriptaculousAutoCompletionBuilder.ScriptaculousAutoCompletionBuilder ( )

Creates a new instance of ScriptaculousAutoCompletionBuilder

Definition at line 31 of file ScriptaculousAutoCompletionBuilder.java.

31  {
32  }

Member Function Documentation

◆ addItem()

void org.turro.elephant.impl.util.ScriptaculousAutoCompletionBuilder.addItem ( String  value)

value represents an item for autocompletion. Items may have selectable parts, by default, and non selectable parts. Write non selectable parts between double ~, ex. <SAMPLE> This would be selected~~ while this will not~~

Definition at line 41 of file ScriptaculousAutoCompletionBuilder.java.

41  {
42  value = value.replaceAll("\\~\\~([^\\~]*)\\~\\~", "<span class=\"informal\">$1</span>");
43  value = value.replaceAll("href\\=", "xref=");
44  value = value.replaceAll("onclick\\=", "xnclick=");
45  items.add(value);
46  }

◆ toString()

String org.turro.elephant.impl.util.ScriptaculousAutoCompletionBuilder.toString ( )

Definition at line 49 of file ScriptaculousAutoCompletionBuilder.java.

49  {
50  StringBuffer sb = new StringBuffer();
51  sb.append("<ul>");
52  Iterator it = items.iterator();
53  while(it.hasNext()) {
54  sb.append("<li>" + it.next() + "</li>");
55  }
56  sb.append("</ul>");
57  return sb.toString();
58  }

Member Data Documentation

◆ items

ArrayList org.turro.elephant.impl.util.ScriptaculousAutoCompletionBuilder.items = new ArrayList()
protected

Definition at line 28 of file ScriptaculousAutoCompletionBuilder.java.


The documentation for this class was generated from the following file: