|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.AbstractComponent
nextapp.echo.AbstractButton
nextapp.echo.Button
nextapp.echo.CButton
public class CButton
A highly configurable push button.
Field Summary | |
---|---|
static java.lang.String |
BORDER_COLOR_CHANGED_PROPERTY
|
static int |
BORDER_INSET
A border style that causes a simulated 3D border to be rendered, such that the button appears recessed. |
static int |
BORDER_NONE
A border style that causes no border to be rendered. |
static int |
BORDER_OUTSET
A border style that causes a simulated 3D border to be rendered, such that the button appears raised. |
static java.lang.String |
BORDER_SIZE_CHANGED_PROPERTY
|
static int |
BORDER_SOLID
A border style that causes a solid, monochrome border to be rendered in in the specified color. |
static java.lang.String |
BORDER_STYLE_CHANGED_PROPERTY
|
static Insets |
DEFAULT_INSETS
|
static java.lang.String |
HEIGHT_EXTENT_CHANGED_PROPERTY
|
static java.lang.String |
INSETS_CHANGED_PROPERTY
|
static java.lang.String |
PRESSED_BACKGROUND_CHANGED_PROPERTY
|
static java.lang.String |
PRESSED_BORDER_COLOR_CHANGED_PROPERTY
|
static java.lang.String |
PRESSED_BORDER_STYLE_CHANGED_PROPERTY
|
static java.lang.String |
PRESSED_FOREGROUND_CHANGED_PROPERTY
|
static java.lang.String |
ROLLOVER_BORDER_COLOR_CHANGED_PROPERTY
|
static java.lang.String |
STYLE_BORDER_COLOR
A style constant for the Border Color property. |
static java.lang.String |
STYLE_BORDER_SIZE
A style constant for the Border Size property. |
static java.lang.String |
STYLE_BORDER_STYLE
A style constant for the Border Style property. |
static java.lang.String |
STYLE_HEIGHT_EXTENT
A style constant for the Height Extent property. |
static java.lang.String |
STYLE_INSETS
A style constant for the Insets property. |
static java.lang.String |
STYLE_PRESSED_BACKGROUND
A style constant for the Pressed Background property. |
static java.lang.String |
STYLE_PRESSED_BORDER_COLOR
A style constant for the Pressed Border Color property. |
static java.lang.String |
STYLE_PRESSED_BORDER_STYLE
A style constant for the Pressed Border Style property. |
static java.lang.String |
STYLE_PRESSED_FOREGROUND
A style constant for the Pressed Foreground property. |
static java.lang.String |
STYLE_ROLLOVER_BORDER_COLOR
A style constant for the Rollover Border Color property. |
static java.lang.String |
STYLE_WIDTH_EXTENT
A style constant for the Width Extent property. |
static java.lang.String |
WIDTH_EXTENT_CHANGED_PROPERTY
|
Fields inherited from interface nextapp.echo.ToolTipSupport |
---|
TOOL_TIP_TEXT_CHANGED_PROPERTY |
Constructor Summary | |
---|---|
CButton()
Creates a button with no text or icon. |
|
CButton(ImageReference icon)
Creates a button with an icon. |
|
CButton(java.lang.String text)
Creates a button with text. |
|
CButton(java.lang.String text,
ImageReference icon)
Creates a button with text and an icon. |
Method Summary | |
---|---|
void |
applyStyle(Style style)
Sets stylistic properties of this component based on a Style
object. |
Color |
getBorderColor()
Returns the border color of the button. |
int |
getBorderSize()
Returns the size of the border. |
int |
getBorderStyle()
Returns the (non-pressed) border style. |
Extent |
getHeightExtent()
Returns the (minimum) height of the button. |
Insets |
getInsets()
Returns the Insets of the button. |
Color |
getPressedBackground()
Returns the pressed background color of the button. |
Color |
getPressedBorderColor()
Returns the pressed border color of the button. |
int |
getPressedBorderStyle()
Returns the pressed border style of the button. |
Color |
getPressedForeground()
Returns The pressed foreground of the button. |
Color |
getRolloverBorderColor()
Returns The rollover border color of the button. |
Extent |
getWidthExtent()
Returns the (minimum) width of the button. |
void |
setBorderColor(Color newValue)
Sets the border color of the button. |
void |
setBorderSize(int newValue)
Sets the size of the border surrounding the button. |
void |
setBorderStyle(int newValue)
Sets the border style of the button. |
void |
setHeightExtent(Extent newValue)
Sets the (minimum) height of the button. |
void |
setInsets(Insets newValue)
Sets the insets of the button (distance between border edge and content of button). |
void |
setPressedBackground(Color newValue)
Sets the pressed background color. |
void |
setPressedBorderColor(Color newValue)
Set the pressed border color. |
void |
setPressedBorderStyle(int newValue)
Sets the pressed border style. |
void |
setPressedForeground(Color newValue)
Sets the pressed foreground color. |
void |
setRolloverBorderColor(Color newValue)
Sets the rollover border color. |
void |
setWidthExtent(Extent newValue)
Sets the (minimum) width of the button. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BORDER_INSET
public static final int BORDER_NONE
public static final int BORDER_OUTSET
public static final int BORDER_SOLID
public static final java.lang.String STYLE_BORDER_COLOR
public static final java.lang.String STYLE_BORDER_SIZE
public static final java.lang.String STYLE_BORDER_STYLE
public static final java.lang.String STYLE_HEIGHT_EXTENT
public static final java.lang.String STYLE_INSETS
public static final java.lang.String STYLE_PRESSED_BORDER_COLOR
public static final java.lang.String STYLE_PRESSED_BORDER_STYLE
public static final java.lang.String STYLE_PRESSED_FOREGROUND
public static final java.lang.String STYLE_PRESSED_BACKGROUND
public static final java.lang.String STYLE_ROLLOVER_BORDER_COLOR
public static final java.lang.String STYLE_WIDTH_EXTENT
public static final java.lang.String BORDER_COLOR_CHANGED_PROPERTY
public static final java.lang.String BORDER_SIZE_CHANGED_PROPERTY
public static final java.lang.String BORDER_STYLE_CHANGED_PROPERTY
public static final java.lang.String HEIGHT_EXTENT_CHANGED_PROPERTY
public static final java.lang.String INSETS_CHANGED_PROPERTY
public static final java.lang.String PRESSED_BORDER_COLOR_CHANGED_PROPERTY
public static final java.lang.String PRESSED_BORDER_STYLE_CHANGED_PROPERTY
public static final java.lang.String PRESSED_BACKGROUND_CHANGED_PROPERTY
public static final java.lang.String PRESSED_FOREGROUND_CHANGED_PROPERTY
public static final java.lang.String ROLLOVER_BORDER_COLOR_CHANGED_PROPERTY
public static final java.lang.String WIDTH_EXTENT_CHANGED_PROPERTY
public static final Insets DEFAULT_INSETS
Constructor Detail |
---|
public CButton()
public CButton(ImageReference icon)
icon
- The icon to be displayed in the button.public CButton(java.lang.String text)
text
- The text to be displayed in the button.public CButton(java.lang.String text, ImageReference icon)
text
- The text to be displayed in the button.icon
- The icon to be displayed in the button.Method Detail |
---|
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 Component
applyStyle
in class AbstractButton
style
- The style object from which to retrieve properties for this
Component
.Component.applyStyle(nextapp.echo.Style)
public Color getBorderColor()
public int getBorderSize()
public int getBorderStyle()
public Extent getHeightExtent()
public Insets getInsets()
Insets
of the button.
Insets
of the button.public Color getPressedBackground()
public Color getPressedBorderColor()
public int getPressedBorderStyle()
public Color getPressedForeground()
public Color getRolloverBorderColor()
public Extent getWidthExtent()
public void setBorderColor(Color newValue)
newValue
- The new border color of the button.public void setBorderSize(int newValue)
newValue
- the new border size, in pixels.public void setBorderStyle(int newValue)
newValue
- The new border style, one of the following
values:
public void setHeightExtent(Extent newValue)
newValue
- The new height of the button.public void setInsets(Insets newValue)
newValue
- The new Insets
value.public void setPressedBackground(Color newValue)
newValue
- The new pressed background color.public void setPressedBorderColor(Color newValue)
newValue
- The new pressed border color.public void setPressedBorderStyle(int newValue)
newValue
- The new pressed border style, one of the following
values:
public void setPressedForeground(Color newValue)
newValue
- The new pressed foreground color.public void setRolloverBorderColor(Color newValue)
newValue
- The new rollover border color.public void setWidthExtent(Extent newValue)
newValue
- The new width of the button.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |