|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.html.XHtmlWidget
net.xoetrope.html.XImage
public class XImage
Draws an image
Copyright: Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt $Revision: 2.7 $
| Field Summary | |
|---|---|
protected netscape.javascript.JSObject |
obj
|
| Fields inherited from class net.xoetrope.html.XHtmlWidget |
|---|
currentProject, divElement, htmlDoc, imageElement, inputElement, labelElement, metaElement, olElement, selectElement, tableElement, textareaElement, ulElement |
| Constructor Summary | |
|---|---|
XImage()
Constructs a blank image control. |
|
XImage(org.w3c.dom.html.HTMLImageElement imageElement)
Create a new XImage based on an existing HTML edit field. |
|
XImage(java.lang.String src,
java.lang.String id)
Create a new XImage with an id and a src attribute |
|
| Method Summary | |
|---|---|
java.lang.String |
getAlign()
Get the align attribute of the XImage. |
java.lang.String |
getAttribute(java.lang.String attribName)
Get an attribute value |
java.lang.String |
getBorder()
Get the border of the image |
java.lang.String |
getFullSize()
Get the size of this image |
java.lang.String |
getHorizontalMargin()
Get the horizontal margin of the image |
org.w3c.dom.html.HTMLImageElement |
getHTMLElement()
Get the HTML element at which refers the XImage |
java.lang.String |
getImageName()
Gets the name of the image being displayed. |
java.lang.String |
getImageSrc()
Get the image src attribute |
java.lang.String |
getMargins()
Get the margins of the image. |
java.lang.String |
getVerticalMargin()
Set the vertical margin of the image |
void |
setAlign(java.lang.String align)
Set the align attribute of the XImage |
int |
setAttribute(java.lang.String attribName,
java.lang.Object attribValue)
Set one or more attributes of the component. |
void |
setBorder(int size)
Set the border of the image |
void |
setFullSize(int width,
int height)
Set the size of the image |
void |
setHorizontalMargin(int margin)
Set the horizontal margin of the image |
void |
setImage(java.awt.Image img)
Sets the image to display. |
void |
setImageName(java.lang.String name)
Set the name attribute of the XImage |
void |
setImageSrc(java.lang.String src)
Sets the image to display. |
void |
setMargins(int horizontalMargin,
int verticalMargin)
Set the margins of the image |
void |
setVerticalMargin(int margin)
Set the vertical margin of the image |
void |
setVisible(boolean visible)
Set the XImage visible or invisible. |
| Methods inherited from class net.xoetrope.html.XHtmlWidget |
|---|
addEvent, setObject, setObject, setObject, setObject, setObject, setObject, setObject, setObject, setObject, setObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected netscape.javascript.JSObject obj
| Constructor Detail |
|---|
public XImage()
public XImage(java.lang.String src,
java.lang.String id)
src - the path where to find the image to displayid - the id of the imagepublic XImage(org.w3c.dom.html.HTMLImageElement imageElement)
inputElement - the HTML img tag the XImage refers to| Method Detail |
|---|
public void setImageSrc(java.lang.String src)
img - the imagepublic java.lang.String getImageSrc()
public void setImageName(java.lang.String name)
name - the name of the imagepublic java.lang.String getImageName()
public java.lang.String getFullSize()
public void setFullSize(int width,
int height)
width - the width od the imageheight - the height of the image
public int setAttribute(java.lang.String attribName,
java.lang.Object attribValue)
setAttribute in interface XAttributedComponentattribName - the attribute nameattribValue - the attribute value
public java.lang.String getAttribute(java.lang.String attribName)
attribName - the attribute which value is requested
public void setMargins(int horizontalMargin,
int verticalMargin)
horizontalMargin - the horizontal marginverticalMargin - the vertical marginpublic java.lang.String getMargins()
public void setHorizontalMargin(int margin)
margin - the horizontal marginpublic java.lang.String getHorizontalMargin()
public void setVerticalMargin(int margin)
margin - the vertical marginpublic java.lang.String getVerticalMargin()
public void setAlign(java.lang.String align)
align - the alignment of the XImage (left, right, center, justified)public java.lang.String getAlign()
public void setBorder(int size)
size - the thickness of the border in pixelpublic java.lang.String getBorder()
public void setVisible(boolean visible)
visible - true if visible, false otherwisepublic org.w3c.dom.html.HTMLImageElement getHTMLElement()
public void setImage(java.awt.Image img)
setImage in interface XImageHolderimg - the image
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||