|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnextapp.echo.AbstractComponent
net.sf.jzeno.echo.components.CustomComponent
net.sf.jzeno.echo.databinding.AbstractButton
public abstract class AbstractButton
Dynamicaly wired up pushbutton. This button will automatically register with the screen it is a child of. In a normal situation this will be an AbstractScreen, which will then auto-dispatch the event to a method with the name of the actionCommand. Also supports icon buttons.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface echopoint.positionable.Borderable |
|---|
Borderable.NestedStyleInfo |
| Nested classes/interfaces inherited from interface echopoint.positionable.MouseCursorable |
|---|
MouseCursorable.NestedStyleInfo |
| Field Summary | |
|---|---|
static int |
BOTTOM
|
static int |
CENTER
|
static int |
LEFT
|
static int |
RIGHT
|
protected boolean |
save
|
static int |
TOP
|
| Fields inherited from interface echopoint.positionable.MouseCursorable |
|---|
borderStyleSymbolics, CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, STYLE_MOUSE_CURSOR, STYLE_MOUSE_CURSOR_URI |
| Constructor Summary | |
|---|---|
AbstractButton()
Creates an unbound component. |
|
AbstractButton(java.lang.Class beanClass,
java.lang.String property,
java.lang.String constructionHints)
Creates a button that is databound. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent arg0)
Used internally. |
void |
applyStyle(Style style)
Sets stylistic properties of this component based on a Style
object. |
protected abstract PushButton |
createButton()
|
Color |
getBackground()
Returns the background color of the component. |
Color |
getBorderColor()
|
int |
getBorderSize()
|
int |
getBorderStyle()
Gets the border style of the button. |
Color |
getBottomBorderColor()
|
int |
getBottomBorderSize()
|
int |
getBottomBorderStyle()
|
Font |
getFont()
Returns the font. |
Color |
getForeground()
Returns the foreground of the component. |
int |
getHeight()
Sets a fixed height for the button. |
ImageReference |
getIcon()
|
java.lang.String |
getIconName()
|
Color |
getLeftBorderColor()
|
int |
getLeftBorderSize()
|
int |
getLeftBorderStyle()
|
int |
getMouseCursor()
Returns the current mouse cursor in use. |
java.lang.String |
getMouseCursorURI()
|
Color |
getRightBorderColor()
|
int |
getRightBorderSize()
|
int |
getRightBorderStyle()
|
java.lang.String |
getText()
Returns the label that is shown on the button. |
java.lang.String |
getToolTipText()
Gets the tooltip displayed when hovering over the button. |
Color |
getTopBorderColor()
|
int |
getTopBorderSize()
|
int |
getTopBorderStyle()
|
int |
getWidth()
Gets the fixed width of the button, or returns 0 if no fixed width was specified. |
boolean |
isAsync()
|
boolean |
isReadOnly()
Returns whether or not this button is read-only. |
void |
setAsync(boolean async)
|
void |
setBackground(Color background)
Sets the background color of the component. |
void |
setBorderColor(Color borderColor)
Sets the Color of the Borderable's border. |
void |
setBorderSize(int borderSize)
Sets the size of the Borderables's border. |
void |
setBorderStyle(int style)
Sets the border style of the button. |
void |
setBottomBorderColor(Color borderColor)
Sets the Color of the Borderable's bottom border. |
void |
setBottomBorderSize(int borderSize)
Sets the size of the Borderables's bottom border. |
void |
setBottomBorderStyle(int borderStyle)
Sets the border style of the Borderables's bottom border. |
void |
setButtonWidth(int width)
Deprecated. use setWidth |
void |
setFocused(boolean focused)
Gets the fixed height specification of the button. |
void |
setFont(Font font)
Sets the font of the component. |
void |
setForeground(Color foreground)
Sets the foreground color of the component. |
void |
setHeight(int height)
|
void |
setIcon(ImageReference imageReference)
|
void |
setIconName(java.lang.String iconName)
If you want this button to visualize as an image, instead of a regular button, set this property to the filename of the gif/jpg/png/... you want to use. |
void |
setLeftBorderColor(Color borderColor)
Sets the Color of the Borderable's left border. |
void |
setLeftBorderSize(int borderSize)
Sets the size of the Borderables's left border. |
void |
setLeftBorderStyle(int borderStyle)
Sets the border style of the Borderables's left border. |
void |
setMouseCursor(int mouseCursor)
Sets the mouse cursor to use. |
void |
setMouseCursorURI(java.lang.String mouseCursorURI)
Sets the URI to a custom platform mouse cursor. |
void |
setReadOnly(boolean readOnly)
Sets this button as read-only, or as read-write. |
void |
setRightBorderColor(Color borderColor)
Sets the Color of the Borderable's right border. |
void |
setRightBorderSize(int borderSize)
Sets the size of the Borderables's right border. |
void |
setRightBorderStyle(int borderStyle)
Sets the border style of the Borderables's right border. |
void |
setText(java.lang.String text)
Sets the label on the button. |
void |
setToolTipText(java.lang.String toolTipText)
Sets the tooltip to display when hovering over the button. |
void |
setTopBorderColor(Color borderColor)
Sets the Color of the Borderable's top border. |
void |
setTopBorderSize(int borderSize)
Sets the size of the Borderables's top border. |
void |
setTopBorderStyle(int borderStyle)
Sets the border style of the Borderables's top border. |
void |
setWidth(int width)
Sets a fixed width for the button. |
| Methods inherited from class net.sf.jzeno.echo.components.CustomComponent |
|---|
addValidator, fireActionEvent, fireActionEvent, fireActionEvent, getActionCommand, getBean, getBeanClass, getDecorator, getNullObject, getProperty, getValidationErrors, getValidators, getValue, isBound, isMarkedInvalid, isRequired, isValid, markInvalid, markValid, preRender, rebind, removeValidator, setActionCommand, setBean, setBeanClass, setDecorator, setNullObject, setProperty, setRequired, setValue, traceValue, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.jzeno.echo.Precreation |
|---|
applyContext |
| Field Detail |
|---|
protected boolean save
public static final int TOP
public static final int CENTER
public static final int BOTTOM
public static final int LEFT
public static final int RIGHT
| Constructor Detail |
|---|
public AbstractButton()
Creates an unbound component.
public AbstractButton(java.lang.Class beanClass,
java.lang.String property,
java.lang.String constructionHints)
Creates a button that is databound. This can be handy if your button
appears in a list, let's say inside a
component. In this case the button is created with databinding on a
javabean (corresponding to a row in the DynaTable). In an event handler
you can retrieve the row that was clicked by calling the
DynaTable method on the button.
PropertyComponent.getValue()
| Method Detail |
|---|
public void setIconName(java.lang.String iconName)
If you want this button to visualize as an image, instead of a regular
button, set this property to the filename of the gif/jpg/png/... you want
to use. All images should be stored in the images folder
in the root of your web application.
public java.lang.String getIconName()
public ImageReference getIcon()
public void setIcon(ImageReference imageReference)
public boolean isReadOnly()
Returns whether or not this button is read-only. In the case of a button that means the button will be disabled (and grayed out) on the screen. Users will not be able to click the button.
isReadOnly in interface PropertyComponentisReadOnly in class CustomComponentpublic void setReadOnly(boolean readOnly)
Sets this button as read-only, or as read-write. In the case of a button read-only means the button will be disabled (and grayed out) on the screen. Users will not be able to click the button.
setReadOnly in interface PropertyComponentsetReadOnly in class CustomComponentpublic void actionPerformed(ActionEvent arg0)
Used internally.
actionPerformed in interface ActionListenerarg0 - The event describing the action.public void setText(java.lang.String text)
Sets the label on the button. Obviously if you configure an image
to display on the label (),
using this method has no more effect.
setIconName(String)
public java.lang.String getText()
Returns the label that is shown on the button.
public void setToolTipText(java.lang.String toolTipText)
Sets the tooltip to display when hovering over the button.
public java.lang.String getToolTipText()
Gets the tooltip displayed when hovering over the button.
public void setBorderStyle(int style)
Sets the border style of the button. (See the Borderable interface in EchoPoint).
setBorderStyle in interface Borderablepublic int getBorderStyle()
Gets the border style of the button.
getBorderStyle in interface Borderablepublic void setButtonWidth(int width)
public void setWidth(int width)
Sets a fixed width for the button. Value 0 removes the width specification.
public int getWidth()
Gets the fixed width of the button, or returns 0 if no fixed width was specified.
public void setHeight(int height)
public int getHeight()
Sets a fixed height for the button. Value 0 removes the height specification.
public void setFocused(boolean focused)
Gets the fixed height specification of the button. If 0 is returned, no fixed height was specified.
setFocused in interface ComponentsetFocused in class AbstractComponentfocused - True if the component is to be focused.public int getBorderSize()
getBorderSize in interface BorderableBorderables's border.public Color getBottomBorderColor()
getBottomBorderColor in interface BorderableColor of the Borderable's bottom border.public int getBottomBorderSize()
getBottomBorderSize in interface BorderableBorderables's bottom border.public int getBottomBorderStyle()
getBottomBorderStyle in interface BorderableBorderables's bottom border.Borderable.getBorderStyle()public Color getLeftBorderColor()
getLeftBorderColor in interface BorderableColor of the Borderable's left border.public int getLeftBorderSize()
getLeftBorderSize in interface BorderableBorderables's left border.public int getLeftBorderStyle()
getLeftBorderStyle in interface BorderableBorderables's left border.Borderable.getBorderStyle()public Color getRightBorderColor()
getRightBorderColor in interface BorderableColor of the Borderable's right border.public int getRightBorderSize()
getRightBorderSize in interface BorderableBorderables's right border.public int getRightBorderStyle()
getRightBorderStyle in interface BorderableBorderables's right border.Borderable.getBorderStyle()public Color getTopBorderColor()
getTopBorderColor in interface BorderableColor of the Borderable's top border.public int getTopBorderSize()
getTopBorderSize in interface BorderableBorderables's top border.public int getTopBorderStyle()
getTopBorderStyle in interface BorderableBorderables's top border.Borderable.getBorderStyle()public void setBorderSize(int borderSize)
BorderableBorderables's border.
This will also set the left, top, right and bottom border size.
setBorderSize in interface Borderablepublic void setBottomBorderColor(Color borderColor)
BorderableColor of the Borderable's bottom border.
setBottomBorderColor in interface Borderablepublic void setBottomBorderSize(int borderSize)
BorderableBorderables's bottom border.
setBottomBorderSize in interface Borderablepublic void setBottomBorderStyle(int borderStyle)
BorderableBorderables's bottom border.
setBottomBorderStyle in interface BorderableBorderable.setBorderStyle(int)public void setLeftBorderColor(Color borderColor)
BorderableColor of the Borderable's left border.
setLeftBorderColor in interface Borderablepublic void setLeftBorderSize(int borderSize)
BorderableBorderables's left border.
setLeftBorderSize in interface Borderablepublic void setLeftBorderStyle(int borderStyle)
BorderableBorderables's left border.
setLeftBorderStyle in interface BorderableBorderable.setBorderStyle(int)public void setRightBorderColor(Color borderColor)
BorderableColor of the Borderable's right border.
setRightBorderColor in interface Borderablepublic void setRightBorderSize(int borderSize)
BorderableBorderables's right border.
setRightBorderSize in interface Borderablepublic void setRightBorderStyle(int borderStyle)
BorderableBorderables's right border.
setRightBorderStyle in interface BorderableBorderable.setBorderStyle(int)public void setTopBorderColor(Color borderColor)
BorderableColor of the Borderable's top border.
setTopBorderColor in interface Borderablepublic void setTopBorderSize(int borderSize)
BorderableBorderables's top border.
setTopBorderSize in interface Borderablepublic void setTopBorderStyle(int borderStyle)
BorderableBorderables's top border.
setTopBorderStyle in interface BorderableBorderable.setBorderStyle(int)public int getMouseCursor()
MouseCursorable
getMouseCursor in interface MouseCursorablepublic java.lang.String getMouseCursorURI()
getMouseCursorURI in interface MouseCursorablepublic void setMouseCursor(int mouseCursor)
MouseCursorable
setMouseCursor in interface MouseCursorablemouseCursor - - the mouse cursor to usepublic void setMouseCursorURI(java.lang.String mouseCursorURI)
MouseCursorable
setMouseCursorURI in interface MouseCursorablemouseCursorURI - the URI to a custom platform mouse cursor.public void setForeground(Color foreground)
Component
setForeground in interface ComponentsetForeground in class AbstractComponentforeground - The new foreground color of the component.public Color getForeground()
Component
getForeground in interface ComponentgetForeground in class AbstractComponentpublic void setBackground(Color background)
Component
setBackground in interface ComponentsetBackground in class AbstractComponentbackground - The new background color of the component.public Color getBackground()
Component
getBackground in interface ComponentgetBackground in class AbstractComponentpublic void setBorderColor(Color borderColor)
BorderableColor of the Borderable's border.
This will also set the left, top, right and bottom border color.
setBorderColor in interface Borderablepublic Color getBorderColor()
getBorderColor in interface BorderableColor of the Borderable's border.public void applyStyle(Style style)
ComponentStyle
object. The version of this method in Component will set
foreground and background colors and the font from the style if they are
present. Components should override this method if they allow more
properties to be set from a style object, and should call
super.applyStyle() if necessary.
applyStyle in interface BorderableapplyStyle in interface MouseCursorableapplyStyle in interface ComponentapplyStyle in class AbstractComponentstyle - The style object from which to retrieve properties for this
Component.Component.applyStyle(nextapp.echo.Style)protected abstract PushButton createButton()
public boolean isAsync()
public void setAsync(boolean async)
public void setFont(Font font)
Component
setFont in interface ComponentsetFont in class AbstractComponentfont - The new font of the component.public Font getFont()
Component
getFont in interface ComponentgetFont in class AbstractComponent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||