org.kaboum
Class Kaboumette

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by java.applet.Applet
                  extended by org.kaboum.Kaboumette
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class Kaboumette
extends java.applet.Applet
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener

Kaboumette: kaboum little sister to display a navigable reference map

Author:
Nicol@s Ribot
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
Nested classes/interfaces inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
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
 java.awt.Rectangle box
          The extent box
protected  boolean busy
          busy image
 java.lang.String cursorValue
          Cursor type
 boolean javascriptEnable
          Liveconnect activated
 boolean nodrag
           
 java.awt.Graphics offScreenGraphics
          Double buffering (Graphic)
 java.awt.Image offScreenImage
          Double buffering (Image)
 java.awt.Image ref
          reference Image image
 java.lang.String refURL
          Reference image URL
 java.awt.Dimension screenSize
          Window applet size
protected  int shiftX
          mouse position during user interaction
protected  int shiftY
          mouse position during user interaction
 KaboumMapServerTools tool
          to transform map to pix coordinates
protected  java.lang.String version
          Current version
 JSObject window
          Browser window reference
 
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
Kaboumette()
           
 
Method Summary
static double atod(java.lang.String s)
          Convert numerical string into double
static int atoi(java.lang.String s)
          Convert numerical string into integer
 void init()
          Applet initialisation.
 boolean kaboumCommand(java.lang.String str)
          The only supported command is currently: REFERENCE|x1,y1;x2,y2
 boolean kaboumResult(java.lang.String str)
          This method sends result to the HTML page via LiveConnect (cf:javascript).
 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)
          paint
 void setCursor(java.lang.String s)
          Set the mouse pointer shape.
 void swapImage(java.net.URL imgURL)
          Change the map image.
static java.net.URL toURL(java.lang.String strName)
          Convert string into URL
 void update(java.awt.Graphics g)
           
 
Methods inherited from class java.applet.Applet
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, 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

version

protected final java.lang.String version
Current version

See Also:
Constant Field Values

screenSize

public java.awt.Dimension screenSize
Window applet size


offScreenImage

public java.awt.Image offScreenImage
Double buffering (Image)


offScreenGraphics

public java.awt.Graphics offScreenGraphics
Double buffering (Graphic)


javascriptEnable

public boolean javascriptEnable
Liveconnect activated


ref

public java.awt.Image ref
reference Image image


refURL

public java.lang.String refURL
Reference image URL


cursorValue

public java.lang.String cursorValue
Cursor type


window

public JSObject window
Browser window reference


box

public java.awt.Rectangle box
The extent box


nodrag

public boolean nodrag

shiftX

protected int shiftX
mouse position during user interaction


shiftY

protected int shiftY
mouse position during user interaction


tool

public KaboumMapServerTools tool
to transform map to pix coordinates


busy

protected boolean busy
busy image

Constructor Detail

Kaboumette

public Kaboumette()
Method Detail

init

public void init()
Applet initialisation. Get the paramater from input html.

Overrides:
init in class java.applet.Applet

kaboumResult

public boolean kaboumResult(java.lang.String str)
This method sends result to the HTML page via LiveConnect (cf:javascript). It's called by opMode with an extra-applet effect (like QUERY for example). It assumed that the javascript method "kaboumResult" exist in the parent html page code.

Parameters:
str - Submitted command string

kaboumCommand

public boolean kaboumCommand(java.lang.String str)
The only supported command is currently: REFERENCE|x1,y1;x2,y2

Parameters:
str - Submited command string

atoi

public static int atoi(java.lang.String s)
Convert numerical string into integer

Parameters:
s - Input string

atod

public static double atod(java.lang.String s)
Convert numerical string into double

Parameters:
s - Input string

toURL

public static java.net.URL toURL(java.lang.String strName)
Convert string into URL

Parameters:
strName - Input string

swapImage

public void swapImage(java.net.URL imgURL)
Change the map image.

Parameters:
imageURL - Image URL

paint

public void paint(java.awt.Graphics g)
paint

Overrides:
paint in class java.awt.Container

update

public void update(java.awt.Graphics g)
Overrides:
update in class java.awt.Container

setCursor

public void setCursor(java.lang.String s)
Set the mouse pointer shape. Possible values are: DEFAULT, CROSSHAIR, WAIT, MOVE.

Parameters:
s - Value

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked 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

mouseMoved

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

mousePressed

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

mouseDragged

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

mouseReleased

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


Copyright © 2005 Kaboum team. All Rights Reserved.