|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.domui.dom.css.CssBase
to.etc.domui.dom.html.NodeBase
to.etc.domui.dom.html.NodeContainer
to.etc.domui.dom.html.Button
to.etc.domui.component.buttons.DefaultButton
public class DefaultButton
An HTML button containing a rendered image as the button content. This button creates a button by creating the full visible presence of the button as a server-side rendered image. The button can contain a text, an icon or both, and things like the text color, font and style can be manipulated. The actual rendering process uses a properties file 'defaultbutton.properties' present in the current theme. This property file contains all of the basic rendering options for rendering the button, like:
Constructor Summary | |
---|---|
DefaultButton()
Create an empty button. |
|
DefaultButton(java.lang.String txt)
Create a button with a text. |
|
DefaultButton(java.lang.String txt,
IClicked<DefaultButton> clicked)
|
|
DefaultButton(java.lang.String txt,
java.lang.String icon)
Create a button with a text and an icon. |
|
DefaultButton(java.lang.String txt,
java.lang.String icon,
IClicked<DefaultButton> clicked)
|
Method Summary | |
---|---|
java.lang.String |
getLiteralText()
Returns the text currently set on the button. |
void |
onAddedToPage(Page p)
When attached to a page, this causes the Button Image Renderer URL to be set in the image. |
void |
setConfig(java.lang.Class<?> resourceBase,
java.lang.String name)
Set the rendering properties file to be used to render the button image, as a class resource. |
void |
setConfig(java.lang.String src)
Set the rendering properties file to be used to render the button image. |
void |
setIcon(java.lang.String name)
Sets a (new) icon on this button. |
void |
setIconImage(java.lang.Class<?> resourceBase,
java.lang.String name)
Uses a resource as the base for the image. |
void |
setText(java.lang.String text)
Set a (new) text on the button's surface. |
void |
setThemeConfig(java.lang.String name)
Set the rendering properties file to be used to render the button image. |
Methods inherited from class to.etc.domui.dom.html.Button |
---|
getAccessKey, getType, getValue, isDisabled, setAccessKey, setDisabled, setType, setValue, visit |
Methods inherited from class to.etc.domui.dom.html.NodeContainer |
---|
add, add, add, addTable, canContain, delegateTo, findChildIndex, forceRebuild, getChild, getChildCount, getChildren, getDeepChild, getDeepChildren, getErrorFence, internalCheckNotDirty, internalClearDelta, internalClearDeltaFully, internalGetOldChildren, internalShelve, internalUnshelve, iterator, moveControlToModel, moveModelToControl, onRefresh, removeAllChildren, removeChild, removeChild, replaceChild, setControlsEnabled, setErrorFence, setErrorFence, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultButton()
public DefaultButton(java.lang.String txt)
txt
- public DefaultButton(java.lang.String txt, java.lang.String icon)
txt
- icon
- public DefaultButton(java.lang.String txt, IClicked<DefaultButton> clicked)
public DefaultButton(java.lang.String txt, java.lang.String icon, IClicked<DefaultButton> clicked)
Method Detail |
---|
public void setConfig(java.lang.String src)
src
- public void setConfig(java.lang.Class<?> resourceBase, java.lang.String name)
resourceBase
- name
- public void setThemeConfig(java.lang.String name)
name
- public void setIconImage(java.lang.Class<?> resourceBase, java.lang.String name)
resourceBase
- The base location for the specified name. Name is resolved with this class as the base.name
- The resource's name relative to the class.public void setIcon(java.lang.String name)
name
- public void onAddedToPage(Page p)
onAddedToPage
in class NodeBase
NodeBase.onAddedToPage(to.etc.domui.dom.html.Page)
public java.lang.String getLiteralText()
public void setText(java.lang.String text)
setText
in class NodeContainer
NodeContainer.setText(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |