Class Rosa2000

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--Rosa2000

public class Rosa2000
extends java.applet.Applet

Rosa2000 is the entry point of the applet. This object initialize the map and the toolbar. This applet was develop to show an image and associate some operation to apply on it. In setting some parameters, you could customize the applet to do any operation you need. By example, you could associate a button and a rectangle operation. You could automaticaly submit the coordinate etc. See the web page above for the specific parameters.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
private  java.lang.String kstrBkColorName
          Backgournd color parameter name
private  java.lang.String kstrButtonDefName
          List of button parameter name
private  java.lang.String kstrDebugModeName
          Debug info parameter name
private  java.lang.String kstrDefaultLoadingMsg
          Default loading message.
private  java.lang.String kstrImgListName
          Image URL parameter name
private  java.lang.String kstrLoadingMsg
          Loading message parameter name
private  java.lang.String kstrTbAlignName
          Toolbar alignement parameter name
private  java.lang.String kstrTbLocationName
          Location toolbar parameter name
private  java.lang.String kstrTbPositionName
          Position toolbar parameter name
private  java.lang.String kstrXScaleName
          X scaling parameter name ( not used yet )
private  java.lang.String kstrYcaleName
          X scaling parameter name ( not used yet )
static boolean m_bIsDebug
          If true all debug information will be show in the java consol
(package private)  boolean m_bLoad
          This member is used to know when the loading processing is completed.
(package private)  Map m_map
          Map object.
private  java.lang.String m_strLoadingString
          Used to draw the loading message.
(package private)  ToolbarPanel m_toolbar
          Toolbar object
 
Fields inherited from class java.applet.Applet
serialVersionUID, stub
 
Fields inherited from class java.awt.Panel
base, nameCounter, serialVersionUID
 
Fields inherited from class java.awt.Container
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, maxSize, ncomponents, serialVersionUID
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, assert, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, hasFocus, height, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, serialVersionUID, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
Constructor Summary
Rosa2000()
           
 
Method Summary
 ToolbarPanel getTB()
          Return the toolbar object.
 void init()
          Initialize the applet.
static boolean isDebugMode()
          Determine if the debug info is enable.
protected  void loadBackground()
          Load the background color parameter.
protected  void loadMap()
          Load the map.
 void paint(java.awt.Graphics g)
          Paint the applet.
protected  int readButton()
          Read and create the buttons.
protected  void readDebugParam()
          Read the debug parameter.
protected  void readToolbarParam()
          Load the toolbar.
 void showText(java.lang.String strText)
          Show the text pass in parameter in the status bar.
 void stop()
          Called by the browser or applet viewer to inform this applet that it should start its execution.
 
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start
 
Methods inherited from class java.awt.Panel
, addNotify, constructComponentName
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyOrientation, countComponents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getCursorTarget, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, initIDs, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPrint, list, list, locate, minimumSize, nextFocus, paintComponents, paramString, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, print, printComponents, printOneComponent, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, readObject, remove, remove, removeAll, removeContainerListener, removeNotify, setCursor, setFocusOwner, setFont, setLayout, transferFocus, update, updateCursor, validate, validateTree, writeObject
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getIntrinsicCursor, getLocation, getLocation, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, 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, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

kstrTbPositionName

private final java.lang.String kstrTbPositionName
Position toolbar parameter name

kstrTbLocationName

private final java.lang.String kstrTbLocationName
Location toolbar parameter name

kstrTbAlignName

private final java.lang.String kstrTbAlignName
Toolbar alignement parameter name

kstrImgListName

private final java.lang.String kstrImgListName
Image URL parameter name

kstrXScaleName

private final java.lang.String kstrXScaleName
X scaling parameter name ( not used yet )

kstrYcaleName

private final java.lang.String kstrYcaleName
X scaling parameter name ( not used yet )

kstrBkColorName

private final java.lang.String kstrBkColorName
Backgournd color parameter name

kstrButtonDefName

private final java.lang.String kstrButtonDefName
List of button parameter name

kstrDebugModeName

private final java.lang.String kstrDebugModeName
Debug info parameter name

kstrLoadingMsg

private final java.lang.String kstrLoadingMsg
Loading message parameter name

kstrDefaultLoadingMsg

private final java.lang.String kstrDefaultLoadingMsg
Default loading message.

m_bIsDebug

public static boolean m_bIsDebug
If true all debug information will be show in the java consol

m_toolbar

ToolbarPanel m_toolbar
Toolbar object

m_map

Map m_map
Map object. This object manage the image and apply all operation

m_strLoadingString

private java.lang.String m_strLoadingString
Used to draw the loading message.

m_bLoad

boolean m_bLoad
This member is used to know when the loading processing is completed.
Constructor Detail

Rosa2000

public Rosa2000()
Method Detail

init

public void init()
Initialize the applet. Load the toolbar and the map.
Overrides:
init in class java.applet.Applet

isDebugMode

public static boolean isDebugMode()
Determine if the debug info is enable.
Returns:
true if enable.

getTB

public ToolbarPanel getTB()
Return the toolbar object.

stop

public void stop()
Called by the browser or applet viewer to inform this applet that it should start its execution. It is called after the init method and each time the applet is revisited in a Web page. It reset the command.
Overrides:
stop in class java.applet.Applet
See Also:
Applet.stop()

loadBackground

protected void loadBackground()
Load the background color parameter. The background color must be on 24bits in hexa. Ex: FFFFFF. The caracter # is supported in prefix but it's not used.

The default color is white (FFFFFF).

readDebugParam

protected void readDebugParam()
Read the debug parameter. To enable the debug mode, the supported value is 1. Ex:<PARAM NAME="DEBUG" VALUE="1"> Otherwise, the debug mode will be disable.

loadMap

protected void loadMap()
Load the map. This method try to loading the image in IMG_URL parameter and if the image load fine, it create a new Map object to manage the image.

readToolbarParam

protected void readToolbarParam()
Load the toolbar. Read the location and initialize the toolbar.

readButton

protected int readButton()
Read and create the buttons. After read the list of buttons, it create each button and them in the toolbar.

showText

public void showText(java.lang.String strText)
Show the text pass in parameter in the status bar. Later, most of the string will be show in a tooltip object.

paint

public void paint(java.awt.Graphics g)
Paint the applet. This method is called when the contents of the component should be painted in response to the component first being shown or damage needing repair.
Overrides:
paint in class java.awt.Container
Parameters:
g - The graphics context to use for painting.