vipratech.beans.userbeans
Class StatusButton

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--vipratech.awt.VCanvas
                    |
                    +--vipratech.beans.userbeans.StatusButton

public class StatusButton
extends VCanvas

Draws a Button which show the Status of another bean It communicate about propertychange with the bollean Value Status

Version:
0.9, July 19, 2001
Author:
Hendrik Dathe   dathe@chemie.uni-leipzig.de
See Also:
MainButton, ButtonOn, Serialized Form

Field Summary
 java.awt.FontMetrics fm
           
 
Fields inherited from class vipratech.awt.VCanvas
fm
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
StatusButton()
          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 drawBackground(java.awt.Graphics g, boolean booleana)
          Method to draw the Background
 void drawButton(java.awt.Graphics g, int anint, boolean aboolean)
          Method to draw the Button
 void drawText(java.awt.Graphics g)
          Method to draw the Text in the Textfield
 int getButtonsize()
           
 boolean getClickable()
          Returns the boolean state of the clickable variable.
 boolean getClickedOnce()
          Returns true if the button has been set to clickable and the button is in the recessed clicked once position.
 java.lang.String getKey()
          Returns the key for the component.
 java.awt.Color getLichtfarbe()
           
 java.util.Locale getLocale()
          Returns the locale for this component.
 java.awt.Dimension getMinimumSize()
          Returns the minimum size of this component of width 50px, height 50px.
 java.awt.Dimension getPreferredSize()
          Returns the preferred size of this component of width 50px, height 501px.
 java.lang.String getText1()
           
 java.lang.String getText2()
           
 java.awt.Color getUnderground()
           
 boolean isEnabled()
           
 boolean isOn()
           
 boolean isTextfield()
           
 void paint(java.awt.Graphics g)
           
 void propertyChange(java.beans.PropertyChangeEvent event)
          Allows this component to be wired up to vipratech.beans.LanguageChoice at design time.
 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 setButtonsize(int newSize)
           
 void setClickable(boolean clickable)
          Allows the button to be set to clickable.
 void setEnabled(boolean newEnabled)
           
 void setKey(java.lang.String key)
          Sets a key for the component.
 void setLichtfarbe(java.awt.Color newLichtfarbe)
          Method to set the Color of the Circle
 void setLocale(java.util.Locale locale)
          Sets the locale for this component.
 void setOn(boolean newOn)
          Method to set the Lamp On/Off
 void setText1(java.lang.String newText1)
          Method to set the Text1 which is display next to the Button
 void setText2(java.lang.String newText2)
          Method to set the Text1 which is display next to the Button
 void setTextfield(boolean newTextfield)
          Method to set the Textfield show
 void setUnderground(java.awt.Color newUnderground)
          Method to set the Color of the Button
 
Methods inherited from class java.awt.Canvas
addNotify
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, 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, 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
 

Field Detail

fm

public java.awt.FontMetrics fm
Constructor Detail

StatusButton

public StatusButton()
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 void propertyChange(java.beans.PropertyChangeEvent event)
Allows this component to be wired up to vipratech.beans.LanguageChoice at design time.

setEnabled

public void setEnabled(boolean newEnabled)
Overrides:
setEnabled in class java.awt.Component

isEnabled

public boolean isEnabled()
Overrides:
isEnabled in class java.awt.Component

paint

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

drawBackground

public void drawBackground(java.awt.Graphics g,
                           boolean booleana)
Method to draw the Background

drawButton

public void drawButton(java.awt.Graphics g,
                       int anint,
                       boolean aboolean)
Method to draw the Button

drawText

public void drawText(java.awt.Graphics g)
Method to draw the Text in the Textfield

setOn

public void setOn(boolean newOn)
Method to set the Lamp On/Off

isOn

public boolean isOn()

getMinimumSize

public final java.awt.Dimension getMinimumSize()
Returns the minimum size of this component of width 50px, height 50px.
Overrides:
getMinimumSize in class java.awt.Component

getPreferredSize

public final java.awt.Dimension getPreferredSize()
Returns the preferred size of this component of width 50px, height 501px.
Overrides:
getPreferredSize in class java.awt.Component

setLocale

public final void setLocale(java.util.Locale locale)
Sets the locale for this component.
Overrides:
setLocale in class java.awt.Component

getLocale

public final java.util.Locale getLocale()
Returns the locale for this component.
Overrides:
getLocale in class java.awt.Component

setKey

public final void setKey(java.lang.String key)
Sets a key for the component. The key is used to extract a locale specific label from a key/value pair in a resource bundle.

getKey

public final java.lang.String getKey()
Returns the key for the component. The key is used to extract a locale specific label from a key/value pair in a resource bundle.

setUnderground

public void setUnderground(java.awt.Color newUnderground)
Method to set the Color of the Button

getUnderground

public java.awt.Color getUnderground()

setLichtfarbe

public void setLichtfarbe(java.awt.Color newLichtfarbe)
Method to set the Color of the Circle

getLichtfarbe

public java.awt.Color getLichtfarbe()

setTextfield

public void setTextfield(boolean newTextfield)
Method to set the Textfield show

isTextfield

public boolean isTextfield()

setText1

public void setText1(java.lang.String newText1)
Method to set the Text1 which is display next to the Button

getText1

public java.lang.String getText1()

setText2

public void setText2(java.lang.String newText2)
Method to set the Text1 which is display next to the Button

getText2

public java.lang.String getText2()

setButtonsize

public void setButtonsize(int newSize)

getButtonsize

public int getButtonsize()

sendData

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

setClickable

public final void setClickable(boolean clickable)
Allows the button to be set to clickable. The button can then be clicked once to be recessed and then clicked a second time to return to the enabled state.

getClickable

public final boolean getClickable()
Returns the boolean state of the clickable variable.

getClickedOnce

public final boolean getClickedOnce()
Returns true if the button has been set to clickable and the button is in the recessed clicked once position.

dathe@chemie.uni-leipzig.de"

http://leipzig.vernetztes-studium.de