net.sf.jzeno.echo.components.css
Class CSSButton

java.lang.Object
  extended by nextapp.echo.AbstractComponent
      extended by net.sf.jzeno.echo.components.CustomComponent
          extended by net.sf.jzeno.echo.components.css.CSSComponent
              extended by net.sf.jzeno.echo.components.css.CSSButton
All Implemented Interfaces:
ToolTipPopUpSupport, java.io.Serializable, java.util.EventListener, BindingTarget, PropertyComponent, RebindableComponent, EventSink, EventSource, Component, ActionListener, ToolTipSupport, FastComponent, FastComponentContainer

public class CSSButton
extends CSSComponent
implements FastComponent, ActionListener, ToolTipPopUpSupport

A Button that allows you to style it via an external CSS file

See Also:
Serialized Form

Field Summary
static java.lang.String ICON_CHANGED_PROPERTY
           
 
Fields inherited from interface nextapp.echo.ToolTipSupport
TOOL_TIP_TEXT_CHANGED_PROPERTY
 
Fields inherited from interface nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, SELECTABLE_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
CSSButton(java.lang.Class beanClass, java.lang.String property, java.lang.String constructionHints, java.lang.String cssFile, java.lang.String styleClass)
           
CSSButton(java.lang.String cssFile, java.lang.String styleClass)
           
 
Method Summary
 void actionPerformed(ActionEvent arg0)
           Used internally.
 void addActionListener(ActionListener l)
          Adds an ActionListener to the button.
 void applyContext()
           
 ImageReference getIcon()
           
 java.lang.String getIconString()
           
 java.lang.String getText()
           
 ToolTipPopUp getToolTipPopUp()
          Returns the ToolTipPopUp component used to configure the rich tool tip support.
 java.lang.String getToolTipText()
          Returns the default tool tip text.
 void removeActionListener(ActionListener l)
          Removes an ActionListener from the button.
 void setIcon(ImageReference newValue)
           
 void setIconString(java.lang.String iconString)
           
 void setText(java.lang.String text)
           
 void setToolTipText(java.lang.String newValue)
          Sets the default tool tip text.
 
Methods inherited from class net.sf.jzeno.echo.components.css.CSSComponent
getCssFile, getStyleClass, setCssFile, setStyleClass
 
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, isReadOnly, isRequired, isValid, markInvalid, markValid, preRender, rebind, removeValidator, setActionCommand, setBean, setBeanClass, setDecorator, setNullObject, setProperty, setReadOnly, setRequired, setValue, traceValue, validate
 
Methods inherited from class nextapp.echo.AbstractComponent
add, add, addHierarchyListener, addPropertyChangeListener, applyStyle, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getClientId, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getListenerList, getLocale, getParent, indexOf, init, isAncestorOf, isDifferent, isEnabled, isFocused, isRecursivelyVisible, isRegistered, isSelectableForScriptRecorder, isShowing, isVisible, processHierarchyEvent, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setClientId, setEnabled, setFocused, setFont, setForeground, setIdentifier, setLocale, setParent, setRegistered, setSelectableForScriptRecorder, setVisible, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ICON_CHANGED_PROPERTY

public static final java.lang.String ICON_CHANGED_PROPERTY
See Also:
Constant Field Values
Constructor Detail

CSSButton

public CSSButton(java.lang.Class beanClass,
                 java.lang.String property,
                 java.lang.String constructionHints,
                 java.lang.String cssFile,
                 java.lang.String styleClass)

CSSButton

public CSSButton(java.lang.String cssFile,
                 java.lang.String styleClass)
Method Detail

getIconString

public java.lang.String getIconString()

setIconString

public void setIconString(java.lang.String iconString)

getText

public java.lang.String getText()

setText

public void setText(java.lang.String text)

actionPerformed

public void actionPerformed(ActionEvent arg0)

Used internally.

Specified by:
actionPerformed in interface ActionListener
Parameters:
arg0 - The event describing the action.

applyContext

public void applyContext()

addActionListener

public void addActionListener(ActionListener l)
Adds an ActionListener to the button.

Overrides:
addActionListener in class CSSComponent
Parameters:
l - The ActionListener to be added.

removeActionListener

public void removeActionListener(ActionListener l)
Removes an ActionListener from the button.

Overrides:
removeActionListener in class CSSComponent
Parameters:
l - The ActionListener to be removed.

getIcon

public ImageReference getIcon()

setIcon

public void setIcon(ImageReference newValue)

getToolTipPopUp

public ToolTipPopUp getToolTipPopUp()
Description copied from interface: ToolTipPopUpSupport
Returns the ToolTipPopUp component used to configure the rich tool tip support.

Specified by:
getToolTipPopUp in interface ToolTipPopUpSupport
Returns:
a ToolTipPopUp component

getToolTipText

public java.lang.String getToolTipText()
Description copied from interface: ToolTipSupport
Returns the default tool tip text.

Specified by:
getToolTipText in interface ToolTipSupport
Returns:
The tool tip text.
See Also:
ToolTipSupport.getToolTipText()

setToolTipText

public void setToolTipText(java.lang.String newValue)
Description copied from interface: ToolTipSupport
Sets the default tool tip text.

Specified by:
setToolTipText in interface ToolTipSupport
Parameters:
newValue - The new tool tip text.
See Also:
ToolTipSupport.setToolTipText(java.lang.String)