navit  0.5.1-trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups
org.navitproject.navit.NavitGraphics Class Reference

Data Structures

enum  msg_type
 
class  NavitView
 
class  SystemBarTintView
 

Public Member Functions

void setBackgroundColor (int bgcolor)
 
void SetCamera (int use_camera)
 
 NavitGraphics (final Activity activity, NavitGraphics parent, int x, int y, int w, int h, int wraparound, int use_camera)
 
native void SizeChangedCallback (int id, int x, int y)
 
native void PaddingChangedCallback (int id, int left, int right, int top, int bottom)
 
native void KeypressCallback (int id, String s)
 
native int CallbackMessageChannel (int i, String s)
 
native void ButtonCallback (int id, int pressed, int button, int x, int y)
 
native void MotionCallback (int id, int x, int y)
 
native String GetDefaultCountry (int id, String s)
 
void handleResize (int w, int h)
 Handles resize events. More...
 
boolean hasMenuButton ()
 Returns whether the device has a hardware menu button. More...
 
void setSizeChangedCallback (int id)
 
void setPaddingChangedCallback (int id)
 
void setButtonCallback (int id)
 
void setMotionCallback (int id)
 
void setKeypressCallback (int id)
 

Static Public Member Functions

static native String[][] GetAllCountries ()
 
static String getLocalizedString (String text)
 
static native String CallbackLocalizedString (String s)
 

Data Fields

Handler callback_handler
 

Static Public Attributes

static Boolean in_map = false
 
static msg_type[] msg_values = msg_type.values()
 
static final int draw_mode_begin = 0
 
static final int draw_mode_end = 1
 

Protected Member Functions

Rect get_rect ()
 
void draw_polyline (Paint paint, int c[])
 
void draw_polygon (Paint paint, int c[])
 
void draw_rectangle (Paint paint, int x, int y, int w, int h)
 
void draw_circle (Paint paint, int x, int y, int r)
 
void draw_text (Paint paint, int x, int y, String text, int size, int dx, int dy, int bgcolor)
 
void draw_image (Paint paint, int x, int y, Bitmap bitmap)
 
void draw_image_warp (Paint paint, int count, int p0x, int p0y, int p1x, int p1y, int p2x, int p2y, Bitmap bitmap)
 
void draw_mode (int mode)
 
void draw_drag (int x, int y)
 
void overlay_disable (int disable)
 
void overlay_resize (int x, int y, int w, int h, int wraparound)
 

Package Attributes

int bitmap_w
 
int bitmap_h
 
int pos_x
 
int pos_y
 
int pos_wraparound
 
int overlay_disabled
 
int bgcolor
 
float trackball_x
 
float trackball_y
 
View view
 
SystemBarTintView navigationTintView
 
SystemBarTintView statusTintView
 
FrameLayout frameLayout
 
RelativeLayout relativelayout
 
NavitCamera camera
 
Activity activity
 
int PaddingChangedCallbackID
 
int ButtonCallbackID
 
int MotionCallbackID
 
int KeypressCallbackID
 

Private Member Functions

void adjustSystemBarsTintingViews ()
 Adjust views used to tint navigation and status bars. More...
 

Private Attributes

NavitGraphics parent_graphics
 
ArrayList< NavitGraphicsoverlays = new ArrayList<NavitGraphics>()
 
Handler timer_handler = new Handler()
 
Canvas draw_canvas
 
Bitmap draw_bitmap
 
int SizeChangedCallbackID
 

Static Private Attributes

static long time_for_long_press = 300L
 
static long interval_for_long_press = 200L
 

Constructor & Destructor Documentation

Member Function Documentation

void org.navitproject.navit.NavitGraphics.adjustSystemBarsTintingViews ( )
inlineprivate
native void org.navitproject.navit.NavitGraphics.ButtonCallback ( int  id,
int  pressed,
int  button,
int  x,
int  y 
)
static native String org.navitproject.navit.NavitGraphics.CallbackLocalizedString ( String  s)
static

get localized string

Referenced by org.navitproject.navit.NavitGraphics.getLocalizedString().

native int org.navitproject.navit.NavitGraphics.CallbackMessageChannel ( int  i,
String  s 
)
void org.navitproject.navit.NavitGraphics.draw_circle ( Paint  paint,
int  x,
int  y,
int  r 
)
inlineprotected
void org.navitproject.navit.NavitGraphics.draw_drag ( int  x,
int  y 
)
inlineprotected
void org.navitproject.navit.NavitGraphics.draw_image ( Paint  paint,
int  x,
int  y,
Bitmap  bitmap 
)
inlineprotected
void org.navitproject.navit.NavitGraphics.draw_image_warp ( Paint  paint,
int  count,
int  p0x,
int  p0y,
int  p1x,
int  p1y,
int  p2x,
int  p2y,
Bitmap  bitmap 
)
inlineprotected

