net.xoetrope.html
Class XList

java.lang.Object
  extended by net.xoetrope.html.XHtmlWidget
      extended by net.xoetrope.html.XList

public class XList
extends XHtmlWidget

A wrapper for the AWT List class

Copyright (c) Xoetrope Ltd., 1998-2004
License: see license.txt


Field Summary
protected  netscape.javascript.JSObject obj
           
 
Fields inherited from class net.xoetrope.html.XHtmlWidget
currentProject, divElement, htmlDoc, imageElement, inputElement, labelElement, metaElement, olElement, selectElement, tableElement, textareaElement, ulElement
 
Constructor Summary
XList(boolean ordered)
          Create a new list component
XList(boolean ordered, java.lang.String id, java.lang.String[] elements)
          Create a new XList with an id and filled with elements
XList(org.w3c.dom.html.HTMLOListElement olElement)
          Create a new ordered XList based on an existing HTML ordered list.
XList(org.w3c.dom.html.HTMLUListElement ulElement)
          Create a new unordered XList based on an existing HTML unordered list.
 
Method Summary
 void oAddElement(java.lang.String text)
          Add a new element at the end of an ordered list
 java.lang.String oGetElementAt(int index)
          Get an element from the list
 java.lang.String oGetFontColor()
          Get the font color of the XList's elements.
 int oGetFontSize()
          Get the size of the XList's elements.
 org.w3c.dom.html.HTMLOListElement oGetHTMLElement()
          Get the HTML element at which refers the XList.
 java.lang.String oGetNumberType()
          Get the numbering type of the list
 int oGetSize()
          Get the number of elements in the list
 int oGetStartPoint()
          Get the start point of the list
 void oInsertElement(java.lang.String text, int index)
          Insert an item into an ordered list.
 void oRemoveElement()
          Remove the last element of the current ordered list
 void oRemoveElement(int index)
          Remove the element at the index given in argument in the current ordered list
 void oSetFontColor(java.lang.String hexColor)
          Set the font color of the XList's elements.
 void oSetFontSize(int fontsize)
          Set the size of the XList's elements.
 void oSetNumberType(java.lang.String type)
          Set the numbering type of the list
 void oSetStartPoint(int start)
          Set the start point of the list
 void oSetText(java.lang.String text, int index)
          Replace the value of the list item at the specified index.
 void oSetVisible(boolean visible)
          Set the XList visible or invisible.
 void uAddElement(java.lang.String text)
          Add a new element at the end of an unordered list
 java.lang.String uGetBulletType()
          Get the bullet type
 java.lang.String uGetElementAt(int index)
          Get an element from the list
 java.lang.String uGetFontColor()
          Get the font color of the XList's elements.
 int uGetFontSize()
          Get the size of the XList's elements.
 org.w3c.dom.html.HTMLUListElement uGetHTMLElement()
          Get the HTML element at which refers the XList.
 int uGetSize()
          Get the number of elements in the list
 void uInsertElement(java.lang.String text, int index)
          Insert an item into an unordered list.
 void uRemoveElement()
          Remove the last element of the current unordered list
 void uRemoveElement(int index)
          Remove the element at the index given in argument in the current unordered list
 void uSetBulletType(java.lang.String type)
          Set the bullet type
 void uSetFontColor(java.lang.String hexColor)
          Set the font color of the XList's elements.
 void uSetFontSize(int fontsize)
          Set the size of the XList's elements.
 void uSetText(java.lang.String text, int index)
          Replace the value of the list item at the specified index.
 void uSetVisible(boolean visible)
          Set the XList visible or invisible.
 
Methods inherited from class net.xoetrope.html.XHtmlWidget
addEvent, setObject, setObject, setObject, setObject, setObject, setObject, setObject, setObject, setObject, setObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

obj

protected netscape.javascript.JSObject obj
Constructor Detail

XList

public XList(boolean ordered)
Create a new list component

Parameters:
ordered - true if the list ordered, false otherwise

XList

public XList(boolean ordered,
             java.lang.String id,
             java.lang.String[] elements)
Create a new XList with an id and filled with elements

Parameters:
ordered - true if the list ordered, false otherwise
id - the id of the list
elements - the elements of the list

XList

public XList(org.w3c.dom.html.HTMLOListElement olElement)
Create a new ordered XList based on an existing HTML ordered list.

Parameters:
olElement - the HTML ol tag the XList refers to

XList

public XList(org.w3c.dom.html.HTMLUListElement ulElement)
Create a new unordered XList based on an existing HTML unordered list.

Parameters:
ulElement - the HTML ul tag the XList refers to
Method Detail

oAddElement

public void oAddElement(java.lang.String text)
Add a new element at the end of an ordered list

Parameters:
text - the element to add

oRemoveElement

public void oRemoveElement()
Remove the last element of the current ordered list


oRemoveElement

public void oRemoveElement(int index)
Remove the element at the index given in argument in the current ordered list

Parameters:
index - the index of the element to remove (starting at 1)

oSetText

public void oSetText(java.lang.String text,
                     int index)
Replace the value of the list item at the specified index. If there is no item at this index, add the item at the end of the list.

Parameters:
text - the value of the list item
index - the place you want the item to be inserted

oInsertElement

public void oInsertElement(java.lang.String text,
                           int index)
Insert an item into an ordered list.

Parameters:
text - the value of the list item
index - the place the item is to be inserted

oGetElementAt

public java.lang.String oGetElementAt(int index)
Get an element from the list

Parameters:
index - the index of the element to get (starting at 1)

oGetSize

public int oGetSize()
Get the number of elements in the list

Returns:
the size of the list

oGetStartPoint

public int oGetStartPoint()
Get the start point of the list

Returns:
the start number

oSetStartPoint

public void oSetStartPoint(int start)
Set the start point of the list

Parameters:
start - the start number

oGetNumberType

public java.lang.String oGetNumberType()
Get the numbering type of the list

Returns:
the numbering type (1, i, I)

oSetNumberType

public void oSetNumberType(java.lang.String type)
Set the numbering type of the list

Parameters:
type - the numbering type (1, i, I)

oGetFontSize

public int oGetFontSize()
Get the size of the XList's elements.

Returns:
the int value of the font size

oSetFontSize

public void oSetFontSize(int fontsize)
Set the size of the XList's elements.

Parameters:
fontsize - the int value of the font size

oGetFontColor

public java.lang.String oGetFontColor()
Get the font color of the XList's elements.

Returns:
the hexadecimal value of the font color

oSetFontColor

public void oSetFontColor(java.lang.String hexColor)
Set the font color of the XList's elements.


oSetVisible

public void oSetVisible(boolean visible)
Set the XList visible or invisible.

Parameters:
visible - true if visible, false otherwise

oGetHTMLElement

public org.w3c.dom.html.HTMLOListElement oGetHTMLElement()
Get the HTML element at which refers the XList.

Returns:
the HTML element.

uAddElement

public void uAddElement(java.lang.String text)
Add a new element at the end of an unordered list

Parameters:
text - the element to add

uRemoveElement

public void uRemoveElement()
Remove the last element of the current unordered list


uRemoveElement

public void uRemoveElement(int index)
Remove the element at the index given in argument in the current unordered list

Parameters:
index - the index of the element to remove (starting at 1)

uSetText

public void uSetText(java.lang.String text,
                     int index)
Replace the value of the list item at the specified index. If there is no item at this index, add the item at the end of the list.

Parameters:
text - the value of the list item
index - the place you want the item to be inserted

uInsertElement

public void uInsertElement(java.lang.String text,
                           int index)
Insert an item into an unordered list.

Parameters:
text - the value of the list item
index - the place you want the item to be inserted

uGetElementAt

public java.lang.String uGetElementAt(int index)
Get an element from the list

Parameters:
index - the index of the element to get (starting at 1)

uGetBulletType

public java.lang.String uGetBulletType()
Get the bullet type

Returns:
the bullet type (circle, diamond, disc, square)

uSetBulletType

public void uSetBulletType(java.lang.String type)
Set the bullet type

Parameters:
type - the bullet type (circle, diamond, disc, square)

uGetSize

public int uGetSize()
Get the number of elements in the list

Returns:
the size of the list

uGetFontSize

public int uGetFontSize()
Get the size of the XList's elements.

Returns:
the int value of the font size

uSetFontSize

public void uSetFontSize(int fontsize)
Set the size of the XList's elements.

Parameters:
fontsize - the int value of the font size

uGetFontColor

public java.lang.String uGetFontColor()
Get the font color of the XList's elements.

Returns:
the hexadecimal value of the font color

uSetFontColor

public void uSetFontColor(java.lang.String hexColor)
Set the font color of the XList's elements.

Parameters:
hexColor - the hexadecimal value of the font color

uSetVisible

public void uSetVisible(boolean visible)
Set the XList visible or invisible.

Parameters:
visible - true if visible, false otherwise

uGetHTMLElement

public org.w3c.dom.html.HTMLUListElement uGetHTMLElement()
Get the HTML element at which refers the XList.

Returns:
the HTML element.