diff --git a/doc/apidoc/allclasses-frame.html b/doc/apidoc/allclasses-frame.html new file mode 100644 index 0000000..897061e --- /dev/null +++ b/doc/apidoc/allclasses-frame.html @@ -0,0 +1,33 @@ + + + +
+ +Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+ public static final float |
+ defaultBrakeProb
+ |
+ 0.30000001192092896f |
+
+
+ public static final int |
+ defaultDelay
+ |
+ 0 |
+
+
+ public static final int |
+ defaultFrameskip
+ |
+ 0 |
+
+
+ public static final int |
+ defaultHistoryLength
+ |
+ 50 |
+
+
+ public static final float |
+ defaultMaxVelocity
+ |
+ 5.0f |
+
+
+ public static final int |
+ defaultNoOfVehicles
+ |
+ 25 |
+
+
+ public static final int |
+ defaultTrackLength
+ |
+ 100 |
+
public class ExampleInstrumentedTest
+extends java.lang.Object
+ Constructor and Description | +
---|
ExampleInstrumentedTest()
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+ useAppContext()
+ |
+
clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
public class ExampleUnitTest
+extends java.lang.Object
+ Constructor and Description | +
---|
ExampleUnitTest()
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+ addition_isCorrect()
+ |
+
clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
public class MainActivity
+extends androidx.appcompat.app.AppCompatActivity
+implements android.widget.SeekBar.OnSeekBarChangeListener
+ androidx.core.app.ComponentActivity.ExtraData
Modifier and Type | +Field and Description | +
---|---|
static float |
+ defaultBrakeProb
+ default value of brake probability
+ |
+
static int |
+ defaultDelay
+ default value of the delay between two
+ simulation steps
+
+ |
+
static int |
+ defaultFrameskip
+ default value of the number of vehicles on
+ the track
+
+ |
+
static int |
+ defaultHistoryLength
+ default value of the number of vehicles on
+ the track
+
+ |
+
static float |
+ defaultMaxVelocity
+ default value of the maximum velocity of the
+ vehicles
+
+ |
+
static int |
+ defaultNoOfVehicles
+ default value of the number of vehicles on
+ the track
+
+ |
+
static int |
+ defaultTrackLength
+ default value of the length of the track
+
+ |
+
protected Renderer |
+ renderer
+ the renderer instance drawing the track
+ history
+
+ |
+
protected Track |
+ track
+ the track to show in the activity
+ |
+
protected TimeRecordView
+ |
+ trackView
+ the surface view on which the renderer draws
+ the track history
+
+ |
+
protected
+ android.widget.LinearLayout |
+ viewStack
+ the layout which keeps the surface view
+ |
+
protected Worker |
+ worker
+ the thread which runs the simulation and
+ visualization
+
+ |
+
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE,
+ DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL,
+ DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED,
+ RESULT_FIRST_USER, RESULT_OK
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE,
+ ALARM_SERVICE, APP_OPS_SERVICE, APPWIDGET_SERVICE,
+ AUDIO_SERVICE, BATTERY_SERVICE, BIND_ABOVE_CLIENT,
+ BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT,
+ BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_EXTERNAL_SERVICE,
+ BIND_IMPORTANT, BIND_INCLUDE_CAPABILITIES, BIND_NOT_FOREGROUND,
+ BIND_NOT_PERCEPTIBLE, BIND_WAIVE_PRIORITY, BIOMETRIC_SERVICE,
+ BLOB_STORE_SERVICE, BLUETOOTH_SERVICE, CAMERA_SERVICE,
+ CAPTIONING_SERVICE, CARRIER_CONFIG_SERVICE, CLIPBOARD_SERVICE,
+ COMPANION_DEVICE_SERVICE, CONNECTIVITY_DIAGNOSTICS_SERVICE,
+ CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE,
+ CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE,
+ CONTEXT_RESTRICTED, CROSS_PROFILE_APPS_SERVICE,
+ DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE,
+ DROPBOX_SERVICE, EUICC_SERVICE, FILE_INTEGRITY_SERVICE,
+ FINGERPRINT_SERVICE, HARDWARE_PROPERTIES_SERVICE,
+ INPUT_METHOD_SERVICE, INPUT_SERVICE, IPSEC_SERVICE,
+ JOB_SCHEDULER_SERVICE, KEYGUARD_SERVICE, LAUNCHER_APPS_SERVICE,
+ LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE,
+ MEDIA_PROJECTION_SERVICE, MEDIA_ROUTER_SERVICE,
+ MEDIA_SESSION_SERVICE, MIDI_SERVICE, MODE_APPEND,
+ MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS,
+ MODE_NO_LOCALIZED_COLLATORS, MODE_PRIVATE, MODE_WORLD_READABLE,
+ MODE_WORLD_WRITEABLE, NETWORK_STATS_SERVICE, NFC_SERVICE,
+ NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE,
+ RECEIVER_VISIBLE_TO_INSTANT_APPS, RESTRICTIONS_SERVICE,
+ ROLE_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, SHORTCUT_SERVICE,
+ STORAGE_SERVICE, STORAGE_STATS_SERVICE, SYSTEM_HEALTH_SERVICE,
+ TELECOM_SERVICE, TELEPHONY_IMS_SERVICE, TELEPHONY_SERVICE,
+ TELEPHONY_SUBSCRIPTION_SERVICE, TEXT_CLASSIFICATION_SERVICE,
+ TEXT_SERVICES_MANAGER_SERVICE, TV_INPUT_SERVICE,
+ UI_MODE_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE,
+ VIBRATOR_SERVICE, VPN_MANAGEMENT_SERVICE, WALLPAPER_SERVICE,
+ WIFI_AWARE_SERVICE, WIFI_P2P_SERVICE, WIFI_RTT_RANGING_SERVICE,
+ WIFI_SERVICE, WINDOW_SERVICE
TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE,
+ TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL,
+ TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE,
+ TRIM_MEMORY_UI_HIDDEN
Constructor and Description | +
---|
MainActivity()
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+ onClearButtonClick(android.view.View view)
+ Handler function for clicks on the "Stop"
+ button.
+
+ |
+
protected void |
+ onCreate(android.os.Bundle savedInstanceState)
+ Constructor for MainActivity
+ |
+
void |
+ onPlayButtonClick(android.view.View view)
+ Handler function for clicks on the "Play"
+ button.
+
+ |
+
void |
+ onProgressChanged(android.widget.SeekBar seekBar,
+ int progress,
+ boolean fromUser)
+ Handler function for changes on the seek
+ bars.
+
+ |
+
void |
+ onStartTrackingTouch(android.widget.SeekBar seekBar)
+ Handler function for beginning touch events
+ on a seek bar.
+
+ |
+
void |
+ onStepButtonClick(android.view.View view)
+ Handler function for clicks on the "Step"
+ button.
+
+ |
+
void |
+ onStopButtonClick(android.view.View view)
+ Handler function for clicks on the "Stop"
+ button.
+
+ |
+
void |
+ onStopTrackingTouch(android.widget.SeekBar seekBar)
+ Handler function for ending touch events on a
+ seek bar.
+
+ |
+
static float |
+ round(float number,
+ int digits)
+ Utility function to round a float to a given
+ amount of digits.
+
+ |
+
protected void |
+ stopWorker()
+ Stops the current worker thread.
+ |
+
void |
+ updateStats()
+ Updates the statistics view.
+ |
+
protected void |
+ updateTrack()
+ Creates a new track with the current
+ settings.
+
+ |
+
addContentView, attachBaseContext, closeOptionsMenu,
+ dispatchKeyEvent, findViewById, getDelegate,
+ getDrawerToggleDelegate, getMenuInflater, getResources,
+ getSupportActionBar, getSupportParentActivityIntent,
+ invalidateOptionsMenu, onConfigurationChanged, onContentChanged,
+ onCreateSupportNavigateUpTaskStack, onDestroy, onKeyDown,
+ onMenuItemSelected, onMenuOpened, onNightModeChanged,
+ onPanelClosed, onPostCreate, onPostResume,
+ onPrepareSupportNavigateUpTaskStack, onSaveInstanceState,
+ onStart, onStop, onSupportActionModeFinished,
+ onSupportActionModeStarted, onSupportContentChanged,
+ onSupportNavigateUp, onTitleChanged,
+ onWindowStartingSupportActionMode, openOptionsMenu,
+ setContentView, setContentView, setContentView,
+ setSupportActionBar, setSupportProgress,
+ setSupportProgressBarIndeterminate,
+ setSupportProgressBarIndeterminateVisibility,
+ setSupportProgressBarVisibility, setTheme,
+ startSupportActionMode, supportInvalidateOptionsMenu,
+ supportNavigateUpTo, supportRequestWindowFeature,
+ supportShouldUpRecreateTask
dump, getSupportFragmentManager, getSupportLoaderManager,
+ onActivityResult, onAttachFragment, onCreatePanelMenu,
+ onCreateView, onCreateView, onLowMemory,
+ onMultiWindowModeChanged, onNewIntent, onPause,
+ onPictureInPictureModeChanged, onPrepareOptionsPanel,
+ onPreparePanel, onRequestPermissionsResult, onResume,
+ onResumeFragments, onStateNotSaved,
+ setEnterSharedElementCallback, setExitSharedElementCallback,
+ startActivityForResult, startActivityForResult,
+ startActivityFromFragment, startActivityFromFragment,
+ startIntentSenderForResult, startIntentSenderForResult,
+ startIntentSenderFromFragment, supportFinishAfterTransition,
+ supportPostponeEnterTransition,
+ supportStartPostponedEnterTransition,
+ validateRequestPermissionsRequestCode
getLastCustomNonConfigurationInstance, getLifecycle,
+ getOnBackPressedDispatcher, getSavedStateRegistry,
+ getViewModelStore, onBackPressed,
+ onRetainCustomNonConfigurationInstance,
+ onRetainNonConfigurationInstance
dispatchKeyShortcutEvent, getExtraData, putExtraData,
+ superDispatchKeyEvent
closeContextMenu, createPendingResult, dismissDialog,
+ dismissKeyboardShortcutsHelper, dispatchGenericMotionEvent,
+ dispatchPopulateAccessibilityEvent, dispatchTouchEvent,
+ dispatchTrackballEvent, enterPictureInPictureMode,
+ enterPictureInPictureMode, finish, finishActivity,
+ finishActivityFromChild, finishAffinity, finishAfterTransition,
+ finishAndRemoveTask, finishFromChild, getActionBar,
+ getApplication, getCallingActivity, getCallingPackage,
+ getChangingConfigurations, getComponentName, getContentScene,
+ getContentTransitionManager, getCurrentFocus,
+ getFragmentManager, getIntent, getLastNonConfigurationInstance,
+ getLayoutInflater, getLoaderManager, getLocalClassName,
+ getMaxNumPictureInPictureActions, getMediaController, getParent,
+ getParentActivityIntent, getPreferences, getReferrer,
+ getRequestedOrientation, getSearchEvent, getSystemService,
+ getTaskId, getTitle, getTitleColor, getVoiceInteractor,
+ getVolumeControlStream, getWindow, getWindowManager,
+ hasWindowFocus, isActivityTransitionRunning,
+ isChangingConfigurations, isChild, isDestroyed, isFinishing,
+ isImmersive, isInMultiWindowMode, isInPictureInPictureMode,
+ isLocalVoiceInteractionSupported, isTaskRoot,
+ isVoiceInteraction, isVoiceInteractionRoot, managedQuery,
+ moveTaskToBack, navigateUpTo, navigateUpToFromChild,
+ onActionModeFinished, onActionModeStarted, onActivityReenter,
+ onApplyThemeResource, onAttachedToWindow, onAttachFragment,
+ onChildTitleChanged, onContextItemSelected, onContextMenuClosed,
+ onCreate, onCreateContextMenu, onCreateDescription,
+ onCreateDialog, onCreateDialog, onCreateNavigateUpTaskStack,
+ onCreateOptionsMenu, onCreatePanelView, onCreateThumbnail,
+ onDetachedFromWindow, onEnterAnimationComplete,
+ onGenericMotionEvent, onGetDirectActions, onKeyLongPress,
+ onKeyMultiple, onKeyShortcut, onKeyUp,
+ onLocalVoiceInteractionStarted, onLocalVoiceInteractionStopped,
+ onMultiWindowModeChanged, onNavigateUp, onNavigateUpFromChild,
+ onOptionsItemSelected, onOptionsMenuClosed,
+ onPerformDirectAction, onPictureInPictureModeChanged,
+ onPictureInPictureRequested, onPostCreate, onPrepareDialog,
+ onPrepareDialog, onPrepareNavigateUpTaskStack,
+ onPrepareOptionsMenu, onProvideAssistContent,
+ onProvideAssistData, onProvideKeyboardShortcuts,
+ onProvideReferrer, onRestart, onRestoreInstanceState,
+ onRestoreInstanceState, onSaveInstanceState, onSearchRequested,
+ onSearchRequested, onTopResumedActivityChanged, onTouchEvent,
+ onTrackballEvent, onTrimMemory, onUserInteraction,
+ onUserLeaveHint, onVisibleBehindCanceled,
+ onWindowAttributesChanged, onWindowFocusChanged,
+ onWindowStartingActionMode, onWindowStartingActionMode,
+ openContextMenu, overridePendingTransition,
+ postponeEnterTransition, recreate,
+ registerActivityLifecycleCallbacks, registerForContextMenu,
+ releaseInstance, removeDialog, reportFullyDrawn,
+ requestDragAndDropPermissions, requestPermissions,
+ requestShowKeyboardShortcuts, requestVisibleBehind,
+ requestWindowFeature, requireViewById, runOnUiThread,
+ setActionBar, setContentTransitionManager, setDefaultKeyMode,
+ setEnterSharedElementCallback, setExitSharedElementCallback,
+ setFeatureDrawable, setFeatureDrawableAlpha,
+ setFeatureDrawableResource, setFeatureDrawableUri,
+ setFinishOnTouchOutside, setImmersive, setInheritShowWhenLocked,
+ setIntent, setLocusContext, setMediaController,
+ setPictureInPictureParams, setProgress,
+ setProgressBarIndeterminate,
+ setProgressBarIndeterminateVisibility, setProgressBarVisibility,
+ setRequestedOrientation, setResult, setResult,
+ setSecondaryProgress, setShowWhenLocked, setTaskDescription,
+ setTitle, setTitle, setTitleColor, setTranslucent,
+ setTurnScreenOn, setVisible, setVolumeControlStream,
+ setVrModeEnabled, shouldShowRequestPermissionRationale,
+ shouldUpRecreateTask, showAssist, showDialog, showDialog,
+ showLockTaskEscapeMessage, startActionMode, startActionMode,
+ startActivities, startActivities, startActivity, startActivity,
+ startActivityFromChild, startActivityFromChild,
+ startActivityFromFragment, startActivityFromFragment,
+ startActivityIfNeeded, startActivityIfNeeded, startIntentSender,
+ startIntentSender, startIntentSenderFromChild,
+ startIntentSenderFromChild, startLocalVoiceInteraction,
+ startLockTask, startManagingCursor, startNextMatchingActivity,
+ startNextMatchingActivity, startPostponedEnterTransition,
+ startSearch, stopLocalVoiceInteraction, stopLockTask,
+ stopManagingCursor, takeKeyEvents, triggerSearch,
+ unregisterActivityLifecycleCallbacks,
+ unregisterForContextMenu
applyOverrideConfiguration, getAssets, getTheme,
+ setTheme
bindIsolatedService, bindService, bindService,
+ bindServiceAsUser, checkCallingOrSelfPermission,
+ checkCallingOrSelfUriPermission, checkCallingPermission,
+ checkCallingUriPermission, checkPermission, checkSelfPermission,
+ checkUriPermission, checkUriPermission, clearWallpaper,
+ createAttributionContext, createConfigurationContext,
+ createContextForSplit, createDeviceProtectedStorageContext,
+ createDisplayContext, createPackageContext, createWindowContext,
+ databaseList, deleteDatabase, deleteFile,
+ deleteSharedPreferences, enforceCallingOrSelfPermission,
+ enforceCallingOrSelfUriPermission, enforceCallingPermission,
+ enforceCallingUriPermission, enforcePermission,
+ enforceUriPermission, enforceUriPermission, fileList,
+ getApplicationContext, getApplicationInfo, getAttributionTag,
+ getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir,
+ getContentResolver, getDatabasePath, getDataDir, getDir,
+ getDisplay, getExternalCacheDir, getExternalCacheDirs,
+ getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs,
+ getFilesDir, getFileStreamPath, getMainExecutor, getMainLooper,
+ getNoBackupFilesDir, getObbDir, getObbDirs, getOpPackageName,
+ getPackageCodePath, getPackageManager, getPackageName,
+ getPackageResourcePath, getSharedPreferences,
+ getSystemServiceName, getWallpaper,
+ getWallpaperDesiredMinimumHeight,
+ getWallpaperDesiredMinimumWidth, grantUriPermission,
+ isDeviceProtectedStorage, isRestricted, moveDatabaseFrom,
+ moveSharedPreferencesFrom, openFileInput, openFileOutput,
+ openOrCreateDatabase, openOrCreateDatabase, peekWallpaper,
+ registerReceiver, registerReceiver, registerReceiver,
+ registerReceiver, removeStickyBroadcast,
+ removeStickyBroadcastAsUser, revokeUriPermission,
+ revokeUriPermission, sendBroadcast, sendBroadcast,
+ sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast,
+ sendOrderedBroadcast, sendOrderedBroadcast,
+ sendOrderedBroadcast, sendOrderedBroadcastAsUser,
+ sendStickyBroadcast, sendStickyBroadcastAsUser,
+ sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser,
+ setWallpaper, setWallpaper, startForegroundService,
+ startInstrumentation, startService, stopService, unbindService,
+ unregisterReceiver, updateServiceGroup
getColor, getColorStateList, getDrawable, getString,
+ getString, getSystemService, getText, obtainStyledAttributes,
+ obtainStyledAttributes, obtainStyledAttributes,
+ obtainStyledAttributes, registerComponentCallbacks,
+ sendBroadcastWithMultiplePermissions,
+ unregisterComponentCallbacks
clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
onPointerCaptureChanged
public static final int defaultNoOfVehicles+
public static final int defaultTrackLength+
public static final float defaultBrakeProb+
public static final float defaultMaxVelocity+
public static final int defaultDelay+
public static final int defaultHistoryLength+
public static final int defaultFrameskip+
protected Track track+
protected TimeRecordView trackView+
protected Worker worker+
protected Renderer renderer+
protected android.widget.LinearLayout viewStack+
protected void onCreate(android.os.Bundle savedInstanceState)+
onCreate
in class androidx.appcompat.app.AppCompatActivity
+ savedInstanceState
- Bundle with previously
+ saved activity state, otherwise null
+ public static float round(float number, + int digits)+
number
- number to rounddigits
- amount of digitspublic void updateStats()+
public void onStepButtonClick(android.view.View view)+
view
- the view the event is generated from
+ public void onPlayButtonClick(android.view.View view)+
view
- the view the event is generated from
+ public void onStopButtonClick(android.view.View view)+
view
- the view the event is generated from
+ protected void stopWorker()+
public void onClearButtonClick(android.view.View view)+
view
- the view the event is generated from
+ protected void updateTrack()+
public void onProgressChanged(android.widget.SeekBar seekBar, + int progress, + boolean fromUser)+
onProgressChanged
in interface android.widget.SeekBar.OnSeekBarChangeListener
+ seekBar
- the seek bar changedprogress
- the new progress value of the seek
+ bar
+ fromUser
- flag if the event is the result of
+ an user action
+ public void onStartTrackingTouch(android.widget.SeekBar seekBar)+
onStartTrackingTouch
in
+ interface android.widget.SeekBar.OnSeekBarChangeListener
+ seekBar
- the seek bar touchedpublic void onStopTrackingTouch(android.widget.SeekBar seekBar)+
onStopTrackingTouch
in
+ interface android.widget.SeekBar.OnSeekBarChangeListener
+ seekBar
- the seek bar touchedpublic class Renderer
+extends java.lang.Object
+ Modifier and Type | +Field and Description | +
---|---|
protected int |
+ height
+ height of the surface to draw to
+ |
+
protected
+ android.view.SurfaceHolder |
+ holder
+ holder of the surface the renderer draws to
+
+ |
+
protected android.graphics.Paint
+ |
+ paint
+ Paint instance of the renderer
+ |
+
protected int |
+ pixelPerLine
+ height of a rectangle representing one
+ vehicle
+
+ |
+
protected int |
+ pixelPerVehicle
+ width of a rectangle representing one
+ vehicle
+
+ |
+
protected float |
+ tooShortPerHeight
+ amount of pixels per height which are lost by
+ rounding
+
+ |
+
protected float |
+ tooShortPerTrackLength
+ amount of pixels per track position which are
+ lost by rounding
+
+ |
+
protected Track |
+ track
+ the track to render
+ |
+
protected int |
+ width
+ width of the surface to draw to
+ |
+
Constructor and Description | +
---|
Renderer(Track track,
+ android.view.SurfaceHolder holder)
+ Constuctor for a Renderer.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+ draw()
+ Draws the current state of the track history
+ to the Surface.
+
+ |
+
protected int |
+ getColor(float curVelocity,
+ float maxVelocity)
+ Utility function which calculates a color
+ from the relation between the current speed of a
+ vehicle and it's maximum speed (from red over yellow to
+ green).
+
+ |
+
void |
+ setSize(int width,
+ int height)
+ Updates the dimension information of the
+ renderer.
+
+ |
+
void |
+ setTrack(Track track)
+ Updates the track of the Surface.
+ |
+
clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
protected Track track+
protected int pixelPerVehicle+
protected int pixelPerLine+
protected float tooShortPerTrackLength+
protected float tooShortPerHeight+
protected android.graphics.Paint paint+
protected android.view.SurfaceHolder holder+
protected int width+
protected int height+
public Renderer(Track track, + android.view.SurfaceHolder holder)+
track
- the track to renderholder
- the holder of the surface to draw to
+ public void setSize(int width, + int height)+
width
- the width of the SurfaceViewheight
- the height of the SurfaceViewpublic void setTrack(Track track)+
track
- the new track to renderprotected int getColor(float curVelocity, + float maxVelocity)+
curVelocity
- current velocity of the vehicle
+ maxVelocity
- maximum velocity of the vehilce
+ protected void draw()+
public class TimeRecordView
+extends android.view.SurfaceView
+ android.view.View.AccessibilityDelegate,
+ android.view.View.BaseSavedState,
+ android.view.View.DragShadowBuilder,
+ android.view.View.MeasureSpec,
+ android.view.View.OnApplyWindowInsetsListener,
+ android.view.View.OnAttachStateChangeListener,
+ android.view.View.OnCapturedPointerListener,
+ android.view.View.OnClickListener,
+ android.view.View.OnContextClickListener,
+ android.view.View.OnCreateContextMenuListener,
+ android.view.View.OnDragListener,
+ android.view.View.OnFocusChangeListener,
+ android.view.View.OnGenericMotionListener,
+ android.view.View.OnHoverListener,
+ android.view.View.OnKeyListener,
+ android.view.View.OnLayoutChangeListener,
+ android.view.View.OnLongClickListener,
+ android.view.View.OnScrollChangeListener,
+ android.view.View.OnSystemUiVisibilityChangeListener,
+ android.view.View.OnTouchListener,
+ android.view.View.OnUnhandledKeyEventListener
ACCESSIBILITY_LIVE_REGION_ASSERTIVE,
+ ACCESSIBILITY_LIVE_REGION_NONE,
+ ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA,
+ AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS,
+ AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE,
+ AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY,
+ AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH,
+ AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR,
+ AUTOFILL_HINT_CREDIT_CARD_NUMBER,
+ AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE,
+ AUTOFILL_HINT_EMAIL_ADDRESS, AUTOFILL_HINT_NAME,
+ AUTOFILL_HINT_PASSWORD, AUTOFILL_HINT_PHONE,
+ AUTOFILL_HINT_POSTAL_ADDRESS, AUTOFILL_HINT_POSTAL_CODE,
+ AUTOFILL_HINT_USERNAME, AUTOFILL_TYPE_DATE, AUTOFILL_TYPE_LIST,
+ AUTOFILL_TYPE_NONE, AUTOFILL_TYPE_TEXT, AUTOFILL_TYPE_TOGGLE,
+ DRAG_FLAG_GLOBAL, DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION,
+ DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION,
+ DRAG_FLAG_GLOBAL_URI_READ, DRAG_FLAG_GLOBAL_URI_WRITE,
+ DRAG_FLAG_OPAQUE, DRAWING_CACHE_QUALITY_AUTO,
+ DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW,
+ EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET,
+ ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET,
+ ENABLED_FOCUSED_STATE_SET,
+ ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET,
+ ENABLED_SELECTED_STATE_SET,
+ ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET,
+ ENABLED_WINDOW_FOCUSED_STATE_SET,
+ FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT,
+ FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT,
+ FOCUS_RIGHT, FOCUS_UP, FOCUSABLE, FOCUSABLE_AUTO,
+ FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE,
+ FOCUSED_SELECTED_STATE_SET,
+ FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET,
+ FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED,
+ IMPORTANT_FOR_ACCESSIBILITY_AUTO,
+ IMPORTANT_FOR_ACCESSIBILITY_NO,
+ IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS,
+ IMPORTANT_FOR_ACCESSIBILITY_YES, IMPORTANT_FOR_AUTOFILL_AUTO,
+ IMPORTANT_FOR_AUTOFILL_NO,
+ IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS,
+ IMPORTANT_FOR_AUTOFILL_YES,
+ IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS,
+ IMPORTANT_FOR_CONTENT_CAPTURE_AUTO,
+ IMPORTANT_FOR_CONTENT_CAPTURE_NO,
+ IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS,
+ IMPORTANT_FOR_CONTENT_CAPTURE_YES,
+ IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS,
+ INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE,
+ LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT,
+ LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR,
+ LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT,
+ MEASURED_SIZE_MASK, MEASURED_STATE_MASK,
+ MEASURED_STATE_TOO_SMALL, NO_ID, NOT_FOCUSABLE,
+ OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS,
+ OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET,
+ PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET,
+ PRESSED_ENABLED_FOCUSED_STATE_SET,
+ PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET,
+ PRESSED_ENABLED_SELECTED_STATE_SET,
+ PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET,
+ PRESSED_ENABLED_STATE_SET,
+ PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET,
+ PRESSED_FOCUSED_SELECTED_STATE_SET,
+ PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET,
+ PRESSED_FOCUSED_STATE_SET,
+ PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET,
+ PRESSED_SELECTED_STATE_SET,
+ PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET,
+ PRESSED_WINDOW_FOCUSED_STATE_SET, ROTATION, ROTATION_X,
+ ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON,
+ SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL,
+ SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END,
+ SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT,
+ SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP,
+ SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT,
+ SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET,
+ SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET,
+ SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET,
+ SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED,
+ STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE,
+ SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION,
+ SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY,
+ SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN,
+ SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION,
+ SYSTEM_UI_FLAG_LAYOUT_STABLE,
+ SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR,
+ SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE,
+ SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS,
+ TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY,
+ TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END,
+ TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END,
+ TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL,
+ TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR,
+ TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT,
+ TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL,
+ TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VIEW_LOG_TAG,
+ VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z
Constructor and Description | +
---|
TimeRecordView(android.content.Context context,
+ Track track)
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+ onSizeChanged(int w,
+ int h,
+ int oldw,
+ int oldh)
+ Updates the size information of the
+ SurfaceView, used by the Android SDK.
+
+ |
+
dispatchDraw, draw, gatherTransparentRegion, getHolder,
+ getHostToken, getImportantForAccessibility, getSurfaceControl,
+ onAttachedToWindow, onDetachedFromWindow, onMeasure,
+ onWindowVisibilityChanged, setAlpha, setChildSurfacePackage,
+ setClipBounds, setSecure, setVisibility, setZOrderMediaOverlay,
+ setZOrderOnTop
addChildrenForAccessibility,
+ addExtraDataToAccessibilityNodeInfo, addFocusables,
+ addFocusables, addKeyboardNavigationClusters,
+ addOnAttachStateChangeListener, addOnLayoutChangeListener,
+ addOnUnhandledKeyEventListener, addTouchables, animate,
+ announceForAccessibility, autofill, autofill, awakenScrollBars,
+ awakenScrollBars, awakenScrollBars, bringToFront,
+ buildDrawingCache, buildDrawingCache, buildLayer, callOnClick,
+ cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents,
+ canResolveLayoutDirection, canResolveTextAlignment,
+ canResolveTextDirection, canScrollHorizontally,
+ canScrollVertically, checkInputConnectionProxy, clearAnimation,
+ clearFocus, combineMeasuredStates,
+ computeHorizontalScrollExtent, computeHorizontalScrollOffset,
+ computeHorizontalScrollRange, computeScroll,
+ computeSystemWindowInsets, computeVerticalScrollExtent,
+ computeVerticalScrollOffset, computeVerticalScrollRange,
+ createAccessibilityNodeInfo, createContextMenu,
+ destroyDrawingCache, dispatchApplyWindowInsets,
+ dispatchCapturedPointerEvent, dispatchConfigurationChanged,
+ dispatchDisplayHint, dispatchDragEvent,
+ dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach,
+ dispatchGenericFocusedEvent, dispatchGenericMotionEvent,
+ dispatchGenericPointerEvent, dispatchHoverEvent,
+ dispatchKeyEvent, dispatchKeyEventPreIme,
+ dispatchKeyShortcutEvent, dispatchNestedFling,
+ dispatchNestedPreFling,
+ dispatchNestedPrePerformAccessibilityAction,
+ dispatchNestedPreScroll, dispatchNestedScroll,
+ dispatchPointerCaptureChanged,
+ dispatchPopulateAccessibilityEvent,
+ dispatchProvideAutofillStructure, dispatchProvideStructure,
+ dispatchRestoreInstanceState, dispatchSaveInstanceState,
+ dispatchSetActivated, dispatchSetPressed, dispatchSetSelected,
+ dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged,
+ dispatchTouchEvent, dispatchTrackballEvent,
+ dispatchUnhandledMove, dispatchVisibilityChanged,
+ dispatchWindowFocusChanged, dispatchWindowInsetsAnimationEnd,
+ dispatchWindowInsetsAnimationPrepare,
+ dispatchWindowInsetsAnimationProgress,
+ dispatchWindowInsetsAnimationStart,
+ dispatchWindowSystemUiVisiblityChanged,
+ dispatchWindowVisibilityChanged, drawableHotspotChanged,
+ drawableStateChanged, findFocus, findViewById,
+ findViewsWithText, findViewWithTag, fitSystemWindows,
+ focusSearch, forceHasOverlappingRendering, forceLayout,
+ generateViewId, getAccessibilityClassName,
+ getAccessibilityDelegate, getAccessibilityLiveRegion,
+ getAccessibilityNodeProvider, getAccessibilityPaneTitle,
+ getAccessibilityTraversalAfter, getAccessibilityTraversalBefore,
+ getAlpha, getAnimation, getAnimationMatrix,
+ getApplicationWindowToken, getAttributeResolutionStack,
+ getAttributeSourceResourceMap, getAutofillHints, getAutofillId,
+ getAutofillType, getAutofillValue, getBackground,
+ getBackgroundTintBlendMode, getBackgroundTintList,
+ getBackgroundTintMode, getBaseline, getBottom,
+ getBottomFadingEdgeStrength, getBottomPaddingOffset,
+ getCameraDistance, getClipBounds, getClipBounds,
+ getClipToOutline, getContentCaptureSession,
+ getContentDescription, getContext, getContextMenuInfo,
+ getDefaultFocusHighlightEnabled, getDefaultSize, getDisplay,
+ getDrawableState, getDrawingCache, getDrawingCache,
+ getDrawingCacheBackgroundColor, getDrawingCacheQuality,
+ getDrawingRect, getDrawingTime, getElevation, getExplicitStyle,
+ getFilterTouchesWhenObscured, getFitsSystemWindows,
+ getFocusable, getFocusables, getFocusedRect, getForeground,
+ getForegroundGravity, getForegroundTintBlendMode,
+ getForegroundTintList, getForegroundTintMode,
+ getGlobalVisibleRect, getGlobalVisibleRect, getHandler,
+ getHasOverlappingRendering, getHeight, getHitRect,
+ getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight,
+ getHorizontalScrollbarThumbDrawable,
+ getHorizontalScrollbarTrackDrawable, getId,
+ getImportantForAutofill, getImportantForContentCapture,
+ getKeepScreenOn, getKeyDispatcherState, getLabelFor,
+ getLayerType, getLayoutDirection, getLayoutParams, getLeft,
+ getLeftFadingEdgeStrength, getLeftPaddingOffset,
+ getLocalVisibleRect, getLocationInSurface, getLocationInWindow,
+ getLocationOnScreen, getMatrix, getMeasuredHeight,
+ getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth,
+ getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth,
+ getNextClusterForwardId, getNextFocusDownId,
+ getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId,
+ getNextFocusUpId, getOnFocusChangeListener,
+ getOutlineAmbientShadowColor, getOutlineProvider,
+ getOutlineSpotShadowColor, getOverlay, getOverScrollMode,
+ getPaddingBottom, getPaddingEnd, getPaddingLeft,
+ getPaddingRight, getPaddingStart, getPaddingTop, getParent,
+ getParentForAccessibility, getPivotX, getPivotY, getPointerIcon,
+ getResources, getRevealOnFocusHint, getRight,
+ getRightFadingEdgeStrength, getRightPaddingOffset, getRootView,
+ getRootWindowInsets, getRotation, getRotationX, getRotationY,
+ getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade,
+ getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle,
+ getScrollIndicators, getScrollX, getScrollY, getSolidColor,
+ getSourceLayoutResId, getStateDescription, getStateListAnimator,
+ getSuggestedMinimumHeight, getSuggestedMinimumWidth,
+ getSystemGestureExclusionRects, getSystemUiVisibility, getTag,
+ getTag, getTextAlignment, getTextDirection, getTooltipText,
+ getTop, getTopFadingEdgeStrength, getTopPaddingOffset,
+ getTouchables, getTouchDelegate, getTransitionAlpha,
+ getTransitionName, getTranslationX, getTranslationY,
+ getTranslationZ, getUniqueDrawingId,
+ getVerticalFadingEdgeLength, getVerticalScrollbarPosition,
+ getVerticalScrollbarThumbDrawable,
+ getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth,
+ getViewTreeObserver, getVisibility, getWidth,
+ getWindowAttachCount, getWindowId, getWindowInsetsController,
+ getWindowSystemUiVisibility, getWindowToken,
+ getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY,
+ getZ, hasExplicitFocusable, hasFocus, hasFocusable,
+ hasNestedScrollingParent, hasOnClickListeners,
+ hasOnLongClickListeners, hasOverlappingRendering,
+ hasPointerCapture, hasTransientState, hasWindowFocus, inflate,
+ invalidate, invalidate, invalidate, invalidateDrawable,
+ invalidateOutline, isAccessibilityFocused,
+ isAccessibilityHeading, isActivated, isAttachedToWindow,
+ isClickable, isContextClickable, isDirty, isDrawingCacheEnabled,
+ isDuplicateParentStateEnabled, isEnabled, isFocusable,
+ isFocusableInTouchMode, isFocused, isFocusedByDefault,
+ isForceDarkAllowed, isHapticFeedbackEnabled,
+ isHardwareAccelerated, isHorizontalFadingEdgeEnabled,
+ isHorizontalScrollBarEnabled, isHovered,
+ isImportantForAccessibility, isImportantForAutofill,
+ isImportantForContentCapture, isInEditMode, isInLayout,
+ isInTouchMode, isKeyboardNavigationCluster, isLaidOut,
+ isLayoutDirectionResolved, isLayoutRequested, isLongClickable,
+ isNestedScrollingEnabled, isOpaque, isPaddingOffsetRequired,
+ isPaddingRelative, isPivotSet, isPressed, isSaveEnabled,
+ isSaveFromParentEnabled, isScreenReaderFocusable,
+ isScrollbarFadingEnabled, isScrollContainer, isSelected,
+ isShowingLayoutBounds, isShown, isSoundEffectsEnabled,
+ isTemporarilyDetached, isTextAlignmentResolved,
+ isTextDirectionResolved, isVerticalFadingEdgeEnabled,
+ isVerticalScrollBarEnabled, isVisibleToUserForAutofill,
+ jumpDrawablesToCurrentState, keyboardNavigationClusterSearch,
+ layout, measure, mergeDrawableStates, offsetLeftAndRight,
+ offsetTopAndBottom, onAnimationEnd, onAnimationStart,
+ onApplyWindowInsets, onCancelPendingInputEvents,
+ onCapturedPointerEvent, onCheckIsTextEditor,
+ onConfigurationChanged, onCreateContextMenu,
+ onCreateDrawableState, onCreateInputConnection, onDisplayHint,
+ onDragEvent, onDraw, onDrawForeground, onDrawScrollBars,
+ onFilterTouchEventForSecurity, onFinishInflate,
+ onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent,
+ onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent,
+ onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress,
+ onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onLayout,
+ onOverScrolled, onPointerCaptureChange,
+ onPopulateAccessibilityEvent, onProvideAutofillStructure,
+ onProvideAutofillVirtualStructure,
+ onProvideContentCaptureStructure, onProvideStructure,
+ onProvideVirtualStructure, onResolvePointerIcon,
+ onRestoreInstanceState, onRtlPropertiesChanged,
+ onSaveInstanceState, onScreenStateChanged, onScrollChanged,
+ onSetAlpha, onStartTemporaryDetach, onTouchEvent,
+ onTrackballEvent, onVisibilityAggregated, onVisibilityChanged,
+ onWindowFocusChanged, onWindowSystemUiVisibilityChanged,
+ overScrollBy, performAccessibilityAction, performClick,
+ performContextClick, performContextClick, performHapticFeedback,
+ performHapticFeedback, performLongClick, performLongClick,
+ playSoundEffect, post, postDelayed, postInvalidate,
+ postInvalidate, postInvalidateDelayed, postInvalidateDelayed,
+ postInvalidateOnAnimation, postInvalidateOnAnimation,
+ postOnAnimation, postOnAnimationDelayed, refreshDrawableState,
+ releasePointerCapture, removeCallbacks,
+ removeOnAttachStateChangeListener, removeOnLayoutChangeListener,
+ removeOnUnhandledKeyEventListener, requestApplyInsets,
+ requestFitSystemWindows, requestFocus, requestFocus,
+ requestFocus, requestFocusFromTouch, requestLayout,
+ requestPointerCapture, requestRectangleOnScreen,
+ requestRectangleOnScreen, requestUnbufferedDispatch,
+ requestUnbufferedDispatch, requireViewById, resetPivot,
+ resolveSize, resolveSizeAndState, restoreDefaultFocus,
+ restoreHierarchyState, saveAttributeDataForStyleable,
+ saveHierarchyState, scheduleDrawable, scrollBy, scrollTo,
+ sendAccessibilityEvent, sendAccessibilityEventUnchecked,
+ setAccessibilityDelegate, setAccessibilityHeading,
+ setAccessibilityLiveRegion, setAccessibilityPaneTitle,
+ setAccessibilityTraversalAfter, setAccessibilityTraversalBefore,
+ setActivated, setAnimation, setAnimationMatrix,
+ setAutofillHints, setAutofillId, setBackground,
+ setBackgroundColor, setBackgroundDrawable,
+ setBackgroundResource, setBackgroundTintBlendMode,
+ setBackgroundTintList, setBackgroundTintMode, setBottom,
+ setCameraDistance, setClickable, setClipToOutline,
+ setContentCaptureSession, setContentDescription,
+ setContextClickable, setDefaultFocusHighlightEnabled,
+ setDrawingCacheBackgroundColor, setDrawingCacheEnabled,
+ setDrawingCacheQuality, setDuplicateParentStateEnabled,
+ setElevation, setEnabled, setFadingEdgeLength,
+ setFilterTouchesWhenObscured, setFitsSystemWindows,
+ setFocusable, setFocusable, setFocusableInTouchMode,
+ setFocusedByDefault, setForceDarkAllowed, setForeground,
+ setForegroundGravity, setForegroundTintBlendMode,
+ setForegroundTintList, setForegroundTintMode,
+ setHapticFeedbackEnabled, setHasTransientState,
+ setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled,
+ setHorizontalScrollbarThumbDrawable,
+ setHorizontalScrollbarTrackDrawable, setHovered, setId,
+ setImportantForAccessibility, setImportantForAutofill,
+ setImportantForContentCapture, setKeepScreenOn,
+ setKeyboardNavigationCluster, setLabelFor, setLayerPaint,
+ setLayerType, setLayoutDirection, setLayoutParams, setLeft,
+ setLeftTopRightBottom, setLongClickable, setMeasuredDimension,
+ setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled,
+ setNextClusterForwardId, setNextFocusDownId,
+ setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId,
+ setNextFocusUpId, setOnApplyWindowInsetsListener,
+ setOnCapturedPointerListener, setOnClickListener,
+ setOnContextClickListener, setOnCreateContextMenuListener,
+ setOnDragListener, setOnFocusChangeListener,
+ setOnGenericMotionListener, setOnHoverListener,
+ setOnKeyListener, setOnLongClickListener,
+ setOnScrollChangeListener,
+ setOnSystemUiVisibilityChangeListener, setOnTouchListener,
+ setOutlineAmbientShadowColor, setOutlineProvider,
+ setOutlineSpotShadowColor, setOverScrollMode, setPadding,
+ setPaddingRelative, setPivotX, setPivotY, setPointerIcon,
+ setPressed, setRevealOnFocusHint, setRight, setRotation,
+ setRotationX, setRotationY, setSaveEnabled,
+ setSaveFromParentEnabled, setScaleX, setScaleY,
+ setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade,
+ setScrollBarFadeDuration, setScrollbarFadingEnabled,
+ setScrollBarSize, setScrollBarStyle, setScrollContainer,
+ setScrollIndicators, setScrollIndicators, setScrollX,
+ setScrollY, setSelected, setSoundEffectsEnabled,
+ setStateDescription, setStateListAnimator,
+ setSystemGestureExclusionRects, setSystemUiVisibility, setTag,
+ setTag, setTextAlignment, setTextDirection, setTooltipText,
+ setTop, setTouchDelegate, setTransitionAlpha, setTransitionName,
+ setTransitionVisibility, setTranslationX, setTranslationY,
+ setTranslationZ, setVerticalFadingEdgeEnabled,
+ setVerticalScrollBarEnabled, setVerticalScrollbarPosition,
+ setVerticalScrollbarThumbDrawable,
+ setVerticalScrollbarTrackDrawable, setWillNotCacheDrawing,
+ setWillNotDraw, setWindowInsetsAnimationCallback, setX, setY,
+ setZ, showContextMenu, showContextMenu, startActionMode,
+ startActionMode, startAnimation, startDrag, startDragAndDrop,
+ startNestedScroll, stopNestedScroll, toString,
+ transformMatrixToGlobal, transformMatrixToLocal,
+ unscheduleDrawable, unscheduleDrawable, updateDragShadow,
+ verifyDrawable, willNotCacheDrawing, willNotDraw
clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, wait, wait, wait
public TimeRecordView(android.content.Context context, + Track track)+
protected void onSizeChanged(int w, + int h, + int oldw, + int oldh)+
onSizeChanged
in class android.view.View
+ w
- new widthh
- new heightoldw
- old widtholdh
- old heightpublic class Track
+extends java.util.Observable
+ Modifier and Type | +Field and Description | +
---|---|
protected float |
+ brakeProb
+ currently configured brake probability for
+ all vehicles
+
+ |
+
protected float |
+ delayedAvg
+ average over all velocities in the
+ simulation, ignoring the first ten steps
+
+ |
+
protected int |
+ historyLength
+ length of the history kept
+ |
+
protected float |
+ lastAvg
+ average over all velocities in the last
+ step
+
+ |
+
protected
+ java.util.concurrent.Semaphore |
+ listSemaphore
+ semaphore protecting the vtrlist
+ |
+
protected float |
+ maxVelocity
+ currently configured max velocity for all
+ vehicles
+
+ |
+
protected float |
+ overallAvg
+ average over all velocities in the
+ simulation
+
+ |
+
protected long |
+ steps
+ counter for executed simulation steps
+ |
+
protected float |
+ sumAvgMemory
+ sum of all vehicle speeds during the
+ simulation, used for average calculation
+
+ |
+
protected float |
+ sumDelAvgMemory
+ sum of all vehicle speeds during the
+ simulation ignoring the first ten steps,
+ used for average calculation
+
+ |
+
protected float |
+ trackLength
+ length of the track
+ |
+
protected java.util.List<Vehicle>
+ |
+ vehicles
+ list a vehicles on the track
+ |
+
protected java.util.List<java.util.List<VehicleTimeRecord>>
+ |
+ vtrList
+ list of resulting time records of the
+ simulation
+
+ |
+
protected int |
+ waitTime
+ current configured wait time between two
+ simulation steps
+
+ |
+
Constructor and Description | +
---|
Track(int numberVehicles,
+ float trackLength,
+ float brakeProb,
+ float maxVelocity,
+ int waitTime,
+ int historyLength)
+ Constructor for a new Track.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
float |
+ avg_step(int step)
+ Returns the average velocity of the given
+ simulation step.
+
+ |
+
protected java.util.List<Vehicle>
+ |
+ createVehiclesList(int numberVehicles)
+ Utility function to add vehicles to the
+ Track.
+
+ |
+
float |
+ getDelayedAvg()
+ Getter for delayedAvg
+ |
+
int |
+ getHistoryLength()
+ Getter for historyLength
+ |
+
float |
+ getLastAvg()
+ Getter for lastAvg
+ |
+
java.util.concurrent.Semaphore
+ |
+ getListSemaphore()
+ Getter for listSemaphore
+ |
+
float |
+ getOverallAvg()
+ Getter for overallAvg
+ |
+
long |
+ getSteps()
+ Getter for steps
+ |
+
float |
+ getTrackLength()
+ Getter for trackLength
+ |
+
java.util.List<Vehicle>
+ |
+ getVehicles()
+ Getter for vehicles
+ |
+
java.util.List<java.util.List<VehicleTimeRecord>>
+ |
+ getVtrList()
+ Getter for vtrList
+ |
+
void |
+ setBrakeProb(float brakeProb)
+ Update the brake probability of all
+ vehicles.
+
+ |
+
void |
+ setMaxVelocity(float maxVelocity)
+ Update the maximum velocity of all
+ vehicles.
+
+ |
+
void |
+ setWaitTime(int waitTime)
+ Update the wait time of the simulation.
+ |
+
void |
+ timeElapse()
+ Calculates on simulation step ahead and then
+ waits for the configured wait time.
+
+ |
+
protected void |
+ update_avg()
+ Utility function which updates the averages
+ values with the results from the last simulation
+ step.
+
+ |
+
addObserver, clearChanged, countObservers, deleteObserver,
+ deleteObservers, hasChanged, notifyObservers, notifyObservers,
+ setChanged
clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
protected java.util.List<Vehicle> vehicles+
protected java.util.List<java.util.List<VehicleTimeRecord>> vtrList+
protected float trackLength+
protected float sumAvgMemory+
protected float sumDelAvgMemory+
protected int historyLength+
protected float overallAvg+
protected float delayedAvg+
protected float lastAvg+
protected int waitTime+
protected float maxVelocity+
protected float brakeProb+
protected long steps+
protected java.util.concurrent.Semaphore listSemaphore+
public Track(int numberVehicles, + float trackLength, + float brakeProb, + float maxVelocity, + int waitTime, + int historyLength)+
numberVehicles
- number of vehicles on the
+ Track
+ trackLength
- length of the new TrackbrakeProb
- probability of a vehicle to
+ suddenly brake without reason
+ maxVelocity
- maxmimum velocity of the vehicles
+ waitTime
- time between two simulation steps to
+ slow down the simulation artificially
+ historyLength
- length of the history to keep
+ public java.util.List<java.util.List<VehicleTimeRecord>> getVtrList()+
public float getOverallAvg()+
public float getLastAvg()+
public float getDelayedAvg()+
public java.util.List<Vehicle> getVehicles()+
public float getTrackLength()+
public long getSteps()+
public java.util.concurrent.Semaphore getListSemaphore()+
public int getHistoryLength()+
protected java.util.List<Vehicle> createVehiclesList(int numberVehicles)+
numberVehicles
- number of vehicles to addpublic void setWaitTime(int waitTime)+
waitTime
- new wait time in mspublic void setBrakeProb(float brakeProb)+
brakeProb
- new brake probabilitypublic void setMaxVelocity(float maxVelocity)+
maxVelocity
- new maximum velocitypublic void timeElapse()+
public float avg_step(int step)+
step
- index of the step in the history list
+ protected void update_avg()+
public class Vehicle
+extends java.lang.Object
+ Modifier and Type | +Field and Description | +
---|---|
protected float |
+ brakeProb
+ probability of the vehicle to brake without
+ reason
+
+ |
+
protected float |
+ curVelocity
+ current velocity of the vehicle
+ |
+
protected int |
+ id
+ a number to index the vehicle
+ |
+
protected float |
+ maxVelocity
+ maximum velocity of the vehicle
+ |
+
protected float |
+ position
+ current position of the vehicle on the
+ track
+
+ |
+
protected float |
+ trackLength
+ length of the track the vehicle is placed
+ on
+
+ |
+
Constructor and Description | +
---|
Vehicle(int id,
+ int position,
+ float maxVelocity,
+ float brakeProb,
+ float trackLength)
+ Constructs a new vehicle.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
float |
+ getCurVelocity()
+ Getter for curVelocity
+ |
+
float |
+ getMaxVelocity()
+ Getter for maxVelocity
+ |
+
float |
+ getPosition()
+ Getter for position
+ |
+
void |
+ setBrakeProb(float brakeProb)
+ Setter for brakeProb
+ |
+
void |
+ setMaxVelocity(float maxVelocity)
+ Setter for maxVelocity
+ |
+
void |
+ timeElapse()
+ Updates the position of the vehicle according
+ to it's previously calculated speed.
+
+ |
+
void |
+ updateVelocity(float distanceForerunner)
+ Calculates the new velocity of the vehicle
+ based on the following rules:
+
+ Increase by one if the vehicle is slower than it's maximum
+ speed
+ Random brake by one
+ Break if the distance to the forerunner is less than it's
+ speed
+
+ |
+
clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
protected int id+
protected float position+
protected float curVelocity+
protected float maxVelocity+
protected float brakeProb+
protected float trackLength+
public Vehicle(int id, + int position, + float maxVelocity, + float brakeProb, + float trackLength)+
id
- a number to index the vehicleposition
- current position of the vehicle on
+ the track
+ maxVelocity
- maximum velocity of the vehicle
+ brakeProb
- probability of the vehicle to brake
+ without reason
+ trackLength
- length of the track the vehicle
+ is placed on
+ public float getPosition()+
public float getCurVelocity()+
public float getMaxVelocity()+
public void setBrakeProb(float brakeProb)+
public void setMaxVelocity(float maxVelocity)+
public void updateVelocity(float distanceForerunner)+
distanceForerunner
- distance to the forerunner
+ of the vehicle
+ public void timeElapse()+
public class VehicleTimeRecord
+extends java.lang.Object
+ Modifier and Type | +Field and Description | +
---|---|
protected int |
+ id
+ the id of the vehicle it belongs to
+ |
+
protected float |
+ maxVelocity
+ the maximum velocity of the vehicle
+ |
+
protected float |
+ position
+ the position of the vehicle after the last
+ simulation step
+
+ |
+
protected float |
+ velocity
+ the velocity of the vehicle during the last
+ simulation step
+
+ |
+
Constructor and Description | +
---|
VehicleTimeRecord(int id,
+ float position,
+ float velocity,
+ float maxVelocity)
+ Construct a new VehicleTimeRecord.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
float |
+ getMaxVelocity()
+ |
+
float |
+ getPosition()
+ |
+
float |
+ getVelocity()
+ |
+
clone, equals, finalize, getClass, hashCode, notify,
+ notifyAll, toString, wait, wait, wait
protected int id+
protected float position+
protected float velocity+
protected float maxVelocity+
public VehicleTimeRecord(int id, + float position, + float velocity, + float maxVelocity)+
id
- the id of the vehicle it belongs toposition
- the position of the vehicle after
+ the last simulation step
+ velocity
- the velocity of the vehicle during
+ the last simulation step
+ maxVelocity
- the maximum velocity of the
+ vehicle
+ public class Worker
+extends java.lang.Thread
+ java.lang.Thread.State,
+ java.lang.Thread.UncaughtExceptionHandler
Modifier and Type | +Field and Description | +
---|---|
protected int |
+ frameskip
+ Amount of simulation steps between two frames
+ in the view.
+
+ |
+
protected MainActivity
+ |
+ gui
+ the MainActivity of the gui
+ |
+
protected Renderer |
+ renderer
+ the Renderer drawing the Track
+ |
+
protected boolean |
+ stop
+ Stop flag, indicating that the worker shall
+ stop
+
+ |
+
protected Track |
+ track
+ the track to simulate
+ |
+
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description | +
---|
Worker(Track track,
+ MainActivity gui,
+ Renderer renderer,
+ int frameskip)
+ Construct a new worker.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+ run()
+ Method which is automatically executed when
+ the thread is started.
+
+ |
+
void |
+ setFrameskip(int frames)
+ Updates the amount of simulation steps
+ between to view frames.
+
+ |
+
void |
+ setStop(boolean stop)
+ Sets a flag that causes the worker to stop.
+
+ |
+
activeCount, checkAccess, clone, countStackFrames,
+ currentThread, destroy, dumpStack, enumerate, getAllStackTraces,
+ getContextClassLoader, getDefaultUncaughtExceptionHandler,
+ getId, getName, getPriority, getStackTrace, getState,
+ getThreadGroup, getUncaughtExceptionHandler, holdsLock,
+ interrupt, interrupted, isAlive, isDaemon, isInterrupted, join,
+ join, join, resume, setContextClassLoader, setDaemon,
+ setDefaultUncaughtExceptionHandler, setName, setPriority,
+ setUncaughtExceptionHandler, sleep, sleep, start, stop, stop,
+ suspend, toString, yield
equals, finalize, getClass, hashCode, notify, notifyAll, wait,
+ wait, wait
protected Track track+
protected boolean stop+
protected MainActivity gui+
protected Renderer renderer+
protected int frameskip+
public Worker(Track track, + MainActivity gui, + Renderer renderer, + int frameskip)+
track
- the track to simulategui
- the MainActivity of the guirenderer
- the Renderer drawing the Trackframeskip
- Amount of simulation steps between
+ two frames in the view. Zero means
+ that every simulation step is drawn
+ public void setStop(boolean stop)+
stop
- flag whether the thread shall stoppublic void setFrameskip(int frames)+
frames
- amount of stepspublic void run()+
run
in interface java.lang.Runnable
+ run
in
+ class java.lang.Thread
Class | +Description | +
---|---|
MainActivity + | +
+ Main user interface class, containing all necessary gui
+ elements and their control flow.
+
+ |
+
Renderer | +
+ User interface class rendering the track history on a
+ SurfaceView.
+
+ |
+
TimeRecordView + | +
+ A Surface View which servers as a stage for a renderer.
+
+ |
+
Track | +
+ Main model class of TrafficSim.
+ |
+
Vehicle | +
+ Model class which represents a vehicle in the
+ simulation.
+
+ |
+
VehicleTimeRecord | +
+ Model class which keeps the previous simulation data for
+ analysis.
+
+ |
+
Worker | +
+ Calculation thread, which runs the simulation itself and
+ also updates the view with a set rate.
+
+ |
+
Each package has a page that contains a list of its classes and interfaces, with a + summary for each. This page can contain six categories:
+Each class, interface, nested class and nested interface has its own separate page. + Each of these pages has three sections consisting of a class/interface description, + summary tables, and detailed member descriptions:
+Each summary entry contains the first sentence from the detailed description for that + item. The summary entries are alphabetical, while the detailed descriptions are in + the order they appear in the source code. This preserves the logical groupings + established by the programmer.
+Each annotation type has its own separate page with the following sections:
+Each enum has its own separate page with the following sections:
+There is a Class Hierarchy page for all packages,
+ plus a hierarchy for each package. Each hierarchy page contains a list of classes
+ and a list of interfaces. The classes are organized by inheritance structure
+ starting with java.lang.Object
. The interfaces do not inherit from
+ java.lang.Object
.
The Deprecated API page lists all of the API that + have been deprecated. A deprecated API is not recommended for use, generally due to + improvements, and a replacement API is usually given. Deprecated APIs may be removed + in future implementations.
+The Index contains an alphabetic list of all + classes, interfaces, constructors, methods, and fields.
+These links take you to the next or previous class, interface, package, or related + page.
+These links show and hide the HTML frames. All pages are available with or without + frames.
+The All Classes link shows all classes and + interfaces except non-static nested types.
+Each serializable or externalizable class has a description of its serialization + fields and methods. This information is of interest to re-implementors, not to + developers using the API. While there is no link in the navigation bar, you can get + to this information by going to any serialized class and clicking "Serialized Form" + in the "See also" section of the class description.
+The Constant Field Values page lists the static + final fields and their values.
+