fr.esrf.tangoatk.widget.util
Class JImage

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by fr.esrf.tangoatk.widget.util.JImage
All Implemented Interfaces:
java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener

public class JImage
extends javax.swing.JComponent
implements java.awt.event.MouseMotionListener, java.awt.event.MouseListener, java.awt.event.KeyListener

A class to handle an image viewer with seleclection , marker and axis capability.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  int cornerWidth
           
protected  boolean crossCursor
           
protected  java.awt.Color cursorColor
           
protected  int dragCorner
           
protected  int grid
           
static int HORIZONTAL_BOTTOM
           
static int HORIZONTAL_CENTER
           
static int HORIZONTAL_TOP
           
protected  int horizontalPosition
           
protected  boolean isDragging
           
protected  java.awt.Insets margin
           
protected static int MARKER_CROSS
           
protected static int MARKER_HLINE
           
protected static int MARKER_RECT
           
protected static int MARKER_VLINE
           
protected  java.util.Vector<fr.esrf.tangoatk.widget.util.Marker> markers
           
protected  double markerScaleFactor
           
protected  int mode
           
static int MODE_CROSS
           
static int MODE_LINE
           
static int MODE_RECT
           
protected  java.awt.Color selectionColor
           
protected  boolean selectionEnabled
           
protected  boolean snapToGrid
           
protected  java.awt.image.BufferedImage theImage
           
static int VERTICAL_CENTER
           
static int VERTICAL_LEFT
           
static int VERTICAL_RIGHT
           
protected  int verticalPosition
           
protected  int x1
           
protected  int x2
           
protected  JLAxis xAxis
           
protected  int xAxisHeight
           
protected  int xAxisUpMargin
           
protected  int xCursor
           
protected  int xOrg
           
protected  int y1
           
protected  int y2
           
protected  JLAxis yAxis
           
protected  int yAxisRightMargin
           
protected  int yAxisWidth
           
protected  int yCursor
           
protected  int yOrg
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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
JImage()
          Construction
 
Method Summary
 int addCrossMarker(int x, int y, java.awt.Color c)
          Adds a cross marker at the specified pos
 int addHorizontalLineMarker(int y, java.awt.Color c)
          Adds a horizontal line marker
 int addRectangleMarker(int x, int y, int width, int height, java.awt.Color c)
          Adds a rectangle marker
 int addVerticalLineMarker(int x, java.awt.Color c)
          Adds a vertical line marker
protected  void alignSelection()
           
protected  java.awt.Rectangle buildSelectionRect()
           
 void clearMarkers()
          Clears all markers
 void clearSelection()
          Clears the current selection.
protected  void clipSelection()
           
protected  boolean cornerMatch(int x, int y, int xc, int yc)
           
protected  int findCorner(int x, int y)
           
 int getHorizontalPosition()
          Returns the horizontal selection arrow position (MODE_CROSS selection)
 java.awt.image.BufferedImage getImage()
          Returns a handle to the image displayed
 java.awt.Dimension getImageSize()
          Returns size of the image (does not include margin)
 java.awt.Insets getMargin()
          Returns margin of the image
 int getMarkerNumber()
           
 java.awt.Dimension getMinimumSize()
           
 java.awt.Dimension getPreferredSize()
           
 java.awt.Color getSelectionColor()
          Returns the color of the selection area.
 java.awt.Point[] getSelectionCrossPoint()
          Returns the current lines selected (MODE_CROSS).
 int getSelectionMode()
          Returns the selection mode
 java.awt.Point[] getSelectionPoint()
          Returns the current line/rectangle selected.
 java.awt.Rectangle getSelectionRect()
          Returns the current rectangle selected.
 int getSnapGrid()
          Returns the grid spacing (Pixel)
 int getVerticalPosition()
          Returns the vertical selection arrow position (MODE_CROSS selection)
 JLAxis getXAxis()
          Returns a handle of the X axis.
 int getXOrigin()
          Return origin of the image within the component
 JLAxis getYAxis()
          Returns a handle of the Y axis.
 int getYOrigin()
          Return origin of the image within the component
 boolean hasSelection()
          Returns true if a selection exists
 boolean isCrossCursor()
          Returns true if cross curosr is enabled.
 boolean isSelectionEnabled()
          Returns true only if the selection is enabled.
 boolean isSnapToGrid()
          Return true when snap to grid mode is enable
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
static void main(java.lang.String[] args)
           
