...
 
Commits (11)
......@@ -4,6 +4,7 @@
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="lib" path="libs/commons-io-2.4.jar"/>
<classpathentry kind="lib" path="libs/feedback_v6.jar"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>TTTCLient</name>
<name>AndroidTTTClient</name>
<comment></comment>
<projects>
</projects>
......
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
sp_cleanup.add_missing_deprecated_annotations=true
sp_cleanup.add_missing_methods=false
sp_cleanup.add_missing_nls_tags=false
sp_cleanup.add_missing_override_annotations=true
sp_cleanup.add_missing_override_annotations_interface_methods=true
sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
sp_cleanup.convert_to_enhanced_for_loop=false
sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=true
sp_cleanup.format_source_code_changes_only=false
sp_cleanup.make_local_variable_final=false
sp_cleanup.make_parameters_final=false
sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.make_variable_declarations_final=true
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=true
sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
sp_cleanup.remove_trailing_whitespaces=false
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true
sp_cleanup.remove_unnecessary_nls_tags=false
sp_cleanup.remove_unused_imports=false
sp_cleanup.remove_unused_local_variables=false
sp_cleanup.remove_unused_private_fields=true
sp_cleanup.remove_unused_private_members=false
sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false
sp_cleanup.use_blocks=false
sp_cleanup.use_blocks_only_for_return_and_throw=false
sp_cleanup.use_parentheses_in_expressions=false
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
sp_cleanup.use_this_for_non_static_method_access=false
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
......@@ -40,7 +40,7 @@
<intent-filter>
<data android:scheme="http" />
<data android:host="ttt.in.tum.de" />
<data android:pathPattern="\\/lectures\\/rss\\.php.*"/>
<data android:pathPattern="\\/lectures\\/ttt-android.*"/>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
......
......@@ -14,3 +14,4 @@
target=android-19
android.library=false
android.library.reference.1=../../Downloads/JakeWharton-ActionBarSherlock-5a15d92/actionbarsherlock
android.library.reference.2=../../Arbeit_workspace/DrawerToggleLibrary
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="3"
android:layout_gravity="center_horizontal">
<ScrollView
android:id="@+id/indexScrollView"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/my_border"
android:fillViewport="false"
android:paddingLeft="5dip"
android:paddingRight="5dip" >
</ScrollView>
<LinearLayout
android:id="@+id/surfaceContainer"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:background="@android:color/black"
android:gravity="center" >
<SurfaceView
android:id="@+id/playerView_extended"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent" >
<SurfaceView
android:id="@+id/playerView_fullscreen"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
/>
</LinearLayout>
......@@ -11,15 +11,15 @@
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center" >
<ImageView
<SurfaceView
android:id="@+id/playerView_fullscreen"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@android:color/black"
android:scaleType="centerInside" />
/>
</LinearLayout>
<LinearLayout
......@@ -37,16 +37,17 @@
android:fillViewport="false"
android:paddingLeft="5dip" >
</ScrollView>
<ImageView
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2">
<SurfaceView
android:id="@+id/playerView_extended"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:background="@drawable/my_border"
android:padding="10dip"
android:scaleType="centerInside"
android:src="@drawable/ic_launcher" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
</LinearLayout>
</ViewSwitcher>
......
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- The main content view -->
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
<LinearLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
<SurfaceView
android:id="@+id/playerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"/>
</LinearLayout>
</LinearLayout>
<ScrollView
android:id="@+id/indexScrollView"
android:layout_gravity="start"
android:layout_width="240dp"
android:layout_height="match_parent"
android:fillViewport="false" />
</android.support.v4.widget.DrawerLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/parentView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<LinearLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true">
<SurfaceView
android:id="@+id/playerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</LinearLayout>
<ScrollView
android:id="@+id/indexScrollView"
android:layout_width="240dp"
android:layout_height="match_parent"
android:visibility="gone"
android:background="@color/trans_black"
android:fillViewport="false"
/>
</RelativeLayout>
\ No newline at end of file
......@@ -10,10 +10,7 @@
<item
android:id="@+id/next"
android:icon="@drawable/abs__ic_go"
android:showAsAction="always"/>
<item
android:id="@+id/extend"
android:icon="@drawable/ic_action_return_from_full_screen"
android:showAsAction="always"/>
android:showAsAction="always" android:title="Next"/>
</menu>
\ No newline at end of file
......@@ -26,5 +26,10 @@
<string name="no_lectures">No Lectures Available</string>
<string name="no_feeds">No Feeds found!!! \n\n Add a feed by clicking on \n + \nin the Actionbar</string>
<string name="watch">Watch Lectures</string>
<color name="light_gray">#66bfbdbd</color>
<color name="trans_blue">#660063d2</color>
<color name="trans_black">#d1212427</color>
<string name="drawer_open">Open Index Navigation</string>
<string name="drawer_close">Close Index Navigation</string>
</resources>
\ No newline at end of file
......@@ -10,6 +10,11 @@
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<style name="android:Theme.MusicPlayer">
<item name="android:textColor">#FFFFFF</item>
</style>
</resources>
\ No newline at end of file
......@@ -36,7 +36,6 @@ import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.AdapterView.OnItemLongClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
......@@ -47,7 +46,7 @@ import de.tum.in.tttclient.R;
/**
* Activity parses feed items at each start via ParseService and stores them in
* the database via FeedItemDbManager. Can download lectures via DOwnloadService
* the database via FeedItemDbManager. Can download lectures via DownloadService
* and start the playback.
*
* @author Thomas Krex
......@@ -150,7 +149,7 @@ public class FeedDetailActivity extends SherlockActivity implements
setContentView(R.layout.feed_details_activity);
// haptic feedback for longclick
myVib = (Vibrator) this.getSystemService(VIBRATOR_SERVICE);
// init progress dialog for showing downloading/unzipping progress
progressDialog = new ProgressDialog(FeedDetailActivity.this);
progressDialog.setIndeterminate(true);
......@@ -170,49 +169,49 @@ public class FeedDetailActivity extends SherlockActivity implements
feedItemLv.setEmptyView(findViewById(R.id.empty));
// displaying items in listview
manager = new FeedItemDbManager(this);
// manager.deleteTable();
// manager.deleteTable();
Cursor cursor = manager.getAllFromDB(feed.getId());
adapter = new SimpleCursorAdapter(this, R.layout.list_feeditems,
cursor, new String[] { FeedItemDbManager.COLUMN_TITLE,
FeedItemDbManager.COLUMN_STATUS ,FeedItemDbManager.COLUMN_DATE}, new int[] {
R.id.itemTitle, R.id.statusIcon,R.id.listHeader });
FeedItemDbManager.COLUMN_STATUS,
FeedItemDbManager.COLUMN_DATE }, new int[] {
R.id.itemTitle, R.id.statusIcon, R.id.listHeader });
// set Binder to change icon depending on download status
adapter.setViewBinder(new SimpleCursorAdapter.ViewBinder() {
@Override
public boolean setViewValue(View view, Cursor cursor,
int columnIndex) {
boolean state=false;
boolean state = false;
// insert month separator
if(view.getId()==R.id.listHeader){
Log.d("VIew Binder", "found header view");
if (view.getId() == R.id.listHeader) {
TextView tx = (TextView) view;
Date currDate= Utils.stringToDate(cursor.getString(cursor.getColumnIndex(FeedItemDbManager.COLUMN_DATE)));
Date prevDate= null;
Date currDate = Utils.stringToDate(cursor.getString(cursor
.getColumnIndex(FeedItemDbManager.COLUMN_DATE)));
Date prevDate = null;
if (cursor.getPosition() > 0 && cursor.moveToPrevious()) {
prevDate = Utils.stringToDate(cursor.getString(cursor.getColumnIndex(FeedItemDbManager.COLUMN_DATE)));
cursor.moveToNext();
}
if(prevDate==null||prevDate.getMonth()!=currDate.getMonth()){
tx.setText(new DateFormatSymbols().getMonths()[currDate.getMonth()]);
tx.setVisibility(View.VISIBLE);
prevDate = Utils.stringToDate(cursor.getString(cursor
.getColumnIndex(FeedItemDbManager.COLUMN_DATE)));
cursor.moveToNext();
}
else{
if (prevDate == null
|| prevDate.getMonth() != currDate.getMonth()) {
tx.setText(new DateFormatSymbols().getMonths()[currDate
.getMonth()]);
tx.setVisibility(View.VISIBLE);
} else {
tx.setVisibility(View.GONE);
}
state=true;
state = true;
}
// change icon depending on status
if (view.getId() == R.id.statusIcon) {
ImageView icon = (ImageView) view;
......@@ -228,7 +227,7 @@ public class FeedDetailActivity extends SherlockActivity implements
(R.drawable.ic_action_download)));
}
state=true;
state = true;
}
......
package tttclient.activities;
import android.content.Context;
import android.util.AttributeSet;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
public class MySurfaceView extends SurfaceView implements
SurfaceHolder.Callback {
private final Context context;
private final SurfaceHolder holder;
public MySurfaceView(Context context, AttributeSet attrs) {
super(context, attrs);
this.context = context;
this.holder = getHolder();
}
@Override
public void surfaceCreated(SurfaceHolder holder) {
}
@Override
public void surfaceChanged(SurfaceHolder holder, int format, int width,
int height) {
// TODO Auto-generated method stub
}
@Override
public void surfaceDestroyed(SurfaceHolder holder) {
// TODO Auto-generated method stub
}
}
......@@ -7,13 +7,15 @@ import tttclient.messages.MessageConsumer;
import tttclient.messages.MessageProducer;
import tttclient.messages.WhiteboardMessage;
import tttclient.messages.annotations.Annotation;
import tttclient.messages.annotations.DeleteAllAnnotation;
import tttclient.messages.annotations.DeleteAnnotation;
import tttclient.utils.BitmapContainer;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.widget.ImageView;
import android.view.SurfaceHolder;
/**
* paint the messages to the bitmap. Bitmap shown in imageview. Annotations and
......@@ -26,7 +28,7 @@ import android.widget.ImageView;
public class GraphicsContext implements MessageConsumer {
private final BitmapContainer bitmapContainer;
private ImageView imgView;
private SurfaceHolder holder;
private boolean refreshEnabled = false;
private final MessageProducer producer;
......@@ -37,19 +39,18 @@ public class GraphicsContext implements MessageConsumer {
private final byte[] hextile_fg_encoded;
private final int[] pixels;
public GraphicsContext(ImageView imgV, Recording record) {
setImageView(imgV);
public GraphicsContext(SurfaceHolder holder, Recording record) {
this.holder = holder;
this.producer = record;
this.recording = record;
producer.addMessageConsumer(this);
this.prefs = record.getProtocolPreferences();
this.bitmapContainer = new BitmapContainer(Bitmap.createBitmap(
prefs.framebufferWidth, prefs.framebufferHeight,
Config.ARGB_4444));
this.pixels = bitmapContainer.getPixels();
hextile_bg_encoded = new byte[prefs.bytesPerPixel];
hextile_fg_encoded = new byte[prefs.bytesPerPixel];
......@@ -63,10 +64,6 @@ public class GraphicsContext implements MessageConsumer {
return refreshEnabled;
}
public void setImageView(ImageView imgV) {
this.imgView = imgV;
}
public int[] getPixels() {
return this.pixels;
}
......@@ -87,6 +84,11 @@ public class GraphicsContext implements MessageConsumer {
return hextile_fg_encoded;
}
public void setHolder(SurfaceHolder holder) {
this.holder = null;
this.holder = holder;
}
/**
* Painting of the bitmap is done here. After getting Bitmap from Bitmap
* containing, canvas is created on this bitmap annotations and
......@@ -101,30 +103,22 @@ public class GraphicsContext implements MessageConsumer {
*
*/
public void updateView(boolean setBitmap) {
if (refreshEnabled) {
// get Bitmap without Annotations or highlighted search results
final Bitmap bitmap = bitmapContainer.getBitmap();
// define canvas, which draws in the bitmap
Canvas canvas = new Canvas(bitmap);
Canvas canvas = holder.lockCanvas();
if (canvas != null) {
if (setBitmap) {
canvas.drawBitmap(pixels, 0,
recording.getProtocolPreferences().framebufferWidth, 0,
0, recording.getProtocolPreferences().framebufferWidth,
recording.getProtocolPreferences().framebufferHeight,
false, null);
}
if (isWhiteboardEnabled())
paintWhiteboard(canvas);
paintAnnotations(canvas);
recording.highlightSearchResults(canvas);
if (setBitmap)
imgView.post(new Runnable() {
@Override
public void run() {
// assign bitmap to imageview in UI-Thread
imgView.setImageBitmap(bitmap);
}
});
else
// invalidate ImageView in UI-Thread
imgView.postInvalidate();
holder.unlockCanvasAndPost(canvas);
}
}
......@@ -169,13 +163,22 @@ public class GraphicsContext implements MessageConsumer {
}
/**
* updateView if messages is an Annotation
* Painting of all Messages is done here
*/
@Override
public void handleMessage(Message message) {
// delegates message to corresponding class
message.paint(this);
updateView(false);
// updating Canvas denpending on type of message
if (message instanceof DeleteAllAnnotation
|| message instanceof DeleteAnnotation)
updateView(true);
else if (message instanceof Annotation)
updateView(false);
else
updateView(true);
}
......@@ -192,15 +195,15 @@ public class GraphicsContext implements MessageConsumer {
* @param h
* height of rectangle
*/
// public void handleUpdatedPixels(int x, int y, int w, int h) {
//
// // if recording is adjusting, messages are not painted one by one but
// // only the final image
// if (!recording.adjusting) {
//
// updateView(false);
// }
// }
// public void handleUpdatedPixels(int x, int y, int w, int h) {
//
// // if recording is adjusting, messages are not painted one by one but
// // only the final image
// if (!recording.adjusting) {
//
// updateView(false);
// }
// }
/*******************************************************************************************************************
* Annotations *
......@@ -289,7 +292,7 @@ public class GraphicsContext implements MessageConsumer {
public void setWhiteboardPage(int whiteboardPage) {
this.whiteboardPage = whiteboardPage;
clearAnnotations();
updateView(false);
// updateView(false);
}
// updates for late comers and recorders
......@@ -309,14 +312,4 @@ public class GraphicsContext implements MessageConsumer {
}
public void setBitmap() {
imgView.post(new Runnable() {
@Override
public void run() {
imgView.setImageBitmap(bitmapContainer.getBitmap());
}
});
}
}
\ No newline at end of file
......@@ -74,6 +74,7 @@ public class Index {
private final ScrollView indexViewer;
private final Handler scrollHandler;
public int scrollPos;
int getWidth() {
return recording.getProtocolPreferences().framebufferWidth;
}
......@@ -96,8 +97,7 @@ public class Index {
IndexEntry entry = get(indexNumber - 1);
entry.setBackgroundColor(color);
LinearLayout parent = (LinearLayout) entry.getParent();
scrollPos=parent.getTop() - parent.getHeight()
/ 2;
scrollPos = parent.getTop() - parent.getHeight() / 2;
indexViewer.scrollTo(0, scrollPos);
}
......@@ -362,8 +362,6 @@ public class Index {
// read message
Message message = recording.getMessages().get(message_nr);
int start = message.getTimestamp();
// delete flag
boolean marked_to_be_deleted = false;
......@@ -410,7 +408,8 @@ public class Index {
// set collected annotations
recording.getIndex().get(i).setAnnotations(annotations);
Log.d("Index annotations", "index "+i+" start "+start+" end" +end+" annotations " +annotations.size());
Log.d("Index annotations", "index " + i + " start " + start
+ " end" + end + " annotations " + annotations.size());
// clear buffer if index ended with a delete event, which was not
// performed yet
......@@ -472,11 +471,11 @@ public class Index {
public void initIndexView() {
// needed because scrollview can only have one direct child
LinearLayout layout = new LinearLayout(context);
final LinearLayout layout = new LinearLayout(context);
layout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,
LayoutParams.WRAP_CONTENT));
layout.setOrientation(LinearLayout.VERTICAL);
layout.setBackgroundColor(Color.WHITE);
layout.setBackgroundColor(Color.TRANSPARENT);
int length = size();
......@@ -485,8 +484,14 @@ public class Index {
layout.addView(addTitle(i));
layout.addView(insertEntry(entry));
}
indexViewer.post(new Runnable() {
indexViewer.addView(layout);
@Override
public void run() {
indexViewer.addView(layout);
}
});
}
......@@ -507,6 +512,7 @@ public class Index {
title.setText(String.valueOf(number + 1));
title.setTextAppearance(context, android.R.style.TextAppearance_Large);
title.setTextColor(Color.BLACK);
title.setBackgroundColor(Color.TRANSPARENT);
return title;
}
......@@ -616,6 +622,7 @@ public class Index {
// ///////////////////////////////////////////////////////////////////////////////////
private int lastIndexFired = -1;
public int getLastIndexFired() {
return lastIndexFired;
}
......@@ -629,7 +636,7 @@ public class Index {
*/
public void fireIndexChangedEvent(int indexNumber) {
if (lastIndexFired != indexNumber) {
Log.d("Index Update","index number: "+indexNumber);
Log.d("Index Update", "index number: " + indexNumber);
// highlighting of index entry and scrolling has to be done in ui
// thread
if (lastIndexFired > 0) {
......
......@@ -38,7 +38,7 @@ import tttclient.messages.MessageProducerAdapter;
import android.content.Context;
import android.graphics.Canvas;
import android.media.MediaPlayer;
import android.widget.ImageView;
import android.view.SurfaceHolder;
import android.widget.ScrollView;
/**
......@@ -60,7 +60,7 @@ public class Recording extends MessageProducerAdapter implements Runnable {
private final Messages messages;
private final Index index;
private File tttFile;
private final File tttFile;
public Messages getMessages() {
return messages;
......@@ -79,7 +79,8 @@ public class Recording extends MessageProducerAdapter implements Runnable {
}
public Recording(Context context, File tttFile, MediaPlayer audioPlayer,
ImageView imgV, ScrollView scrollView) throws IOException {
final SurfaceHolder holder, ScrollView scrollView)
throws IOException {
this.tttFile = tttFile;
// read
messages = new Messages(this);
......@@ -90,7 +91,18 @@ public class Recording extends MessageProducerAdapter implements Runnable {
// read messages + extensions
read(this.tttFile);
graphicsContext = new GraphicsContext(imgV, this);
// TODO find new place for this
scrollView.post(new Runnable() {
@Override
public void run() {
holder.setFixedSize(prefs.framebufferWidth,
prefs.framebufferHeight);
}
});
graphicsContext = new GraphicsContext(holder, this);
// compute Index if not available in extensions
if (!index.isValid())
......@@ -441,10 +453,10 @@ public class Recording extends MessageProducerAdapter implements Runnable {
public void setTime(int time, boolean refresh) {
// refresh determine if display is updated or not
// TODO better performance without stopping loop
// loop is stopped due to performance problems
if (!adjusting)
setAdjusting(true);
// if (!adjusting)
// setAdjusting(true);
// paint offscreen
messages.setTime_full_frame_check(time);
......@@ -453,15 +465,12 @@ public class Recording extends MessageProducerAdapter implements Runnable {
// focusCurrentIndexEntry(time);
index.setCorrespondingIndex(time);
setAudioPlayerTime(time);
if (time == 0)
graphicsContext.updateView(true);
else
graphicsContext.updateView(false);
graphicsContext.updateView(true);
}
// while loop is started again
if (adjusting)
setAdjusting(false);
// if (adjusting)
// setAdjusting(false);
}
......@@ -531,4 +540,19 @@ public class Recording extends MessageProducerAdapter implements Runnable {
}
/*******************************************************************************************************************
* Delegating Search *
******************************************************************************************************************/
// delegates search to index and updates the view
public void search(String word) {
if (index != null)
index.search(word);
// update thumbnail to mark new search results
index.updateThumbnails();
// updates the image after searching
graphicsContext.updateView(false);
}
}
\ No newline at end of file
......@@ -51,7 +51,7 @@ public class DeleteAnnotation extends Annotation {
@Override
public void paint(GraphicsContext graphicsContext) {
graphicsContext.removeAnnotationsAt(x, y);
graphicsContext.updateView(false);
}
@Override
......