vipratech.beans.standardbeans
Class ButtonOn

java.lang.Object
  |
  +--java.awt.Component
        |
        +--vipratech.awt.VComponent
              |
              +--vipratech.beans.standardbeans.ButtonOn

public class ButtonOn
extends VComponent

The ButtonOn class displays a round button that responds to mouse over and mouse pressed events by changing its Color.

On mouse release the button generates an action event object which is sent to any registered action listeners and a boolean value with the status througth the Properytchangeevent with the name "Status", so you can connect this with other Beans througth the Propertychangelistener and can differentiate between the on/off Status from the button

Version:
1.0, May 2001
Author:
Hendrik Dathe   dathe@chemie.uni-leipzig.de
See Also:
Serialized Form

Fields inherited from class vipratech.awt.VComponent
fm
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
ButtonOn()
          The Constructor
 
Method Summary
 void addActionListener(java.awt.event.ActionListener listener)
          Allows this component to be wired at design time with action listeners
 void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
          Allows property change listeners to be registered at design time.
 void drawButton(java.awt.Color onColor1, java.awt.Color offColor1, java.awt.Graphics g)
           
 java.awt.Color getBackround()
          Method to get the backgroundcolor
 java.lang.String getKey()
           
 java.util.Locale getLocale()
           
 java.awt.Dimension getMinimumSize()
           
 java.awt.Dimension getNewSize()
           
 java.awt.Color getOffColor()
          Method to get the color for the staus off
 java.awt.Color getOnColor()
          Method to get the color for the staus on
 boolean isBackgroundon()
          Method to get the status off the background
 boolean isEnabled()
          Method to get the staus (enabled/disabled)
 boolean isStatus()
           
 void paint(java.awt.Graphics g)
           
 void propertyChange(java.beans.PropertyChangeEvent event)
          handling the propertychange of this bean connecting with the languagechoice
 void removeActionListener(java.awt.event.ActionListener listener)
          Allows this component to be un-wired at design time with action listeners
 void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
          Allows property change listeners to be de-registered at design time.
 void sendData()
          Method to send the Data as a boolean value called "Status"
 void setBackgroundon(boolean newBackgroundon)
          Method to set the status off the background on/off
 void setBackround(java.awt.Color newBackround)
          Method to set the backgroundcolor
 void setEnabled(boolean newEnabled)
          Method to set the staus (enabled/disabled)
 void setKey(java.lang.String key)
           
 void setLocale(java.util.Locale locale)
           
 void setOffColor(java.awt.Color newOffColor)
          Method to set the color for the staus off
 void setOnColor(java.awt.Color newOnColor)
          Method to set the color for the staus on
 void setStatus(boolean newStatus)
           
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFont, setForeground, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ButtonOn

public ButtonOn()
The Constructor
Method Detail

addActionListener

public void addActionListener(java.awt.event.ActionListener listener)
Allows this component to be wired at design time with action listeners

removeActionListener

public void removeActionListener(java.awt.event.ActionListener listener)
Allows this component to be un-wired at design time with action listeners

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
Allows property change listeners to be registered at design time.
Overrides:
addPropertyChangeListener in class java.awt.Component

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
Allows property change listeners to be de-registered at design time.
Overrides:
removePropertyChangeListener in class java.awt.Component

propertyChange

public final void propertyChange(java.beans.PropertyChangeEvent event)
handling the propertychange of this bean connecting with the languagechoice

getNewSize

public final java.awt.Dimension getNewSize()

getMinimumSize

public final java.awt.Dimension getMinimumSize()
Overrides:
getMinimumSize in class java.awt.Component

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class java.awt.Component

setStatus

public void setStatus(boolean newStatus)

isStatus

public boolean isStatus()

drawButton

public void drawButton(java.awt.Color onColor1,
                       java.awt.Color offColor1,
                       java.awt.Graphics g)

setOnColor

public void setOnColor(java.awt.Color newOnColor)
Method to set the color for the staus on

getOnColor

public java.awt.Color getOnColor()
Method to get the color for the staus on

setOffColor

public void setOffColor(java.awt.Color newOffColor)
Method to set the color for the staus off

getOffColor

public java.awt.Color getOffColor()
Method to get the color for the staus off

setEnabled

public void setEnabled(boolean newEnabled)
Method to set the staus (enabled/disabled)
Overrides:
setEnabled in class java.awt.Component

isEnabled

public boolean isEnabled()
Method to get the staus (enabled/disabled)
Overrides:
isEnabled in class java.awt.Component

setKey

public final void setKey(java.lang.String key)

getKey

public final java.lang.String getKey()

setLocale

public final void setLocale(java.util.Locale locale)
Overrides:
setLocale in class java.awt.Component

getLocale

public final java.util.Locale getLocale()
Overrides:
getLocale in class java.awt.Component

sendData

public void sendData()
Method to send the Data as a boolean value called "Status"

setBackround

public void setBackround(java.awt.Color newBackround)
Method to set the backgroundcolor

getBackround

public java.awt.Color getBackround()
Method to get the backgroundcolor

setBackgroundon

public void setBackgroundon(boolean newBackgroundon)
Method to set the status off the background on/off

isBackgroundon

public boolean isBackgroundon()
Method to get the status off the background

dathe@chemie.uni-leipzig.de"

http://leipzig.vernetztes-studium.de