protected  void measureAxis()
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(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 paintAxis(java.awt.Graphics g)
           
protected  void paintCursor(java.awt.Graphics g)
           
protected  void paintSelection(java.awt.Graphics g)
           
protected  void repaintBoundingRect(java.awt.Rectangle oldSel)
           
 void setCrossCursor(boolean enable)
          Enable or disable the cross cursor.
 void setCursorColor(java.awt.Color c)
          Set the cross cursor color.
 void setHorizontalPosition(int horizontalPosition)
          Sets the horizontal selection arrow position (MODE_CROSS selection)
 void setImage(java.awt.image.BufferedImage i)
          Sets the image to be displayed
 void setMargin(java.awt.Insets i)
          Sets the margin of the JImage
 void setMarkerPos(int id, int x, int y, int nWidth, int nHeight)
          Sets the position of a marker
 void setMarkerScale(double s)
          Sets the scale factor for markers
 void setSelection(int _x1, int _y1, int _x2, int _y2)
          Sets the current selection.
 void setSelectionColor(java.awt.Color selectionColor)
          Sets the color of the selection area
 void setSelectionEnabled(boolean b)
          Enable or disable the selection.
 void setSelectionMode(int m)
          Sets the selection mode
 void setSnapGrid(int b)
          Sets the grid spacing (Pixel)
 void setSnapToGrid(boolean b)
          Enables the grid mode.
 void setVerticalPosition(int verticalPosition)
          Sets the vertical selection arrow position (MODE_CROSS selection)
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MODE_LINE

public static final int MODE_LINE
See Also:
Constant Field Values

MODE_RECT

public static final int MODE_RECT
See Also:
Constant Field Values

MODE_CROSS

public static final int MODE_CROSS
See Also:
Constant Field Values

VERTICAL_LEFT

public static final int VERTICAL_LEFT
See Also:
Constant Field Values

VERTICAL_CENTER

public static final int VERTICAL_CENTER
See Also:
Constant Field Values

VERTICAL_RIGHT

public static final int VERTICAL_RIGHT
See Also:
Constant Field Values

HORIZONTAL_TOP

public static final int HORIZONTAL_TOP
See Also:
Constant Field Values

HORIZONTAL_CENTER

public static final int HORIZONTAL_CENTER
See Also:
Constant Field Values

HORIZONTAL_BOTTOM

public static final int HORIZONTAL_BOTTOM
See Also:
Constant Field Values

MARKER_CROSS

protected static final int MARKER_CROSS
See Also:
Constant Field Values

MARKER_RECT

protected static final int MARKER_RECT
See Also:
Constant Field Values

MARKER_VLINE

protected static final int MARKER_VLINE
See Also:
Constant Field Values

MARKER_HLINE

protected static final int MARKER_HLINE
See Also:
Constant Field Values

theImage

protected java.awt.image.BufferedImage theImage

margin

protected java.awt.Insets margin

xOrg

protected int xOrg

yOrg

protected int yOrg

selectionEnabled

protected boolean selectionEnabled

mode

protected int mode

isDragging

protected boolean isDragging

dragCorner

protected int dragCorner

cornerWidth

protected int cornerWidth

x1

protected int x1

y1

protected int y1

x2

protected int x2

y2

protected int y2

snapToGrid

protected boolean snapToGrid

grid

protected int grid

markers

protected java.util.Vector<fr.esrf.tangoatk.widget.util.Marker> markers

markerScaleFactor

protected double markerScaleFactor

xAxis

protected JLAxis xAxis

xAxisHeight

protected int xAxisHeight

xAxisUpMargin

protected int xAxisUpMargin

yAxis

protected JLAxis yAxis

yAxisWidth

protected int yAxisWidth

yAxisRightMargin

protected int yAxisRightMargin

crossCursor

protected boolean crossCursor

cursorColor

protected java.awt.Color cursorColor

xCursor

protected int xCursor

yCursor

protected int yCursor

selectionColor

protected java.awt.Color selectionColor

horizontalPosition

protected int horizontalPosition

verticalPosition

protected int verticalPosition
Constructor Detail

JImage

public JImage()
Construction

Method Detail

setCrossCursor

public void setCrossCursor(boolean enable)
Enable or disable the cross cursor.

Parameters:
enable - True to enable cross cursor, false otherwise.

setCursorColor

public void setCursorColor(java.awt.Color c)
Set the cross cursor color.

Parameters:
c - Cursor color
See Also:
setCrossCursor(boolean)

isCrossCursor

public boolean isCrossCursor()
Returns true if cross curosr is enabled.


setSelectionEnabled

public void setSelectionEnabled(boolean b)
Enable or disable the selection. When enabled, A region can be dragged and sized inside the image.

Parameters:
b - Selection mode
See Also:
isSelectionEnabled()

isSelectionEnabled

public boolean isSelectionEnabled()
Returns true only if the selection is enabled.

Returns:
Selection mode

getSelectionRect

public java.awt.Rectangle getSelectionRect()
Returns the current rectangle selected.

Returns:
null when no selection or a Rectangle

getSelectionPoint

public java.awt.Point[] getSelectionPoint()
Returns the current line/rectangle selected.

Returns:
null when no selection or a 2 points array

getSelectionCrossPoint

public java.awt.Point[] getSelectionCrossPoint()
Returns the current lines selected (MODE_CROSS).

Returns:
null when no selection or a 4 points array

setSelectionMode

public void setSelectionMode(int m)
Sets the selection mode

Parameters:
m - 0 for Line selection , 1 for Rectangle selection

getSelectionMode

public int getSelectionMode()
Returns the selection mode

Returns:
0 for Line selection , 1 for Rectangle selection

hasSelection

public boolean hasSelection()
Returns true if a selection exists

Returns:
true is a selection is visible on the image

setSelection

public void setSelection(int _x1,
                         int _y1,
                         int _x2,
                         int _y2)
Sets the current selection.

Parameters:
_x1 - Top left corner x coordinate
_y1 - Top left corner y coordinate
_x2 - Bottom right corner x coordinate
_y2 - Bottom right corner y coordinate

clearSelection

public void clearSelection()
Clears the current selection.


setMargin

public void setMargin(java.awt.Insets i)
Sets the margin of the JImage

Parameters:
i - Image margin

getMargin

public java.awt.Insets getMargin()
Returns margin of the image

Returns:
Image margin

getXOrigin

public int getXOrigin()
Return origin of the image within the component

Returns:
X origin in pixel

getYOrigin

public int getYOrigin()
Return origin of the image within the component

Returns:
Y origin in pixel

setImage

public void setImage(java.awt.image.BufferedImage i)
Sets the image to be displayed

Parameters:
i - Image

getXAxis

public JLAxis getXAxis()
Returns a handle of the X axis.


getYAxis

public JLAxis getYAxis()
Returns a handle of the Y axis.


getImage

public java.awt.image.BufferedImage getImage()
Returns a handle to the image displayed

Returns:
Image handle

getImageSize

public java.awt.Dimension getImageSize()
Returns size of the image (does not include margin)

Returns:
Image size

isSnapToGrid

public boolean isSnapToGrid()
Return true when snap to grid mode is enable

Returns:
AlignToGrid state
See Also:
setSnapToGrid(boolean)

setSnapToGrid

public void setSnapToGrid(boolean b)
Enables the grid mode. All selection point are rounded to grid multiple.

Parameters:
b -
See Also:
isSnapToGrid(), getSnapGrid()

getSnapGrid

public int getSnapGrid()
Returns the grid spacing (Pixel)

Returns:
Grid width in pixels

setSnapGrid

public void setSnapGrid(int b)
Sets the grid spacing (Pixel)

Parameters:
b - Grid width in pixels

addCrossMarker

public int addCrossMarker(int x,
                          int y,
                          java.awt.Color c)
Adds a cross marker at the specified pos

Parameters:
x - X coordinates
y - Y coordinates
c - Marker Color
Returns:
Marker id

addRectangleMarker

public int addRectangleMarker(int x,
                              int y,
                              int width,
                              int height,
                              java.awt.Color c)
Adds a rectangle marker

Parameters:
x - X topleft corner coordinate
y - Y topleft corner coordinate
width - Rectangle width
height - Rectangle hieght
c - Marker Color
Returns:
Marker id

addVerticalLineMarker

public int addVerticalLineMarker(int x,
                                 java.awt.Color c)
Adds a vertical line marker

Parameters:
x - Horizontal position
c - Marker color
Returns:
Marker id

addHorizontalLineMarker

public int addHorizontalLineMarker(int y,
                                   java.awt.Color c)
Adds a horizontal line marker

Parameters:
y - Vertical position
c - Marker color
Returns:
Marker id

setMarkerPos

public void setMarkerPos(int id,
                         int x,
                         int y,
                         int nWidth,
                         int nHeight)
Sets the position of a marker

Parameters:
id - Marker index
x - X coordinate (ignored when HORIZONTAL_LINE Marker)
y - Y coordinate (ignored when VERTICAL_LINE Marker)
nWidth - Rectangle width (ignored when CROSS Marker, LINE Marker)
nHeight - Rectangle height (ignored when CROSS Marker, LINE Marker)

clearMarkers

public void clearMarkers()
Clears all markers


getMarkerNumber

public int getMarkerNumber()
Returns:
The number of marker

setMarkerScale

public void setMarkerScale(double s)
Sets the scale factor for markers

Parameters:
s - Scale factor

getHorizontalPosition

public int getHorizontalPosition()
Returns the horizontal selection arrow position (MODE_CROSS selection)


setHorizontalPosition

public void setHorizontalPosition(int horizontalPosition)
Sets the horizontal selection arrow position (MODE_CROSS selection)

Parameters:
horizontalPosition - Horizontal position

getVerticalPosition

public int getVerticalPosition()
Returns the vertical selection arrow position (MODE_CROSS selection)


setVerticalPosition

public void setVerticalPosition(int verticalPosition)
Sets the vertical selection arrow position (MODE_CROSS selection)

Parameters:
verticalPosition - Vertical position

getSelectionColor

public java.awt.Color getSelectionColor()
Returns the color of the selection area.


setSelectionColor

public void setSelectionColor(java.awt.Color selectionColor)
Sets the color of the selection area

Parameters:
selectionColor - Selection color

paintCursor

protected void paintCursor(java.awt.Graphics g)

paintSelection

protected void paintSelection(java.awt.Graphics g)

measureAxis

protected void measureAxis()

paintAxis

protected void paintAxis(java.awt.Graphics g)

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class javax.swing.JComponent

getMinimumSize

public java.awt.Dimension getMinimumSize()
Overrides:
getMinimumSize in class javax.swing.JComponent

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class javax.swing.JComponent

cornerMatch

protected boolean cornerMatch(int x,
                              int y,
                              int xc,
                              int yc)

findCorner

protected int findCorner(int x,
                         int y)

buildSelectionRect

protected java.awt.Rectangle buildSelectionRect()

repaintBoundingRect

protected void repaintBoundingRect(java.awt.Rectangle oldSel)

clipSelection

protected void clipSelection()

alignSelection

protected void alignSelection()

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

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

mouseClicked

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

mouseReleased

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

mousePressed

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

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener

main

public static void main(java.lang.String[] args)