amber.awt
Class FloatButton

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--amber.awt.FloatButton
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.io.Serializable

public class FloatButton
extends java.awt.Canvas
implements java.awt.event.MouseListener

This is a base panel which is required to handle the specific requirements of a Outlook type floating button. This is required by the PanelFloatButton.

Version:
1.0.0
Author:
Dr. David J. Knowles
See Also:
ApplicationHandler, ComponentHandler, Serialized Form

Inner classes inherited from class java.awt.Canvas
java.awt.Canvas.AccessibleAWTCanvas
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
FloatButton()
           
FloatButton(java.lang.String caption, java.awt.Image enabledHandle, java.awt.Image disabledHandle)
           
 
Method Summary
 void addActionListener(java.awt.event.ActionListener l)
           
protected  void drawBorderFrame(java.awt.Graphics graphics, int width, int height, boolean borderDown)
           
 boolean getButtonState()
          returns whether or not a button is currently pressed
 java.awt.Image getDisabledImage()
           
 java.awt.Image getEnabledImage()
           
 java.lang.String getLabel()
           
 boolean isToggleButton()
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void paint(java.awt.Graphics g)
           
protected  void processActionEvent(java.awt.event.ActionEvent e)
          Processes action events occurring on this component by dispatching them to any registered listeners.
protected  void processEvent(java.awt.AWTEvent e)
          Processes events on this button.
 void removeActionListener(java.awt.event.ActionListener l)
           
 void setButtonState(boolean buttonUp)
           
 void setDisabledImage(java.awt.Image newImage)
           
 void setEnabledImage(java.awt.Image newImage)
           
 void setLabel(java.lang.String caption)
           
 void setToggleButton(boolean newIsToggleButton)
           
 
Methods inherited from class java.awt.Canvas
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, 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, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FloatButton

public FloatButton()

FloatButton

public FloatButton(java.lang.String caption,
                   java.awt.Image enabledHandle,
                   java.awt.Image disabledHandle)
Method Detail

getLabel

public java.lang.String getLabel()

setLabel

public void setLabel(java.lang.String caption)

setEnabledImage

public void setEnabledImage(java.awt.Image newImage)

setDisabledImage

public void setDisabledImage(java.awt.Image newImage)

getEnabledImage

public java.awt.Image getEnabledImage()

getDisabledImage

public java.awt.Image getDisabledImage()

paint

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

drawBorderFrame

protected void drawBorderFrame(java.awt.Graphics graphics,
                               int width,
                               int height,
                               boolean borderDown)

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

processEvent

protected void processEvent(java.awt.AWTEvent e)
Processes events on this button. If an event is an instance of ActionEvent, TextEvent, ItemEvent, this method invokes the corresponding process function. Otherwise, it invokes the super processEvent in component to handle any other events.
Overrides:
processEvent in class java.awt.Component
Parameters:
e - AWTEvent to process.

processActionEvent

protected void processActionEvent(java.awt.event.ActionEvent e)
Processes action events occurring on this component by dispatching them to any registered listeners.
Parameters:
e - ActionEvent to process.

removeActionListener

public void removeActionListener(java.awt.event.ActionListener l)

addActionListener

public void addActionListener(java.awt.event.ActionListener l)

setToggleButton

public void setToggleButton(boolean newIsToggleButton)

isToggleButton

public boolean isToggleButton()

setButtonState

public void setButtonState(boolean buttonUp)

getButtonState

public boolean getButtonState()
returns whether or not a button is currently pressed


Copyright © 2002 Clearfield Research Ltd. All Rights Reserved.