org.kaboum
Class Kaboum

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.Kaboum
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class Kaboum
extends java.applet.Applet

Kaboum (Kaboum is Another Builder Of Usefull Maps) was originally developped in order to navigate through maps generated by MapServer (http://mapserver.gis.umn.edu). The aim of the project is to give a powerfull tool that allow interactive browsing on maps (like navigation, layers query, online digitalization etc...)

Author:
Jérome Gasperi aka jrom
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
 KaboumGeometryGlobalDescriptor activeGGD
          Current geo Object
 boolean busy
          True during map loading
 java.awt.Image busyImg
          Busy Image (i.e.
 java.lang.String currentCommand
          Current command (state of the applet)
 KaboumGeometryDisplayDescriptor currentDD
          Current display descriptor
 KaboumOpMode currentOpMode
          Current active opMode
 KaboumGeometryPropertiesDescriptor currentPD
          Current object properties
 java.lang.String cursorValue
          Cursor type
 KaboumGeometryDisplayDescriptor defaultDD
          Default display descriptor
 KaboumLang defaultLang
          Lang
 KaboumGeometryPropertiesDescriptor defaultPD
          Default object properties
static java.lang.String FALSE
          FALSE
 java.util.Hashtable geometryDDHash
          Display descriptor list
 java.util.Hashtable geometryPDHash
          Geo objects classes list
 KaboumGGDIndex GGDIndex
          Indexed list of geometricals object
 boolean isJavascriptEnabled
          Liveconnect activated
static int K_NEW_GEOMETRY
          K_NEW_GEOMETRY declaration (was final but can be change now)
static java.lang.String K_NEWLINE
          New line
 java.awt.Image map
          Map image
 KaboumMapServerTools mapServerTools
          KaboumMapServerTools reference
 java.awt.Graphics offScreenGraphics
          Double buffering (Graphic)
 java.awt.Image offScreenImage
          Double buffering (Image)
 int panCenterX
          X center of pan
 int panCenterY
          Y center of pan
static java.lang.String pkName
          Current package
 boolean ref_is_applet
          Image or Applet reference view
 java.awt.Dimension screenSize
          Window applet size
 boolean sendPositionCoordinatesToJS
          Use status bar for message or no
 boolean systemStandby
          Set the system in standby mode
static java.lang.String TRUE
          TRUE
 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
Kaboum()
           
 
Method Summary
 void destroyCurrentOpMode()
          Destroy target opMode
 java.lang.String getCurrentCommand()
          Return the active opMode name
 java.awt.Font getFont()
           
 java.lang.String getOpModeProperty(java.lang.String key)
          Return the opMode property corresponding to the input key
 java.lang.String getParameter(java.lang.String s, java.lang.String d)
          Overload getParameter(String) method
 void init()
          Applet initialisation.
 boolean kaboumCommand(java.lang.String str)
          This method is the control center of the applet.
 boolean kaboumResult(java.lang.String str)
          This method sends result to the HTML page via LiveConnect (cf:javascript).
 void paint(java.awt.Graphics g)
           
static java.awt.Image readImage(Kaboum kaboum, java.net.URL imgURL)
          Load and return an image.
 void refreshTooltip()
          Refresh the tooltip display if request
 void respawnOpMode()
          Respawn a opMode after its death ;)
 void setCursor(java.lang.String s)
          Set the mouse pointer shape.
 void setPanCoordinates(int x, int y)
          Set pan coordinates
 void showMessage(java.lang.String message)
          Write message into navigator status bar.
 void showMessage(java.lang.String message, boolean displaySurfaceAndPerimeter)
          Write message into navigator status bar.
 void standbyOff()
          Set system standby off
 void standbyOn()
          Set system standby on
 void swapImage(java.net.URL imgURL)
          Change the map image.
 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, 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

pkName

public static java.lang.String pkName
Current package


K_NEWLINE

public static java.lang.String K_NEWLINE
New line


TRUE

public static java.lang.String TRUE
TRUE


FALSE

public static java.lang.String FALSE
FALSE


K_NEW_GEOMETRY

public static int K_NEW_GEOMETRY
K_NEW_GEOMETRY declaration (was final but can be change now)


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)


systemStandby

public boolean systemStandby
Set the system in standby mode


isJavascriptEnabled

public boolean isJavascriptEnabled
Liveconnect activated


