SimpleServlets v5.5.0

com.simpleservlets.htmlobjects
Class HTMLHorizontalRule

java.lang.Object
  extended by com.simpleservlets.htmlobjects.GenericHTMLElement
      extended by com.simpleservlets.htmlobjects.HTMLHorizontalRule
All Implemented Interfaces:
HTMLElement, MustMinimizeEmpty, NoChildrenAllowed

public class HTMLHorizontalRule
extends GenericHTMLElement
implements HTMLElement, MustMinimizeEmpty, NoChildrenAllowed

Horizonal line, <hr> tag.

Author:
Paul Hyde

Field Summary
 
Fields inherited from interface com.simpleservlets.htmlobjects.HTMLElement
ZERO_LEN_ARRAY
 
Constructor Summary
HTMLHorizontalRule()
          Defaults to no width and no alignment being specified.
HTMLHorizontalRule(int widthPercent)
          Defaults to center alignment.
HTMLHorizontalRule(int widthPercent, AnchorPoint alignment)
           
 
Method Summary
 void setAnchorPoint(AnchorPoint alignment)
          Sets the align attribute to the specified position.
 void setWidthPercent(int widthPercent)
          Sets the width attribute to the specified percentage.
 
Methods inherited from class com.simpleservlets.htmlobjects.GenericHTMLElement
add, add, addSibling, addSibling, getAttributes, getChildren, getName, getParent, hasAttributes, hasChildren, isSafeToWrapWithWhitespace, removeAllAttributes, removeAllChildren, removeAttribute, removeChild, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeGroup, setParent, setSafeToWrapWithWhitespace, setStyle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.simpleservlets.htmlobjects.HTMLElement
add, add, addSibling, addSibling, getAttributes, getChildren, getName, getParent, hasAttributes, hasChildren, isSafeToWrapWithWhitespace, removeAllAttributes, removeAllChildren, removeAttribute, removeChild, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeGroup, setParent, setStyle
 

Constructor Detail

HTMLHorizontalRule

public HTMLHorizontalRule(int widthPercent,
                          AnchorPoint alignment)

HTMLHorizontalRule

public HTMLHorizontalRule(int widthPercent)
Defaults to center alignment.


HTMLHorizontalRule

public HTMLHorizontalRule()
Defaults to no width and no alignment being specified.

Method Detail

setWidthPercent

public void setWidthPercent(int widthPercent)
Sets the width attribute to the specified percentage. The result looks like: width="75%" if 75 is passed in.

Parameters:
widthPercent - percent to use, if 0, width attribute is cleared.

setAnchorPoint

public void setAnchorPoint(AnchorPoint alignment)
Sets the align attribute to the specified position. All "wests" end up being "left". All "easts" end up being "right". Others end up being "center".

Parameters:
alignment - to use, if null, align attribute is cleared.

SimpleServlets v5.5.0

Copyright © 2001-2007 Programix Incorporated. All rights reserved. SimpleServlets is free and is OSI Certified Open Source Software under the BSD license.