References PI, and width.

void org.navitproject.navit.NavitGraphics.draw_polygon ( Paint  paint,
int  c[] 
)
inlineprotected

References length.

void org.navitproject.navit.NavitGraphics.draw_polyline ( Paint  paint,
int  c[] 
)
inlineprotected

References length.

void org.navitproject.navit.NavitGraphics.draw_rectangle ( Paint  paint,
int  x,
int  y,
int  w,
int  h 
)
inlineprotected
void org.navitproject.navit.NavitGraphics.draw_text ( Paint  paint,
int  x,
int  y,
String  text,
int  size,
int  dx,
int  dy,
int  bgcolor 
)
inlineprotected
static native String [][] org.navitproject.navit.NavitGraphics.GetAllCountries ( )
static
native String org.navitproject.navit.NavitGraphics.GetDefaultCountry ( int  id,
String  s 
)
static String org.navitproject.navit.NavitGraphics.getLocalizedString ( String  text)
inlinestatic
boolean org.navitproject.navit.NavitGraphics.hasMenuButton ( )
inline

Returns whether the device has a hardware menu button.

Only Android versions starting with ICS (API version 14) support the API call to detect the presence of a Menu button. On earlier Android versions, the following assumptions will be made: On API levels up to 10, this method will always return

true

, as these Android versions relied on devices having a physical Menu button. On API levels 11 through 13 (Honeycomb releases), this method will always return

false

, as Honeycomb was a tablet-only release and did not require devices to have a Menu button.

Note that this method is not aware of non-standard mechanisms on some customized builds of Android. For example, CyanogenMod has an option to add a menu button to the navigation bar. Even with that option, this method will still return false.

native void org.navitproject.navit.NavitGraphics.MotionCallback ( int  id,
int  x,
int  y 
)
native void org.navitproject.navit.NavitGraphics.PaddingChangedCallback ( int  id,
int  left,
int  right,
int  top,
int  bottom 
)
void org.navitproject.navit.NavitGraphics.setBackgroundColor ( int  bgcolor)
inline
void org.navitproject.navit.NavitGraphics.setButtonCallback ( int  id)
inline
void org.navitproject.navit.NavitGraphics.setKeypressCallback ( int  id)
inline
void org.navitproject.navit.NavitGraphics.setMotionCallback ( int  id)
inline
void org.navitproject.navit.NavitGraphics.setPaddingChangedCallback ( int  id)
inline
void org.navitproject.navit.NavitGraphics.setSizeChangedCallback ( int  id)
inline
native void org.navitproject.navit.NavitGraphics.SizeChangedCallback ( int  id,
int  x,
int  y 
)

Field Documentation

int org.navitproject.navit.NavitGraphics.ButtonCallbackID
package
Handler org.navitproject.navit.NavitGraphics.callback_handler
NavitCamera org.navitproject.navit.NavitGraphics.camera
package
Canvas org.navitproject.navit.NavitGraphics.draw_canvas
private
final int org.navitproject.navit.NavitGraphics.draw_mode_begin = 0
static
final int org.navitproject.navit.NavitGraphics.draw_mode_end = 1
static
FrameLayout org.navitproject.navit.NavitGraphics.frameLayout
package
long org.navitproject.navit.NavitGraphics.interval_for_long_press = 200L
staticprivate
int org.navitproject.navit.NavitGraphics.MotionCallbackID
package
msg_type [] org.navitproject.navit.NavitGraphics.msg_values = msg_type.values()
static
int org.navitproject.navit.NavitGraphics.overlay_disabled
package
ArrayList<NavitGraphics> org.navitproject.navit.NavitGraphics.overlays = new ArrayList<NavitGraphics>()
private
int org.navitproject.navit.NavitGraphics.PaddingChangedCallbackID
package
RelativeLayout org.navitproject.navit.NavitGraphics.relativelayout
package
int org.navitproject.navit.NavitGraphics.SizeChangedCallbackID
private
long org.navitproject.navit.NavitGraphics.time_for_long_press = 300L
staticprivate
Handler org.navitproject.navit.NavitGraphics.timer_handler = new Handler()
private
float org.navitproject.navit.NavitGraphics.trackball_x
package
float org.navitproject.navit.NavitGraphics.trackball_y
package
View org.navitproject.navit.NavitGraphics.view
package

The documentation for this class was generated from the following file: