navit  0.5.3-trunk
org.navitproject.navit.NavitGraphics Class Reference

Data Structures

enum  msg_type
 
class  NavitView
 
class  SystemBarTintView
 

Public Member Functions

void setBackgroundColor (int bgcolor)
 
 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 native String CallbackLocalizedString (String s)
 

Data Fields

final Handler callback_handler
 

Protected Member Functions

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)
 

Private Member Functions

void SetCamera (int use_camera)
 
Rect get_rect ()
 
void adjustSystemBarsTintingViews ()
 Adjust views used to tint navigation and status bars. More...
 

Private Attributes

final NavitGraphics parent_graphics
 
final ArrayList< NavitGraphicsoverlays = new ArrayList<NavitGraphics>()
 
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
 
Navit activity
 
Handler timer_handler = new Handler()
 
Canvas draw_canvas
 
Bitmap draw_bitmap
 
int SizeChangedCallbackID
 
int PaddingChangedCallbackID
 
int ButtonCallbackID
 
int MotionCallbackID
 
int KeypressCallbackID
 

Static Private Attributes

static final String TAG = "NavitGraphics"
 
static Boolean in_map = false
 
static final long time_for_long_press = 300L
 
static final msg_type [] msg_values = msg_type.values()
 
static final int draw_mode_begin = 0
 
static final int draw_mode_end = 1
 

Constructor & Destructor Documentation

◆ NavitGraphics()

org.navitproject.navit.NavitGraphics.NavitGraphics ( final Activity  activity,
NavitGraphics  parent,
int  x,
int  y,
int  w,
int  h,
int  wraparound,
int  use_camera 
)
inline

Member Function Documentation

◆ adjustSystemBarsTintingViews()

void org.navitproject.navit.NavitGraphics.adjustSystemBarsTintingViews ( )
inlineprivate

◆ ButtonCallback()

native void org.navitproject.navit.NavitGraphics.ButtonCallback ( int  id,
int  pressed,
int  button,
int  x,
int  y 
)

◆ CallbackLocalizedString()

static native String org.navitproject.navit.NavitGraphics.CallbackLocalizedString ( String  s)
static

◆ CallbackMessageChannel()

native int org.navitproject.navit.NavitGraphics.CallbackMessageChannel ( int  i,
String  s 
)

◆ draw_circle()

void org.navitproject.navit.NavitGraphics.draw_circle ( Paint  paint,
int  x,
int  y,
int  r 
)
inlineprotected

◆ draw_drag()

void org.navitproject.navit.NavitGraphics.draw_drag ( int  x,
int  y 
)
inlineprotected

◆ draw_image()

void org.navitproject.navit.NavitGraphics.draw_image ( Paint  paint,
int  x,
int  y,
Bitmap  bitmap 
)
inlineprotected

◆ draw_image_warp()

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 width.

◆ draw_mode()

void org.navitproject.navit.NavitGraphics.draw_mode ( int  mode)
inlineprotected

◆ draw_polygon()

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

◆ draw_polyline()

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

◆ draw_rectangle()

void org.navitproject.navit.NavitGraphics.draw_rectangle ( Paint  paint,
int  x,
int  y,
int  w,
int  h 
)
inlineprotected

◆ draw_text()

void org.navitproject.navit.NavitGraphics.draw_text ( Paint  paint,
int  x,
int  y,
String  text,
int  size,
int  dx,
int  dy,
int  bgcolor 
)
inlineprotected

◆ get_rect()

◆ GetAllCountries()

static native String [][] org.navitproject.navit.NavitGraphics.GetAllCountries ( )
static

◆ GetDefaultCountry()

native String org.navitproject.navit.NavitGraphics.GetDefaultCountry ( int  id,
String  s 
)

◆ handleResize()

void org.navitproject.navit.NavitGraphics.handleResize ( int  w,
int  h 
)
inline

Handles resize events.

This method is called whenever the main View is resized in any way. This is the case when its

onSizeChanged()

event handler fires or when toggling Fullscreen mode.

References org.navitproject.navit.NavitGraphics.adjustSystemBarsTintingViews(), org.navitproject.navit.NavitGraphics.handleResize(), and org.navitproject.navit.NavitGraphics.SizeChangedCallback().

Referenced by org.navitproject.navit.Navit.fullscreen(), org.navitproject.navit.NavitGraphics.handleResize(), and org.navitproject.navit.NavitGraphics.NavitView.onSizeChanged().

◆ hasMenuButton()

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.

◆ KeypressCallback()

◆ MotionCallback()

native void org.navitproject.navit.NavitGraphics.MotionCallback ( int  id,
int  x,
int  y 
)

◆ overlay_disable()

void org.navitproject.navit.NavitGraphics.overlay_disable ( int  disable)
inlineprotected

◆ overlay_resize()

