public class ImageAttributes extends Attributes
Modifier and Type | Class and Description |
---|---|
static class |
ImageAttributes.Align |
Constructor and Description |
---|
ImageAttributes() |
Modifier and Type | Method and Description |
---|---|
ImageAttributes.Align |
getAlign() |
java.lang.String |
getAlt() |
int |
getBorder() |
int |
getHeight() |
int |
getWidth() |
boolean |
isHeightPercentage()
Tells you whether the value returned from
getHeight() is the height as a percentage or in pixels. |
boolean |
isWidthPercentage()
Tells you whether the value returned from
getWidth() is the width as a percentage or in pixels. |
void |
setAlign(ImageAttributes.Align align) |
void |
setAlt(java.lang.String alt) |
void |
setBorder(int border) |
void |
setHeight(int height) |
void |
setHeightPercentage(boolean heightPercentage)
Sets whether the value passed into
setHeight(int) should be treated as a percentage or as a number of
pixels. |
void |
setWidth(int width) |
void |
setWidthPercentage(boolean widthPercentage)
Sets whether the value passed into
setWidth(int) should be treated as a percentage or as a number of
pixels. |
appendCssClass, appendCssStyle, clone, getCssClass, getCssStyle, getId, getLanguage, getTitle, setCssClass, setCssStyle, setId, setLanguage, setTitle
public java.lang.String getAlt()
public void setAlt(java.lang.String alt)
public int getWidth()
public void setWidth(int width)
public int getHeight()
public void setHeight(int height)
public int getBorder()
public void setBorder(int border)
public ImageAttributes.Align getAlign()
public void setAlign(ImageAttributes.Align align)
public void setWidthPercentage(boolean widthPercentage)
setWidth(int)
should be treated as a percentage or as a number of
pixels. The default is false (pixels) to maintain backwards compatibility.widthPercentage
- pass true if the width is specified as a percentage, false if the width is specified in pixelspublic boolean isWidthPercentage()
getWidth()
is the width as a percentage or in pixels.public void setHeightPercentage(boolean heightPercentage)
setHeight(int)
should be treated as a percentage or as a number of
pixels. The default is false (pixels) to maintain backwards compatibility.heightPercentage
- pass true if the height is specified as a percentage, false if the height is specified in pixelspublic boolean isHeightPercentage()
getHeight()
is the height as a percentage or in pixels.Copyright © 2007, 2013 David Green and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html