Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Server 5.1.0sp9 API Reference

## weblogic.html
Class AreaElement

    java.lang.Object
      |
      +--weblogic.html.HtmlElement
            |
            +--weblogic.html.ElementWithAttributes
                  |
                  +--weblogic.html.SinglePartElement
                        |
                        +--weblogic.html.AreaElement

public class AreaElement
extends SinglePartElement

This class supports Netscape client-side image maps. An AreaElement sets the coordinates of an area on an image used as a client-side image map. Construct a MapElement and set its mappings by adding AreaElements to it with the MapElement.addElement method.

Author:
  Copyright (c) 1996-97 by WebLogic, Inc. All Rights Reserved.
  Copyright © 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
  `MapElement`

Field Summary
`static java.lang.String` | `circle`
`static java.lang.String` | `polygon`
`static java.lang.String` | `rectangle`

Fields inherited from class weblogic.html.HtmlElement
`codeset, useObsolete`

Constructor Summary
`AreaElement()` Constructs an empty AreaElement.
`AreaElement(java.lang.Object shape, java.lang.String url)` Constructs an AreaElement with the specified java.awt.Rectangle or java.awt.Polygon and sets the HREF to the specified URL.
`AreaElement(java.lang.String shape, int[] coords, java.lang.String url)` Constructs an AreaElement of the specified shape, with the specified coordinates and the specified URL.
`AreaElement(java.lang.String shape, java.lang.String coords)` Constructs an AreaElement of the specified shape, with the specified coordinates, and sets the NOHREF attribute.
`AreaElement(java.lang.String shape, java.lang.String coords, java.lang.String url)` Constructs an AreaElement of the specified shape, with the specified coordinates, and sets the value for the HREF attribute to the specified URL.

Method Summary
`protected java.lang.String` | `getHtmlCode()`
`protected boolean` | `printBody()`
`protected boolean` | `printCR()`
`protected boolean` | `printEndingTag()`
`AreaElement` | `setAlt(java.lang.String text)` Sets alternate text for the URL if the image map cannot be displayed.
`AreaElement` | `setCoordinates(int[] coords)` Sets the coordinates for an AreaElement to an array of ints.
`AreaElement` | `setCoordinates(java.lang.String coords)` Sets the coordinates for an AreaElement.
`AreaElement` | `setHref()` Sets the HREF attribute for an AreaElement.
`AreaElement` | `setHref(java.lang.String url)` Sets the HREF attribute for an AreaElement.
`AreaElement` | `setShape(java.lang.String shape)` Sets the shape of an AreaElement.
`AreaElement` | `setShape(java.lang.String shape, int[] coords)` Constructs an AreaElement of the specified shape and sets its coordinates to the specified array of ints.
`AreaElement` | `setTabindex(int tabindex)` Sets the tabbing order for an AreaElement, which defines the order in which page elements get the focus when a user navigates the page with a keyboard.
`AreaElement` | `setTabindex(java.lang.String tabindex)` Sets the TABINDEX attribute for an AreaElement.
`AreaElement` | `setTarget(java.lang.String target)` Sets the TARGET attribute for an AreaElement to the specified string.
`AreaElement` | `setTarget(WindowName target)` Sets the TARGET attribute for an AreaElement to the specified WindowName.

Methods inherited from class weblogic.html.SinglePartElement
`getElement, printBody, printBody, printBody, setElement, setElement, widthAsLiteral`

Methods inherited from class weblogic.html.ElementWithAttributes
`addAttribute, addAttribute, escapeQuotes, getBooleanAttribute, getElementAttribute, getLocalVar, getQuotedAttribute, output, output, output, setBooleanAttribute, setBooleanAttribute, setClass, setDirection, setElementAttribute, setElementAttribute, setElementAttribute, setElementAttribute, setElementAttribute, setId, setLang, setLocalVar, setQuotedAttribute, setStyle`

