com.ibm.as400.util.html
Class HTMLMeta
- java.lang.Object
-
- com.ibm.as400.util.html.HTMLTagAttributes
-
- com.ibm.as400.util.html.HTMLMeta
-
- All Implemented Interfaces:
- HTMLTagElement, java.io.Serializable
public class HTMLMeta extends HTMLTagAttributes implements java.io.Serializable
The HTMLMeta class represents meta-information used within an HTMLHead tag. This meta information can be used in identifying, indexing, and defining information within the HTML document.This example creates an HTMLMeta tag:
// Create an HTMLMeta. HTMLMeta meta = new HTMLMeta("Expires", "Mon, 01 Jun 2000 12:00:00 CST"); System.out.println(header);
Here is the output of the HTMLMeta tag:
<meta http-equiv="Expires" content="Mon, 01 Jun 2000 12:00:00 CST" />
HTMLMeta objects generate the following events:
- PropertyChangeEvent
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description HTMLMeta()
Constructs a default HTMLMeta object.HTMLMeta(java.lang.String HttpEquiv, java.lang.String content)
Constructs an HTMLMeta object with the specified meta HTTP-EQUIV and content.HTMLMeta(java.lang.String HttpEquiv, java.lang.String content, java.lang.String url)
Constructs an HTMLMeta object with the specified meta HTTP-EQUIV, content, and URL.
-
Method Summary
Methods Modifier and Type Method and Description java.lang.String
getContent()
Returns the content of the HTMLMeta tag.java.lang.String
getDirection()
Returns the direction of the text interpretation.java.lang.String
getFOTag()
Returns a comment tag.java.lang.String
getHttpEquiv()
Returns the HTTP-EQUIV of the meta tag.java.lang.String
getLanguage()
Returns the language of the meta tag.java.lang.String
getName()
Returns the name of the meta tag.java.lang.String
getTag()
Returns the tag for the HTML heading.java.lang.String
getUrl()
Returns the URL of the meta tag.void
setContent(java.lang.String content)
Sets the content of the meta information.void
setDirection(java.lang.String dir)
Sets the direction of the text interpretation.void
setHttpEquiv(java.lang.String HttpEquiv)
Sets the HTTP-EQUIV of the meta tag.void
setLanguage(java.lang.String lang)
Sets the language of the meta tag.void
setName(java.lang.String name)
Sets the name of the meta tag.void
setUrl(java.lang.String url)
Sets the URL to reload after the time specified in the content attribute.java.lang.String
toString()
Returns a String representation for the HTMLMeta tag.-
Methods inherited from class com.ibm.as400.util.html.HTMLTagAttributes
addPropertyChangeListener, getAttributes, getAttributeString, removePropertyChangeListener, setAttributes
-
-
-
-
Constructor Detail
-
HTMLMeta
public HTMLMeta()
Constructs a default HTMLMeta object.
-
HTMLMeta
public HTMLMeta(java.lang.String HttpEquiv, java.lang.String content)
Constructs an HTMLMeta object with the specified meta HTTP-EQUIV and content.- Parameters:
HttpEquiv
- The HTTP-EQUIV meta information.content
- The value of a named property.
-
HTMLMeta
public HTMLMeta(java.lang.String HttpEquiv, java.lang.String content, java.lang.String url)
Constructs an HTMLMeta object with the specified meta HTTP-EQUIV, content, and URL.- Parameters:
HttpEquiv
- The HTTP-EQUIV meta information.content
- The value of a named property.url
- The URL to reload after the time specified in the content attribute.
-
-
Method Detail
-
getContent
public java.lang.String getContent()
Returns the content of the HTMLMeta tag.- Returns:
- The value of a named property.
-
getDirection
public java.lang.String getDirection()
Returns the direction of the text interpretation.- Returns:
- The direction of the text.
-
getHttpEquiv
public java.lang.String getHttpEquiv()
Returns the HTTP-EQUIV of the meta tag.- Returns:
- The HTTP-EQUIV meta information.
-
getLanguage
public java.lang.String getLanguage()
Returns the language of the meta tag.- Returns:
- The language of the meta tag.
-
getName
public java.lang.String getName()
Returns the name of the meta tag.- Returns:
- The name of a property.
-
getUrl
public java.lang.String getUrl()
Returns the URL of the meta tag.- Returns:
- The URL to reload.
-
getTag
public java.lang.String getTag()
Returns the tag for the HTML heading.- Specified by:
getTag
in interfaceHTMLTagElement
- Returns:
- The tag.
-
getFOTag
public java.lang.String getFOTag()
Returns a comment tag. This method should not be called. There is no XSL-FO support for this class.- Specified by:
getFOTag
in interfaceHTMLTagElement
- Returns:
- The comment tag.
-
setContent
public void setContent(java.lang.String content)
Sets the content of the meta information.- Parameters:
content
- The value for a named property.
-
setDirection
public void setDirection(java.lang.String dir)
Sets the direction of the text interpretation.- Parameters:
dir
- The direction. One of the following constants defined in HTMLConstants: LTR or RTL.- See Also:
HTMLConstants
-
setHttpEquiv
public void setHttpEquiv(java.lang.String HttpEquiv)
Sets the HTTP-EQUIV of the meta tag.- Parameters:
HttpEquiv
- The HTTP-EQUIV meta information.
-
setLanguage
public void setLanguage(java.lang.String lang)
Sets the language of the meta tag.- Parameters:
lang
- The language. Example language tags include: en and en-US.
-
setName
public void setName(java.lang.String name)
Sets the name of the meta tag. If the name is not set, it is assumed to be the same as the value of the HTTP-EQUIV.- Parameters:
name
- The name of a property.
-
setUrl
public void setUrl(java.lang.String url)
Sets the URL to reload after the time specified in the content attribute.- Parameters:
url
- The URL to reload.
-
toString
public java.lang.String toString()
Returns a String representation for the HTMLMeta tag.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The tag.
-
-