com.dopanic.panicarkit.lib
Class PARRadarView

java.lang.Object
  extended by RelativeLayout
      extended by com.dopanic.panicarkit.lib.PARRadarView

public class PARRadarView
extends RelativeLayout

PAR RadarView todo: remove custom layout manager Created by helmi on 20.02.14.


Field Summary
protected static PARRadarView activeView
           
protected  PARFragment arViewController
           
protected  ImageView centerDot
           
protected  RectF frame
           
protected  PointF fullscreenMargin
           
protected  float fullscreenSizeOffset
           
protected  boolean isHidden
           
protected  PARLayoutManager layoutManager
           
static int RADAR_MODE_FULLSCREEN
          Class constant: radar mode fullscren
static int RADAR_MODE_THUMBNAIL
          Class constant: radar mode thumbnail
static float RADAR_RANGE_DEFAULT
          Class constant: radar range
static int RADAR_SIZE_DEFAULT
          Class constant: radar default size
protected  float radarInset
           
protected  Matrix4f radarMatrix
           
protected  int radarMode
           
protected  int radarRadius
           
protected  float radarRange
           
static int RENDER_RADAR_TIME_DELAY
           
static long RENDER_RADAR_TIME_INTERVAL
           
protected  java.util.Timer renderTimer
           
 
Constructor Summary
PARRadarView(Context context)
           
PARRadarView(Context context, android.util.AttributeSet attrs)
           
PARRadarView(Context context, android.util.AttributeSet attrs, int defStyle)
           
 
Method Summary
 void drawRadar()
           
static PARRadarView getActiveView()
          Getter for active PARRadarView instance
 PointF getCenter()
           
 float getRadarInset()
          Getter for radar inset
 Matrix4f getRadarMatrix()
          Getter for radar matrix
 int getRadarMode()
          get current radar mode
 int getRadarRadius()
          Getter for radar radius
 float getRadarRange()
          Getter for radar range in meters
 void hideRadar()
          Hide the radar
 boolean isRadarVisible()
          indicates if radar is visible
protected  void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
           
 void setRadarInset(float inset)
          Setter for radar inset
 void setRadarRadius(int radius)
          Set radar radius (max display range of dots) in pixels
 void setRadarRange(float range)
          Setter for radar range
 void setRadarToFullscreen()
          Set radar to fullscreen with 0 offsets
 void setRadarToFullscreen(PointF offset, float sizeOffset)
          Set radar to fullscreen with given offsets
 void setRadarToThumbnail()
          Set radar to fullscreen with given offsets
 void showRadarInMode(int radarMode, PARFragment controller)
          Show radar with a mode given
 void stop()
          Stop radar view
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RADAR_MODE_THUMBNAIL

public static final int RADAR_MODE_THUMBNAIL
Class constant: radar mode thumbnail

See Also:
Constant Field Values

RADAR_MODE_FULLSCREEN

public static final int RADAR_MODE_FULLSCREEN
Class constant: radar mode fullscren

See Also:
Constant Field Values

RADAR_RANGE_DEFAULT

public static final float RADAR_RANGE_DEFAULT
Class constant: radar range

See Also:
Constant Field Values

RADAR_SIZE_DEFAULT

public static final int RADAR_SIZE_DEFAULT
Class constant: radar default size

See Also:
Constant Field Values

RENDER_RADAR_TIME_INTERVAL

public static final long RENDER_RADAR_TIME_INTERVAL
See Also:
Constant Field Values

RENDER_RADAR_TIME_DELAY

public static final int RENDER_RADAR_TIME_DELAY
See Also:
Constant Field Values

activeView

protected static PARRadarView activeView

layoutManager

protected PARLayoutManager layoutManager

radarRange

protected float radarRange

radarMode

protected int radarMode

radarInset

protected float radarInset

radarRadius

protected int radarRadius

radarMatrix

protected Matrix4f radarMatrix

frame

protected RectF frame

isHidden

protected boolean isHidden

arViewController

protected PARFragment arViewController

renderTimer

protected java.util.Timer renderTimer

centerDot

protected ImageView centerDot

fullscreenMargin

protected PointF fullscreenMargin

fullscreenSizeOffset

protected float fullscreenSizeOffset
Constructor Detail

PARRadarView

public PARRadarView(Context context)

PARRadarView

public PARRadarView(Context context,
                    android.util.AttributeSet attrs)

PARRadarView

public PARRadarView(Context context,
                    android.util.AttributeSet attrs,
                    int defStyle)
Method Detail

getActiveView

public static PARRadarView getActiveView()
Getter for active PARRadarView instance

Returns:
Active radar view

getRadarMatrix

public Matrix4f getRadarMatrix()
Getter for radar matrix

Returns:
Matrix4f radar matrix

showRadarInMode

public void showRadarInMode(int radarMode,
                            PARFragment controller)
Show radar with a mode given

Parameters:
radarMode - this radar mode to switch to

hideRadar

public void hideRadar()
Hide the radar


isRadarVisible

public boolean isRadarVisible()
indicates if radar is visible

Returns:
boolean false if not visible, true otherwise

getRadarMode

public int getRadarMode()
get current radar mode

Returns:
int radar mode. Possible values are: PARRadarView.RADAR_MODE_OFF, PARRadarView.RADAR_MODE_THUMBNAIL, PARRadarView.RADAR_MODE_FULLSCREEN

setRadarToFullscreen

public void setRadarToFullscreen()
Set radar to fullscreen with 0 offsets


setRadarToFullscreen

public void setRadarToFullscreen(PointF offset,
                                 float sizeOffset)
Set radar to fullscreen with given offsets

Parameters:
offset - offset from superview
sizeOffset - size offset

setRadarToThumbnail

public void setRadarToThumbnail()
Set radar to fullscreen with given offsets


getRadarRange

public float getRadarRange()
Getter for radar range in meters

Returns:
Radar range in meters

setRadarRange

public void setRadarRange(float range)
Setter for radar range

Parameters:
range - the range in meters

getRadarInset

public float getRadarInset()
Getter for radar inset

Returns:
Radar inset

setRadarInset

public void setRadarInset(float inset)
Setter for radar inset

Parameters:
inset - The inset

stop

public void stop()
Stop radar view


getRadarRadius

public int getRadarRadius()
Getter for radar radius

Returns:
Radar radius in pixels

setRadarRadius

public void setRadarRadius(int radius)
Set radar radius (max display range of dots) in pixels

Parameters:
radius - Radius in pixels

drawRadar

public void drawRadar()

onMeasure

protected void onMeasure(int widthMeasureSpec,
                         int heightMeasureSpec)

getCenter

public PointF getCenter()



Copyright © 2014 doPanic GmbH. All rights reserved.