|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.landspurg.map.OneLoc
public class OneLoc
Manage a location in the map...
Typically, could be displayed as a marker, but is linked to several other functions
Each element can have a name, a description, and address, and eventually an icon.
Be carefull that the icon feature could take a lot of memory...
This class contains several public elements that can be modified (no getter and setter).
But if you change the long/lat value directly, you must call "validate()" function.
Typical use is to create some oneLoc element, add them to the canvas in the listPlace vector
and call recenterAroundSel()
| Field Summary | |
|---|---|
java.lang.String |
address
Adress of this element. |
java.lang.String |
description
Description, but not the address. |
static int |
ICON_CIRCLE
|
static int |
ICON_DIAMOND
Specifiy a marker of "type" ICON_DIAMOND. |
static int |
ICON_IMAGE
|
static int |
ICON_INVISIBLE
The marker won't be displayed at all |
static int |
ICON_LOC_PIN
The standard marker, and the default one. |
static int |
ICON_PHOTO
|
static int |
ICON_SMALL_PIN
Display a small "pin" |
javax.microedition.lcdui.Image |
iconImage
|
java.lang.String |
iconName
URL of an icon to be displayed. |
int |
ima_offx
|
int |
ima_offy
|
java.lang.String |
imageName
|
boolean |
isModeSat
|
int |
m_category
|
int |
m_col
|
int |
m_colForeground
|
static int |
m_defaultHeight
|
static int |
m_defaultWidth
Default width of the info window when the loc is selected This is recomputed at initialisation by the MapCanvas, but can be chaned later on. |
float |
m_lat
|
float |
m_lon
|
OneLocListener |
m_theListener
|
int |
m_type
|
java.lang.String |
name
Name of this element. |
java.lang.String |
phoneNum
Phone number of this element. |
int |
px
|
int |
py
|
java.lang.String |
URL
|
int |
zoom
|
| Constructor Summary | |
|---|---|
OneLoc()
|
|
OneLoc(float lon,
float lat)
|
|
OneLoc(java.lang.String name,
float lon,
float lat,
int preferredZoom,
boolean isModeSat)
|
|
| Method Summary | |
|---|---|
OneLoc |
clone(float inlon,
float inlat)
|
static OneLoc |
createFromString(java.lang.String in)
Factory to create a location object from a string representation. |
int |
distFrom(int inpx,
int inpy,
int inzoom)
|
boolean |
equals(java.lang.Object obj)
|
void |
fireLoaded()
|
java.lang.Object |
getValue(java.lang.String name)
|
void |
init(java.lang.String name,
float lon,
float lat,
int preferredZoom,
boolean isModeSat)
|
void |
paint(javax.microedition.lcdui.Graphics g,
int inpx,
int inpy,
int offx,
int offy,
int w,
int h,
int zoom)
Paint the marker. |
void |
paintFull(javax.microedition.lcdui.Graphics g,
int inpx,
int inpy,
int offx,
int offy,
int w,
int h,
int zoom)
Draw the infomrations when the icon has been selected.... |
void |
run()
|
java.lang.String |
saveToString()
Put the content of the location into a string. |
void |
setIconImage(javax.microedition.lcdui.Image icon,
int offX,
int offY)
|
void |
setListener(OneLocListener inListener)
Set the listenr that will be called when an icon will be loaded. |
void |
setLonLat(float inLon,
float inLat)
|
void |
setPxPy(int inPx,
int inPy)
Set the location to a new postion in world pixel coordinates |
void |
setValue(java.lang.String name,
java.lang.Object val)
|
boolean |
validate()
Validate the changes in lat/lon. |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public float m_lon
public float m_lat
public int px
public int py
public static int m_defaultWidth
public static int m_defaultHeight
public java.lang.String name
public java.lang.String description
public java.lang.String phoneNum
public java.lang.String address
public java.lang.String iconName
public javax.microedition.lcdui.Image iconImage
public java.lang.String imageName
public OneLocListener m_theListener
public int zoom
public java.lang.String URL
public boolean isModeSat
public int ima_offx
public int ima_offy
public int m_category
public static final int ICON_LOC_PIN
public static final int ICON_SMALL_PIN
public static final int ICON_INVISIBLE
public static final int ICON_DIAMOND
public static final int ICON_CIRCLE
public static final int ICON_IMAGE
public static final int ICON_PHOTO
public int m_type
public int m_col
public int m_colForeground
| Constructor Detail |
|---|
public OneLoc()
public OneLoc(java.lang.String name,
float lon,
float lat,
int preferredZoom,
boolean isModeSat)
public OneLoc(float lon,
float lat)
| Method Detail |
|---|
public void init(java.lang.String name,
float lon,
float lat,
int preferredZoom,
boolean isModeSat)
public int distFrom(int inpx,
int inpy,
int inzoom)
public void paint(javax.microedition.lcdui.Graphics g,
int inpx,
int inpy,
int offx,
int offy,
int w,
int h,
int zoom)
g - inpx - Current position of the screen in full size.inpy - w - Width of the screenh - Height of the screenzoom - Zoom factorpublic void setListener(OneLocListener inListener)
inListener - public void fireLoaded()
public void setIconImage(javax.microedition.lcdui.Image icon,
int offX,
int offY)
public void paintFull(javax.microedition.lcdui.Graphics g,
int inpx,
int inpy,
int offx,
int offy,
int w,
int h,
int zoom)
g - inpx - inpy - offx: - offset of the visible areaoffy: - offset of the visible areaw - h - zoom - public void run()
run in interface java.lang.Runnablepublic boolean validate()
public void setLonLat(float inLon,
float inLat)
public void setPxPy(int inPx,
int inPy)
public static OneLoc createFromString(java.lang.String in)
in - The string representation
public void setValue(java.lang.String name,
java.lang.Object val)
public java.lang.Object getValue(java.lang.String name)
public java.lang.String saveToString()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Object
public OneLoc clone(float inlon,
float inlat)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||