sendPositionCoordinatesToJS

public boolean sendPositionCoordinatesToJS
Use status bar for message or no


busy

public boolean busy
True during map loading


map

public java.awt.Image map
Map image


busyImg

public java.awt.Image busyImg
Busy Image (i.e. Image showed during map loading)


cursorValue

public java.lang.String cursorValue
Cursor type


window

public JSObject window
Browser window reference


ref_is_applet

public boolean ref_is_applet
Image or Applet reference view


defaultLang

public KaboumLang defaultLang
Lang


mapServerTools

public KaboumMapServerTools mapServerTools
KaboumMapServerTools reference


GGDIndex

public KaboumGGDIndex GGDIndex
Indexed list of geometricals object


geometryPDHash

public java.util.Hashtable geometryPDHash
Geo objects classes list


geometryDDHash

public java.util.Hashtable geometryDDHash
Display descriptor list


activeGGD

public KaboumGeometryGlobalDescriptor activeGGD
Current geo Object


defaultDD

public KaboumGeometryDisplayDescriptor defaultDD
Default display descriptor


currentDD

public KaboumGeometryDisplayDescriptor currentDD
Current display descriptor


defaultPD

public KaboumGeometryPropertiesDescriptor defaultPD
Default object properties


currentPD

public KaboumGeometryPropertiesDescriptor currentPD
Current object properties


currentOpMode

public KaboumOpMode currentOpMode
Current active opMode


currentCommand

public java.lang.String currentCommand
Current command (state of the applet)


panCenterX

public int panCenterX
X center of pan


panCenterY

public int panCenterY
Y center of pan

Constructor Detail

Kaboum

public Kaboum()
Method Detail

init

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

Overrides:
init in class java.applet.Applet

getOpModeProperty

public java.lang.String getOpModeProperty(java.lang.String key)
Return the opMode property corresponding to the input key

Parameters:
key - String key

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)
This method is the control center of the applet. It's called by javascript in a form like: document.kaboum.kaboumCommand(str), where str is a string containing either a key and an associated value separated by "|" (change the view), or just a key. In this case the key change the active opMode !!!!! WARNING !!!!! Input coordinates MUST BE in external representation Examples: - change map view to a new box extent: str = "EXTENT|x1,y1;x2,y2" - center map view on a point: str = "EXTENT|x1,y1,-10,-10" - center map view on a point and zoom + by a factor of 2: str = "EXTENT|x1,y1,-1,-1" - center map view on a point and zoom - by a factor of 2: str = "EXTENT|x1,y1,-5,-5" - change layers to draw: str = "LAYERS|rivers,lakes,country" - put the applet in zoom + state str = "ZOOMIN" - put the applet in query state str = "QUERY" - etc...

Parameters:
str - Submited command string

standbyOn

public void standbyOn()
Set system standby on


standbyOff

public void standbyOff()
Set system standby off


getCurrentCommand

public java.lang.String getCurrentCommand()
Return the active opMode name


setPanCoordinates

public void setPanCoordinates(int x,
                              int y)
Set pan coordinates

Parameters:
x - X coordinate
y - Y coordinate

respawnOpMode

public void respawnOpMode()
Respawn a opMode after its death ;)


destroyCurrentOpMode

public void destroyCurrentOpMode()
Destroy target opMode

Parameters:
opMode - OpMode

readImage

public static java.awt.Image readImage(Kaboum kaboum,
                                       java.net.URL imgURL)
Load and return an image.

Parameters:
imgURL - Image URL

swapImage

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

Parameters:
imageURL - Image URL

update

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

getFont

public java.awt.Font getFont()
Specified by:
getFont in interface java.awt.MenuContainer
Overrides:
getFont in class java.awt.Component

paint

public void paint(java.awt.Graphics g)
Overrides:
paint 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

showMessage

public void showMessage(java.lang.String message)
Write message into navigator status bar.

Parameters:
message - Message

showMessage

public void showMessage(java.lang.String message,
                        boolean displaySurfaceAndPerimeter)
Write message into navigator status bar.

Parameters:
message - Message

getParameter

public java.lang.String getParameter(java.lang.String s,
                                     java.lang.String d)
Overload getParameter(String) method


refreshTooltip

public void refreshTooltip()
Refresh the tooltip display if request



Copyright © 2005 Kaboum team. All Rights Reserved.