Class browser.Tag
All Packages Class Hierarchy This Package Previous Next Index
Class browser.Tag
java.lang.Object
|
+----browser.Tag
- public class Tag
- extends Object
-
Tag(String)
- Create a Tag object from a string.
-
decStrToInt(String)
- Converts a string to a non-negative integer.
-
getColorParam(String)
- Read value of the parameter as Color.
-
getIntParam(String)
- Read value of the parameter as a decimal integer
-
getStringParam(String)
- Read value of the parameter as a string and convert it to upper case.
-
getStringParam(String, boolean)
- Read value of the parameter as a string
-
getTargetParam(String)
- Read value of the parameter as a target name.
-
getURLParam(String)
- Read value of the parameter as URL name.
-
getValue()
- Get name of the HTML tag.
-
hexStrToInt(String)
- Converts a string to a non-negative integer.
-
isParam(String)
- Check if the tag has the specified parameter
Tag
public Tag(String tag_str)
- Create a Tag object from a string.
The string should contain an HTML tag.
- Parameters:
- tag_str - The string with the tag.
getValue
public String getValue()
- Get name of the HTML tag.
- Returns:
- Tag name.
isParam
public boolean isParam(String param)
- Check if the tag has the specified parameter
- Parameters:
- param - Parameter name
- Returns:
- true if such parameter exists, false otherwise.
getURLParam
public String getURLParam(String param)
- Read value of the parameter as URL name.
- Parameters:
- param - Parameter name.
- Returns:
- URL name or null.
getTargetParam
public String getTargetParam(String param)
- Read value of the parameter as a target name.
- Parameters:
- param - Parameter name.
- Returns:
- target name or null.
getColorParam
public Color getColorParam(String param)
- Read value of the parameter as Color.
- Parameters:
- param - Parameter name.
- Returns:
- Color.
getIntParam
public int getIntParam(String param)
- Read value of the parameter as a decimal integer
- Parameters:
- param - Parameter name.
- Returns:
- The integer ot -1
getStringParam
public String getStringParam(String param)
- Read value of the parameter as a string and convert it to upper case.
- Parameters:
- param - Parameter name.
- Returns:
- String value in upper case.
getStringParam
public String getStringParam(String param,
boolean to_upper)
- Read value of the parameter as a string
- Parameters:
- param - Parameter name.
- to_upper - If true the resulting string is converted to upper case,
if false it is returned as is.
- Returns:
- String value.
decStrToInt
public static int decStrToInt(String str)
- Converts a string to a non-negative integer.
- Parameters:
- str - String containing a decimal number.
- Returns:
- Non-negative integer value or -1 if the conversion is
not possible.
hexStrToInt
public static int hexStrToInt(String str)
- Converts a string to a non-negative integer.
- Parameters:
- str - String containing a hex number.
- Returns:
- Non-negative integer value or -1 if the conversion is
not possible.
All Packages Class Hierarchy This Package Previous Next Index