|
|||||||||
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 PropertyComponent
isReadOnly
in class CustomComponent
public 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 PropertyComponent
setReadOnly
in class CustomComponent
public void actionPerformed(ActionEvent arg0)
Used internally.
actionPerformed
in interface ActionListener
arg0
- 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 Borderable
public int getBorderStyle()
Gets the border style of the button.
getBorderStyle
in interface Borderable
public 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 Component
setFocused
in class AbstractComponent
focused
- True if the component is to be focused.public int getBorderSize()
getBorderSize
in interface Borderable
Borderables's
border.public Color getBottomBorderColor()
getBottomBorderColor
in interface Borderable
Color
of the Borderable's
bottom border.public int getBottomBorderSize()
getBottomBorderSize
in interface Borderable
Borderables's
bottom border.public int getBottomBorderStyle()
getBottomBorderStyle
in interface Borderable
Borderables's
bottom border.Borderable.getBorderStyle()
public Color getLeftBorderColor()
getLeftBorderColor
in interface Borderable
Color
of the Borderable's
left border.public int getLeftBorderSize()
getLeftBorderSize
in interface Borderable
Borderables's
left border.public int getLeftBorderStyle()
getLeftBorderStyle
in interface Borderable
Borderables's
left border.Borderable.getBorderStyle()
public Color getRightBorderColor()
getRightBorderColor
in interface Borderable
Color
of the Borderable's
right border.public int getRightBorderSize()
getRightBorderSize
in interface Borderable
Borderables's
right border.public int getRightBorderStyle()
getRightBorderStyle
in interface Borderable
Borderables's
right border.Borderable.getBorderStyle()
public Color getTopBorderColor()
getTopBorderColor
in interface Borderable
Color
of the Borderable's
top border.public int getTopBorderSize()
getTopBorderSize
in interface Borderable
Borderables's
top border.public int getTopBorderStyle()
getTopBorderStyle
in interface Borderable
Borderables's
top border.Borderable.getBorderStyle()
public void setBorderSize(int borderSize)
Borderable
Borderables's
border.
This will also set the left, top, right and bottom border size.
setBorderSize
in interface Borderable
public void setBottomBorderColor(Color borderColor)
Borderable
Color
of the Borderable's
bottom border.
setBottomBorderColor
in interface Borderable
public void setBottomBorderSize(int borderSize)
Borderable
Borderables's
bottom border.
setBottomBorderSize
in interface Borderable
public void setBottomBorderStyle(int borderStyle)
Borderable
Borderables's
bottom border.
setBottomBorderStyle
in interface Borderable
Borderable.setBorderStyle(int)
public void setLeftBorderColor(Color borderColor)
Borderable
Color
of the Borderable's
left border.
setLeftBorderColor
in interface Borderable
public void setLeftBorderSize(int borderSize)
Borderable
Borderables's
left border.
setLeftBorderSize
in interface Borderable
public void setLeftBorderStyle(int borderStyle)
Borderable
Borderables's
left border.
setLeftBorderStyle
in interface Borderable
Borderable.setBorderStyle(int)
public void setRightBorderColor(Color borderColor)
Borderable
Color
of the Borderable's
right border.
setRightBorderColor
in interface Borderable
public void setRightBorderSize(int borderSize)
Borderable
Borderables's
right border.
setRightBorderSize
in interface Borderable
public void setRightBorderStyle(int borderStyle)
Borderable
Borderables's
right border.
setRightBorderStyle
in interface Borderable
Borderable.setBorderStyle(int)
public void setTopBorderColor(Color borderColor)
Borderable
Color
of the Borderable's
top border.
setTopBorderColor
in interface Borderable
public void setTopBorderSize(int borderSize)
Borderable
Borderables's
top border.
setTopBorderSize
in interface Borderable
public void setTopBorderStyle(int borderStyle)
Borderable
Borderables's
top border.
setTopBorderStyle
in interface Borderable
Borderable.setBorderStyle(int)
public int getMouseCursor()
MouseCursorable
getMouseCursor
in interface MouseCursorable
public java.lang.String getMouseCursorURI()
getMouseCursorURI
in interface MouseCursorable
public void setMouseCursor(int mouseCursor)
MouseCursorable
setMouseCursor
in interface MouseCursorable
mouseCursor
- - the mouse cursor to usepublic void setMouseCursorURI(java.lang.String mouseCursorURI)
MouseCursorable
setMouseCursorURI
in interface MouseCursorable
mouseCursorURI
- the URI to a custom platform mouse cursor.public void setForeground(Color foreground)
Component
setForeground
in interface Component
setForeground
in class AbstractComponent
foreground
- The new foreground color of the component.public Color getForeground()
Component
getForeground
in interface Component
getForeground
in class AbstractComponent
public void setBackground(Color background)
Component
setBackground
in interface Component
setBackground
in class AbstractComponent
background
- The new background color of the component.public Color getBackground()
Component
getBackground
in interface Component
getBackground
in class AbstractComponent
public void setBorderColor(Color borderColor)
Borderable
Color
of the Borderable's
border.
This will also set the left, top, right and bottom border color.
setBorderColor
in interface Borderable
public Color getBorderColor()
getBorderColor
in interface Borderable
Color
of the Borderable's
border.public void applyStyle(Style style)
Component
Style
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 Borderable
applyStyle
in interface MouseCursorable
applyStyle
in interface Component
applyStyle
in class AbstractComponent
style
- 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 Component
setFont
in class AbstractComponent
font
- The new font of the component.public Font getFont()
Component
getFont
in interface Component
getFont
in class AbstractComponent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |