public class HTMLButton extends HTMLComponent implements HandlesSingleClick
Modifier and Type | Field and Description |
---|---|
protected boolean |
disabledFg |
protected boolean |
showNavigateAwayWarning
check weather it is showNavigateAwayWarning on or not
|
static Version |
VERSION |
alignment, alt, bgColor, cancelBubble, events, gMutableTheme, hasInitFocus, id, intStyleSheet, items, name, parent, styleId, styleProperty, tabIndex, toolTip, VALID_NAME_REGEX, VALID_STYLE_REGEX
Constructor and Description |
---|
HTMLButton(java.lang.String displayName)
A constructor with one string parameter.
|
HTMLButton(java.lang.String name,
int fldCount,
java.util.ArrayList pathList) |
HTMLButton(java.lang.String displayName,
java.lang.String name)
constructor with two parameter
|
Modifier and Type | Method and Description |
---|---|
void |
addMouseEvent(HTMLMouseEvent me)
add a mouse event to this component
|
void |
addOnClickEvent(java.lang.String call,
java.lang.String script) |
void |
cancelClickBubble()
Prevent the click of the mouse from propagation up the dom and kicking off other things.
|
protected void |
compile(ClientBrowser browser)
This is the spot to put all your generation
of the HTML components.
|
boolean |
getButtGWTFg()
set is GWT button
|
java.awt.Color |
getButtonColor()
return button color
|
java.lang.Boolean |
getButtonFontBold()
return button font bold style is true or not
|
java.awt.Color |
getButtonFontColor()
return button font color
|
java.lang.String |
getButtonFontName()
return button font name
|
java.lang.Integer |
getButtonFontSize()
return button font size
|
int |
getButtonHeight()
return button Height
|
int |
getButtonWidth()
return button width
|
java.lang.String |
getCall() |
java.lang.String |
getImage() |
java.lang.String |
getName() |
boolean |
getNotReplasceWindow() |
java.lang.StringBuilder |
getOnclickScript(ClientBrowser browser) |
int |
getSpawnWinHeight() |
int |
getSpawnWinWidth() |
java.lang.String |
getToolTip() |
java.lang.String |
getValue()
return string value.
|
protected void |
iGenerate(ClientBrowser browser,
java.lang.StringBuilder buffer)
generate the raw HTML for this component.
|
void |
setButtGWTFg(boolean flag,
boolean autoSave)
Is GWT button
|
void |
setButtonColor(java.awt.Color color)
Sets button background color
|
void |
setButtonFontBold(java.lang.Boolean fontBold)
Sets button font bold style
|
void |
setButtonFontColor(java.awt.Color color)
Sets button font color.
|
void |
setButtonFontName(java.lang.String fontName)
Sets button font name.
|
void |
setButtonFontSize(java.lang.Integer fontSize)
Sets button font size
|
void |
setButtonHeight(int height)
Sets button height
|
void |
setButtonWidth(int width)
Sets button width
|
void |
setCall(java.lang.String href)
if the href starts with javascript:, it will be put in a javascript function, and
put in the <script> tag.
|
void |
setDisabled(boolean flag)
Disables this input.
|
void |
setImage(java.lang.String href) |
void |
setName(java.lang.String name) |
void |
setNotReplaceWindow(boolean notReplaceWindow) |
void |
setNoValidate(boolean flag)
no validate
|
void |
setPlaceHolderOnly(boolean flag) |
void |
setRedirectCall(java.lang.String href) |
void |
setRedirectTarget(java.lang.String target) |
void |
setShowNavigateAwayWarning(boolean flag) |
void |
setSpawnCall(java.lang.String href) |
void |
setSpawnWinHeight(int spawnWinHeight) |
void |
setSpawnWinWidth(int spawnWinWidth) |
void |
setSqlCommand(java.lang.String sql) |
void |
setTarget(java.lang.String target) |
void |
setToolTip(java.lang.String toolTip) |
void |
setValue(java.lang.String value) |
addJavaScript, addJavaScript, addOnLoadScript, appendClassName, checkIsContainer, copyAttributes, doBuildToolTip, fetchStyleProperty, getClassName, getId, getMutableTheme, getParent, getParentPage, getStyleSheet, getTheme, hasTheme, iAddComponent, iAddComponent, iAddedToPage, iAddEvent, iClear, iFindId, iGenerateAttributes, iGenerateAttributesID, iGenerateComponent, iGenerateComponent, iGenerateEvents, iGetComponent, iGetComponentCount, iHasEvent, iRemoveComponent, isCompiled, iSetId, iSetName, iSetStyleId, makeColorID, makeListOfEvents, monitorPage, postCompile, resetParent, setAlignment, setAttribute, setClassName, setHasInitFocus, setParent, setStyleProperty, setTabIndex, touch
public static final Version VERSION
protected boolean disabledFg
protected boolean showNavigateAwayWarning
public HTMLButton(java.lang.String displayName)
displayName
- public HTMLButton(java.lang.String displayName, java.lang.String name)
displayName
- name
- public HTMLButton(java.lang.String name, int fldCount, java.util.ArrayList pathList)
public void setTarget(java.lang.String target)
public void setNoValidate(boolean flag)
flag
- true if not to validate.public void setButtGWTFg(boolean flag, boolean autoSave)
flag
- autoSave
- public boolean getButtGWTFg()
public java.lang.String getValue()
public void setValue(java.lang.String value)
value
- string typepublic java.lang.String getName()
public final void setName(java.lang.String name)
name
- the namepublic void setButtonWidth(int width)
width
- int typepublic int getButtonWidth()
public void setButtonHeight(int height)
height
- int typepublic int getButtonHeight()
public void setButtonColor(java.awt.Color color)
color
- Color typepublic java.awt.Color getButtonColor()
public void setButtonFontName(java.lang.String fontName)
fontName
- string typepublic java.lang.String getButtonFontName()
public void setButtonFontBold(java.lang.Boolean fontBold)
fontBold
- Boolean typepublic java.lang.Boolean getButtonFontBold()
public void setButtonFontSize(java.lang.Integer fontSize)
fontSize
- Integer typepublic java.lang.Integer getButtonFontSize()
public void setButtonFontColor(java.awt.Color color)
color
- public java.awt.Color getButtonFontColor()
public void cancelClickBubble()
cancelClickBubble
in interface HandlesSingleClick
public void addOnClickEvent(java.lang.String call, java.lang.String script)
call
- script
- public void addMouseEvent(HTMLMouseEvent me)
me
- The mouse eventpublic void setDisabled(boolean flag)
flag
- public void setPlaceHolderOnly(boolean flag)
flag
- public void setImage(java.lang.String href)
href
- public java.lang.String getImage()
public void setCall(java.lang.String href)
href
- public void setSpawnWinHeight(int spawnWinHeight)
spawnWinHeight
- public void setSpawnWinWidth(int spawnWinWidth)
spawnWinWidth
- public int getSpawnWinHeight()
public int getSpawnWinWidth()
public boolean getNotReplasceWindow()
public void setNotReplaceWindow(boolean notReplaceWindow)
notReplaceWindow
- public java.lang.String getCall()
public void setSqlCommand(java.lang.String sql)
sql
- public void setRedirectCall(java.lang.String href)
href
- public void setToolTip(java.lang.String toolTip)
toolTip
- public java.lang.String getToolTip()
public void setRedirectTarget(java.lang.String target)
target
- public void setSpawnCall(java.lang.String href)
href
- public void setShowNavigateAwayWarning(boolean flag)
flag
- protected void compile(ClientBrowser browser)
HTMLComponent
compile
in class HTMLComponent
browser
- public java.lang.StringBuilder getOnclickScript(ClientBrowser browser)
protected void iGenerate(ClientBrowser browser, java.lang.StringBuilder buffer)
iGenerate
in class HTMLComponent
browser
- The target browserbuffer
- The generate HTMLstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.