Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2008-01-02 13:16:07 -0500
committerslewis2008-01-02 13:16:07 -0500
commitb4f5ecb3f273de97b2e0590aea00e07e893d71f9 (patch)
treef8f634d6e520990637c2650045c444a486c5c50f /examples
parent71a9da9297db0e73e55f76cdb0bceda2eb66b80a (diff)
downloadorg.eclipse.ecf-b4f5ecb3f273de97b2e0590aea00e07e893d71f9.tar.gz
org.eclipse.ecf-b4f5ecb3f273de97b2e0590aea00e07e893d71f9.tar.xz
org.eclipse.ecf-b4f5ecb3f273de97b2e0590aea00e07e893d71f9.zip
Put back delay into screen capturev20080102-1456
Diffstat (limited to 'examples')
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java10
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java2
2 files changed, 8 insertions, 4 deletions
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java
index 3dad3741a..98997833c 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java
@@ -58,6 +58,10 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.ViewPart;
public class EclipseCollabSharedObject extends GenericSharedObject {
+ /**
+ *
+ */
+ private static final int MAX_MESSAGE_SIZE = 8096;
private static final String HANDLE_SHOW_VIEW_MSG = "handleShowView";
private static final String HANDLE_SHOW_VIEW_WITH_ID_MSG = "handleShowViewWithID";
private static final String HANDLE_LAUNCH_EDITOR_FOR_FILE_MSG = "handleLaunchEditorForFile";
@@ -528,13 +532,13 @@ public class EclipseCollabSharedObject extends GenericSharedObject {
try {
forwardMsgTo(toID, SharedObjectMsg.createMsg(null, HANDLE_SHOW_IMAGE_START_MSG, localContainerID, localUser.getNickname(), new ImageWrapper(imageData)));
final byte[] compressedData = compress(imageData.data);
- final ByteArrayOutputStream bos = new ByteArrayOutputStream(8096);
+ final ByteArrayOutputStream bos = new ByteArrayOutputStream(MAX_MESSAGE_SIZE);
int startPos = 0;
while (startPos <= compressedData.length) {
bos.reset();
- final int length = Math.min(compressedData.length - startPos, 8096);
+ final int length = Math.min(compressedData.length - startPos, MAX_MESSAGE_SIZE);
bos.write(compressedData, startPos, length);
- startPos += 8096;
+ startPos += MAX_MESSAGE_SIZE;
bos.flush();
final Boolean done = new Boolean((compressedData.length - startPos) < 0);
forwardMsgTo(toID, SharedObjectMsg.createMsg(null, HANDLE_SHOW_IMAGE_DATA_MSG, localContainerID, bos.toByteArray(), done));
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java
index 8beea8fcd..c9a27844b 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/ChatComposite.java
@@ -541,7 +541,7 @@ public class ChatComposite extends Composite {
private void sendImage(ID targetID) {
final Job job = new ScreenCaptureJob(getDisplay(), targetID);
- job.schedule();
+ job.schedule(5000);
}
private void fillTreeContextMenuUser(IMenuManager man, final User user) {

Back to the top