|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--DrawObj | +--PointObj | +--LegendObj
This class is used to associated a pixel color and a string. When the user click in the map, it will take the pixel color and prompt the associated string. this object doesn't send any submit. It's inherit form PointObj.
Inner classes inherited from class java.awt.Component |
java.awt.Component.AWTTreeLock |
Field Summary | |
private java.lang.String |
kstrLegendParam
String parameter used to get the correlation table |
protected int |
m_alpha
Use to separate the RGB value |
protected java.util.Vector |
m_anColor
|
protected Rosa2000 |
m_applet
|
protected java.util.Vector |
m_astrDesc
|
protected int |
m_blue
|
protected int |
m_green
|
protected int |
m_red
|
Fields inherited from class PointObj |
m_map,
x,
y |
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 | |
LegendObj(Map parent,
Rosa2000 applet)
|
Method Summary | |
protected void |
addItemInLookup(java.lang.String strItem)
Extract the pixel color value and the associated string and add them in the lookup table. |
void |
destroyEvent()
Remove the mouse listener and the key listener. |
protected java.lang.String |
getLookupString(java.lang.Integer color)
Get the description associated to the color passed in parameter. |
int |
getPixels(java.awt.Image img,
int x,
int y,
int w,
int h)
Return the color take in the image passed in parameter a the XY location. |
java.lang.String |
getSubmitValue()
Do nothing |
private void |
handleSinglePixel(int pixel)
|
protected void |
initLookupTable(Rosa2000 applet)
Get the lookup table from the parameters applet. |
void |
keyPressed(java.awt.event.KeyEvent e)
Use to stop the processing, If the user press on escape key, the current command will stop. |
void |
keyReleased(java.awt.event.KeyEvent e)
do nothing |
void |
keyTyped(java.awt.event.KeyEvent e)
do nothing |
void |
mouseReleased(java.awt.event.MouseEvent evt)
Get the pixel color at the location from the mouse event and prompt the associated description. |
Methods inherited from class PointObj |
draw,
drawPoint,
mouseClicked,
mouseEntered,
mouseExited,
mousePressed,
resize |
Methods inherited from class DrawObj |
getColor,
paint,
setColor |
Methods inherited from class java.awt.Component |
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
Field Detail |
private final java.lang.String kstrLegendParam
protected int m_alpha
protected int m_red
protected int m_green
protected int m_blue
protected java.util.Vector m_astrDesc
protected java.util.Vector m_anColor
protected Rosa2000 m_applet
Constructor Detail |
public LegendObj(Map parent, Rosa2000 applet)
Method Detail |
protected void initLookupTable(Rosa2000 applet)
protected void addItemInLookup(java.lang.String strItem)
strItem
- Item string. It would define a color and an associated string like
FF0000=Lake And riverpublic java.lang.String getSubmitValue()
private void handleSinglePixel(int pixel)
public int getPixels(java.awt.Image img, int x, int y, int w, int h)
public void mouseReleased(java.awt.event.MouseEvent evt)
protected java.lang.String getLookupString(java.lang.Integer color)
color
- Color to search for.public void destroyEvent()
public void keyPressed(java.awt.event.KeyEvent e)
public void keyReleased(java.awt.event.KeyEvent e)
public void keyTyped(java.awt.event.KeyEvent e)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |