Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2005-02-20 01:45:27 +0000
committerslewis2005-02-20 01:45:27 +0000
commitfc03720bb3eb5baf97c87b53e2b3dc13595267e2 (patch)
treedd85a97509e45b1ef4f0cb86431526fc115552d2
parent9b69bcefd808ccc930b062b02bff951a86098af0 (diff)
downloadorg.eclipse.ecf-fc03720bb3eb5baf97c87b53e2b3dc13595267e2.tar.gz
org.eclipse.ecf-fc03720bb3eb5baf97c87b53e2b3dc13595267e2.tar.xz
org.eclipse.ecf-fc03720bb3eb5baf97c87b53e2b3dc13595267e2.zip
Added second constructor
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/TeamChat.java39
1 files changed, 38 insertions, 1 deletions
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/TeamChat.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/TeamChat.java
index c920b2f5b..746c7d491 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/TeamChat.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/TeamChat.java
@@ -29,7 +29,7 @@ class TeamChat extends Composite {
LineChatClientView view;
ChatWindow chatWindow;
- static final int DEFAULT_TREE_WIDGET_PERCENT = 40;
+ static final int DEFAULT_TREE_WIDGET_PERCENT = 30;
TeamChat(LineChatClientView view,Composite parent, int options, String initText) {
super(parent, options);
@@ -69,6 +69,43 @@ class TeamChat extends Composite {
}
}
+ TeamChat(LineChatClientView view,Composite parent, int options, String initText, boolean useChatWindow, boolean showTree) {
+ super(parent, options);
+
+ this.view = view;
+ setLayout(new FillLayout());
+ int[] w = null;
+ if (!useChatWindow) {
+ sash = new SashForm(this, SWT.NORMAL);
+ sash.setLayout(new FillLayout());
+ sash.setOrientation(SWT.HORIZONTAL);
+ w = new int[2];
+ w[0] = DEFAULT_TREE_WIDGET_PERCENT;
+ w[1] = 100 - w[0];
+ }
+
+ if (showTree) {
+ treeView =
+ new ChatTreeViewer(
+ useChatWindow ? (Composite) this : (Composite) sash, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+ treeView.setAutoExpandLevel(LineChatClientView.TREE_EXPANSION_LEVELS);
+ vc = new ViewContentProvider(view);
+
+ treeView.setContentProvider(vc);
+ treeView.setLabelProvider(new ViewLabelProvider());
+ treeView.setInput(ResourcesPlugin.getWorkspace());
+ }
+
+ if (useChatWindow) {
+ chatWindow = new ChatWindow(view, this, treeView, initText);
+ chatWindow.create();
+ chat = chatWindow.getChat();
+ } else {
+ chat = new ChatComposite(view, sash, treeView, SWT.NORMAL, initText);
+ sash.setWeights(w);
+ }
+ }
+
void appendText(ChatLine text) {
if (chatWindow != null
&& chatWindow.getShell() != null

Back to the top