void org.navitproject.navit.NavitGraphics.overlay_resize ( int  x,
int  y,
int  w,
int  h,
int  wraparound 
)
inlineprotected

◆ PaddingChangedCallback()

native void org.navitproject.navit.NavitGraphics.PaddingChangedCallback ( int  id,
int  left,
int  right,
int  top,
int  bottom 
)

◆ setBackgroundColor()

void org.navitproject.navit.NavitGraphics.setBackgroundColor ( int  bgcolor)
inline

◆ setButtonCallback()

void org.navitproject.navit.NavitGraphics.setButtonCallback ( int  id)
inline

◆ SetCamera()

void org.navitproject.navit.NavitGraphics.SetCamera ( int  use_camera)
inlineprivate

◆ setKeypressCallback()

void org.navitproject.navit.NavitGraphics.setKeypressCallback ( int  id)
inline

◆ setMotionCallback()

void org.navitproject.navit.NavitGraphics.setMotionCallback ( int  id)
inline

◆ setPaddingChangedCallback()

void org.navitproject.navit.NavitGraphics.setPaddingChangedCallback ( int  id)
inline

◆ setSizeChangedCallback()

void org.navitproject.navit.NavitGraphics.setSizeChangedCallback ( int  id)
inline

◆ SizeChangedCallback()

native void org.navitproject.navit.NavitGraphics.SizeChangedCallback ( int  id,
int  x,
int  y 
)

Field Documentation

◆ activity

Navit org.navitproject.navit.NavitGraphics.activity
private

◆ bgcolor

int org.navitproject.navit.NavitGraphics.bgcolor
private

◆ bitmap_h

int org.navitproject.navit.NavitGraphics.bitmap_h
private

◆ bitmap_w

int org.navitproject.navit.NavitGraphics.bitmap_w
private

◆ ButtonCallbackID

int org.navitproject.navit.NavitGraphics.ButtonCallbackID
private

◆ callback_handler

◆ camera

NavitCamera org.navitproject.navit.NavitGraphics.camera
private

◆ draw_bitmap

Bitmap org.navitproject.navit.NavitGraphics.draw_bitmap
private

◆ draw_canvas

Canvas org.navitproject.navit.NavitGraphics.draw_canvas
private

◆ draw_mode_begin

final int org.navitproject.navit.NavitGraphics.draw_mode_begin = 0
staticprivate

◆ draw_mode_end

final int org.navitproject.navit.NavitGraphics.draw_mode_end = 1
staticprivate

◆ frameLayout

FrameLayout org.navitproject.navit.NavitGraphics.frameLayout
private

◆ in_map

Boolean org.navitproject.navit.NavitGraphics.in_map = false
staticprivate

◆ KeypressCallbackID

◆ MotionCallbackID

int org.navitproject.navit.NavitGraphics.MotionCallbackID
private

◆ msg_values

final msg_type [] org.navitproject.navit.NavitGraphics.msg_values = msg_type.values()
staticprivate

◆ navigationTintView

SystemBarTintView org.navitproject.navit.NavitGraphics.navigationTintView
private

◆ overlay_disabled

int org.navitproject.navit.NavitGraphics.overlay_disabled
private

◆ overlays

final ArrayList<NavitGraphics> org.navitproject.navit.NavitGraphics.overlays = new ArrayList<NavitGraphics>()
private

◆ PaddingChangedCallbackID

int org.navitproject.navit.NavitGraphics.PaddingChangedCallbackID
private

◆ parent_graphics

final NavitGraphics org.navitproject.navit.NavitGraphics.parent_graphics
private

◆ pos_wraparound

int org.navitproject.navit.NavitGraphics.pos_wraparound
private

◆ pos_x

int org.navitproject.navit.NavitGraphics.pos_x
private

◆ pos_y

int org.navitproject.navit.NavitGraphics.pos_y
private

◆ relativelayout

RelativeLayout org.navitproject.navit.NavitGraphics.relativelayout
private

◆ SizeChangedCallbackID

int org.navitproject.navit.NavitGraphics.SizeChangedCallbackID
private

◆ statusTintView

SystemBarTintView org.navitproject.navit.NavitGraphics.statusTintView
private

◆ TAG

final String org.navitproject.navit.NavitGraphics.TAG = "NavitGraphics"
staticprivate

◆ time_for_long_press

final long org.navitproject.navit.NavitGraphics.time_for_long_press = 300L
staticprivate

◆ timer_handler

Handler org.navitproject.navit.NavitGraphics.timer_handler = new Handler()
private

◆ trackball_x

float org.navitproject.navit.NavitGraphics.trackball_x
private

◆ trackball_y

float org.navitproject.navit.NavitGraphics.trackball_y
private

◆ view

View org.navitproject.navit.NavitGraphics.view
private

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