    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class w3c.jigsaw.auth.IPTemplatesField

    java.lang.Object
       |
       +----w3c.jigsaw.forms.FormField
               |
               +----w3c.jigsaw.auth.IPTemplatesField

public class IPTemplatesField
extends FormField

A form field to edit a list pf IP templates. This field allows you to edit a series of IP templates as a list (in the form sense of a list) of ip templates.

Each IP templates is made of a dot separated list of four byte values, some of them possibly being stars (to denote that any values for the remaining bytes will be accepted).

##

IPTemplatesField()
IPTemplatesField(String, String, String, short[][])

##

computeString(short[][])
dump(HtmlGenerator)
  Dump this fieldas a form element.
getValue()
  Get this field's value.
initialize(String, String, String, Object)
parseIPTemplate(String)
  Parse the given string as an IP template, and add into.
parseString(String)
  Parse the array of strings into an array of ip templates.
setValue(String)
  Set this field value to the given string format IP template address.

##

IPTemplatesField

     public IPTemplatesField(String name,
                             String title,
                             String url,
                             short ip[][])

IPTemplatesField

     public IPTemplatesField()

##

parseIPTemplate

     protected short[] parseIPTemplate(String str) throws FormFieldException

  Parse the given string as an IP template, and add into.

  Parameters:
    str - The string to parse.
    into - The vector to put the result to.
  Throws: FormFieldException
    If we weren't able to parse the string.

parseString

     protected short[][] parseString(String str) throws FormFieldException

  Parse the array of strings into an array of ip templates.

  Parameters:
    str - The string to parse.
  Throws: FormFieldException
    If the value can't be parsed properly.

computeString

     protected String computeString(short ip[][])

getValue

     public Object getValue()

  Get this field's value.

  Returns:
    An array of array of shorts or null.
  Overrides:
    getValue in class FormField

setValue

     public boolean setValue(String nval) throws FormFieldException

  Set this field value to the given string format IP template address.

  Parameters:
    nval - The new string value.
  Overrides:
    setValue in class FormField

dump

     public void dump(HtmlGenerator into)

  Dump this fieldas a form element.

  Parameters:
    into - The HtmlGenerator to dump the field to.
  Overrides:
    dump in class FormField

initialize

     public void initialize(String name,
                            String title,
                            String url,
                            Object value) throws FormFieldException

  Overrides:
    initialize in class FormField

    All Packages  Class Hierarchy  This Package  Previous  Next  Index