Methods inherited from class weblogic.html.HtmlElement
`asAnchorElement, asBigElement, asBlockquoteElement, asBoldElement, asCenteredElement, asCiteElement, asCodeElement, asCommentElement, asDefineTermElement, asEmphasisElement, asFontElement, asFontElement, asFontElement, asHtmlContainer, asItalicElement, asKeyboardElement, asLiteralElement, asParagraphElement, asSampleElement, asSmallElement, asStrikeElement, asStrongElement, asSubscriptElement, asSuperscriptElement, asTeletypeElement, asUnderlineElement, asVariableElement, getVersion, setAnchorMode, setCodeset, toString, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### rectangle

    public static final java.lang.String rectangle

### circle

    public static final java.lang.String circle

### polygon

    public static final java.lang.String polygon

Constructor Detail

### AreaElement

    public AreaElement()

  Constructs an empty AreaElement.

### AreaElement

    public AreaElement(java.lang.Object shape,
                       java.lang.String url)

  Constructs an AreaElement with the specified java.awt.Rectangle or java.awt.Polygon and sets the HREF to the specified URL. Passing a null value for the argument "url" sets the NOHREF attribute.

  Parameters:
    `shape` - java.awt.Rectangle or java.awt.Polygon
    `url` - URL for the area map

### AreaElement

    public AreaElement(java.lang.String shape,
                       java.lang.String coords,
                       java.lang.String url)

  Constructs an AreaElement of the specified shape, with the specified coordinates, and sets the value for the HREF attribute to the specified URL. Passing a null value for the argument "url" sets the NOHREF attribute. A NOHREF attribute indicates that a click in the region mapped by the coordinates should perform no action.

  Coordinates vary for each shape. The shapes are described by the following ordered coordinates:

  - Rectangle: leftX, topY, rightX, bottomY
  - Polygon: X1,Y1, X2,Y2, X3,Y3
  - Circle: centerX, centerY, radiusX
  If x and y values are given as a percentage, the values should be interpreted as percentages of the image's width and height respectively. For example, here are coordinates that describe half a rectangle's width and all of its height:

        "0, 0, 50%, 100%"

  Parameters:
    `shape` - Constant in this class for shape
    `coords` - Map coordinates
    `url` - URL for the area map

### AreaElement

    public AreaElement(java.lang.String shape,
                       java.lang.String coords)

  Constructs an AreaElement of the specified shape, with the specified coordinates, and sets the NOHREF attribute.

  Coordinates vary for each shape. The shapes are described by the following ordered coordinates:

  - Rectangle: leftX, topY, rightX, bottomY
  - Polygon: X1,Y1, X2,Y2, X3,Y3
  - Circle: centerX, centerY, radiusX
  If x and y values are given as a percentage, the values should be interpreted as percentages of the image's width and height respectively. For example, here are coordinates that describe half a rectangle's width and all of its height:

        "0, 0, 50%, 100%"

  Parameters:
    `shape` - Constant in this class for shape
    `coords` - Map coordinates

### AreaElement

    public AreaElement(java.lang.String shape,
                       int[] coords,
                       java.lang.String url)

  Constructs an AreaElement of the specified shape, with the specified coordinates and the specified URL.

  Coordinates vary for each shape. The shapes are described by the following ordered coordinates:

  - Rectangle: leftX, topY, rightX, bottomY
  - Polygon: X1,Y1, X2,Y2, X3,Y3
  - Circle: centerX, centerY, radiusX
  If x and y values are given as a percentage, the values should be interpreted as percentages of the image's width and height respectively. For example, here are coordinates that describe half a rectangle's width and all of its height:

        "0, 0, 50%, 100%"

  Parameters:
    `shape` - Constant in this class for shape
    `coords` - Map coordinates

Method Detail

### getHtmlCode

    protected java.lang.String getHtmlCode()

  Overrides:
    getHtmlCode in class ElementWithAttributes

### printEndingTag

    protected boolean printEndingTag()

  Overrides:
    printEndingTag in class ElementWithAttributes

### printCR

    protected boolean printCR()

  Overrides:
    printCR in class ElementWithAttributes

### printBody

    protected boolean printBody()

  Overrides:
    printBody in class ElementWithAttributes

### setShape

    public AreaElement setShape(java.lang.String shape,
                                int[] coords)

  Constructs an AreaElement of the specified shape and sets its coordinates to the specified array of ints. The shapes are described by the following ordered coordinates:
  - Rectangle: leftX, topY, rightX, bottomY
  - Polygon: X1,Y1, X2,Y2, X3,Y3
  - Circle: centerX, centerY, radiusX

  Parameters:
    `shape` - Constant in this class for shape
    `coords` - Array of ints
  Returns:
    AreaElement

### setCoordinates

    public AreaElement setCoordinates(int[] coords)

  Sets the coordinates for an AreaElement to an array of ints.

  Parameters:
    `coords` - Coordinates
  Returns:
    AreaElement

### setShape

    public AreaElement setShape(java.lang.String shape)

  Sets the shape of an AreaElement.

  Parameters:
    `shape` - Constant in this class for shape
  Returns:
    AreaElement

### setCoordinates

    public AreaElement setCoordinates(java.lang.String coords)

  Sets the coordinates for an AreaElement.

  Parameters:
    `coords` - Map coordinates
  Returns:
    AreaElement

### setHref

    public AreaElement setHref(java.lang.String url)

  Sets the HREF attribute for an AreaElement. Using an empty string as an argument to this method sets the NOHREF attribute for an AreaElement.

  Parameters:
    `url` - Value for the HREF attribute
  Returns:
    AreaElement object

### setHref

    public AreaElement setHref()

  Sets the HREF attribute for an AreaElement. Using an empty string as an argument to this method sets the NOHREF attribute for an AreaElement.

  Parameters:
    `url` - Value for the HREF attribute
  Returns:
    AreaElement object

### setTabindex

    public AreaElement setTabindex(java.lang.String tabindex)

  Sets the TABINDEX attribute for an AreaElement. The tabindex attribute determines the tabbing order of selectable or clickable elements on a page.

  Parameters:
    `tabindex` - Index
  Returns:
    AnchorElement object

### setTabindex

    public AreaElement setTabindex(int tabindex)

  Sets the tabbing order for an AreaElement, which defines the order in which page elements get the focus when a user navigates the page with a keyboard. This may be a positive or negative integer. Elements that are assigned the same tab index will be navigated in order of appearance on the page.

  Parameters:
    `tabindex` - int
  Returns:
    AreaElement

### setTarget

    public AreaElement setTarget(WindowName target)

  Sets the TARGET attribute for an AreaElement to the specified WindowName. WindowName allows for use of magic window names as targets.

  Parameters:
    `target` - WindowName object
  Returns:
    AreaElement object

### setTarget

    public AreaElement setTarget(java.lang.String target)

  Sets the TARGET attribute for an AreaElement to the specified string.

  Parameters:
    `target` - String name of the target window
  Returns:
    AreaElement object

### setAlt

    public AreaElement setAlt(java.lang.String text)

  Sets alternate text for the URL if the image map cannot be displayed.

  Parameters:
    `text` - Alternate text
  Returns:
    AreaElement

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://www.weblogic.com/docs51
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD