Methods Summary |
---|
public java.lang.String | getBackgroundColor()
return this.getAttribute(BACKGROUND_COLOR_ATTRIBUTE_NAME);
|
public int | getHeight()
String heightString = this.getAttribute(HEIGHT_ATTRIBUTE_NAME);
return parseAbsoluteLength(heightString);
|
public java.lang.String | getTitle()
return this.getAttribute(TITLE_ATTRIBUTE_NAME);
|
public int | getWidth()
String widthString = this.getAttribute(WIDTH_ATTRIBUTE_NAME);
return parseAbsoluteLength(widthString);
|
private int | parseAbsoluteLength(java.lang.String length)
if (length.endsWith("px")) {
length = length.substring(0, length.indexOf("px"));
}
try {
return Integer.parseInt(length);
} catch (NumberFormatException e) {
return 0;
}
|
public void | setBackgroundColor(java.lang.String backgroundColor)
this.setAttribute(BACKGROUND_COLOR_ATTRIBUTE_NAME, backgroundColor);
|
public void | setHeight(int height)
this.setAttribute(HEIGHT_ATTRIBUTE_NAME, String.valueOf(height) + "px");
|
public void | setTitle(java.lang.String title)
this.setAttribute(TITLE_ATTRIBUTE_NAME, title);
|
public void | setWidth(int width)
this.setAttribute(WIDTH_ATTRIBUTE_NAME, String.valueOf(width) + "px");
|