Class DistObj

java.lang.Object
  |
  +--java.awt.Component
        |
        +--DrawObj
              |
              +--PolyObj
                    |
                    +--DistObj

public class DistObj
extends PolyObj

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
protected  java.lang.String kstrDistanceMsgParam
           
protected  java.lang.String kstrDistPrecisionParam
           
protected  java.lang.String kstrPixelSizeParam
           
protected  java.lang.String kstrToken
           
protected  Rosa2000 m_applet
           
protected  double m_fCurrentDistance
           
protected  double m_fPixelSize
           
protected  int m_nPrecision
           
protected  java.lang.String m_strMsg
           
 
Fields inherited from class PolyObj
m_applet, m_map, m_poly, pAnchor, pMoveAnchor
 
Fields inherited from class DrawObj
color, g
 
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
DistObj(Map parent, Rosa2000 applet)
           
 
Method Summary
 void destroyEvent()
          Destroy the mouse listener, mouse motion listener and the key listener
 double getDistance(java.awt.Point pt1, java.awt.Point pt2)
           
 java.lang.String getDistanceStringMsg(double fValue)
           
 java.lang.String getSubmitValue()
          Create the submit string.
protected  java.lang.String getValueString(double fValue)
           
 void mouseMoved(java.awt.event.MouseEvent evt)
          Called by the framework.
 void mousePressed(java.awt.event.MouseEvent evt)
          Add a new vertex in the polygon.
 void mouseReleased(java.awt.event.MouseEvent evt)
          Not used.
protected  void readPararam()
           
 
Methods inherited from class PolyObj
draw, endProcessing, initPaint, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, resize
 
Methods inherited from class DrawObj
getColor, paint, setColor
 
Methods inherited from class java.awt.Component
, action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, constructComponentName, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, dispatchEventImpl, doLayout, enable, enable, enableEvents, enableInputMethods, eventEnabled, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getIntrinsicCursor, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, initIDs, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, lightweightPrint, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, postsOldMouseEvents, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, readObject, remove, removeComponentListener, removeFocusListener, 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, writeObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

kstrToken

protected final java.lang.String kstrToken

kstrPixelSizeParam

protected final java.lang.String kstrPixelSizeParam

kstrDistanceMsgParam

protected final java.lang.String kstrDistanceMsgParam

kstrDistPrecisionParam

protected final java.lang.String kstrDistPrecisionParam

m_nPrecision

protected int m_nPrecision

m_fPixelSize

protected double m_fPixelSize

m_fCurrentDistance

protected double m_fCurrentDistance

m_strMsg

protected java.lang.String m_strMsg

m_applet

protected Rosa2000 m_applet
Constructor Detail

DistObj

public DistObj(Map parent,
               Rosa2000 applet)
Method Detail

readPararam

protected void readPararam()

getSubmitValue

public java.lang.String getSubmitValue()
Description copied from class: PolyObj
Create the submit string. It will be format likes x1,y1;x2,y2...
Overrides:
getSubmitValue in class PolyObj
Tags copied from class: DrawObj
Returns:
String containing the submit value.
See Also:
Rosa applet parameters

getDistance

public double getDistance(java.awt.Point pt1,
                          java.awt.Point pt2)

getValueString

protected java.lang.String getValueString(double fValue)

getDistanceStringMsg

public java.lang.String getDistanceStringMsg(double fValue)

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent evt)
Description copied from class: PolyObj
Called by the framework. Draw the lastest edge.
Overrides:
mouseMoved in class PolyObj

mousePressed

public void mousePressed(java.awt.event.MouseEvent evt)
Description copied from class: PolyObj
Add a new vertex in the polygon.
Overrides:
mousePressed in class PolyObj

destroyEvent

public void destroyEvent()
Description copied from class: PolyObj
Destroy the mouse listener, mouse motion listener and the key listener
Overrides:
destroyEvent in class PolyObj

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent evt)
Description copied from class: PolyObj
Not used.
Overrides:
mouseReleased in class PolyObj