diff options
| author | kgilmer | 2005-09-03 14:23:30 +0000 |
|---|---|---|
| committer | kgilmer | 2005-09-03 14:23:30 +0000 |
| commit | 6179fbe5489b0615c15eecf4db2644d5882c897a (patch) | |
| tree | 30764eabafcf7f70c8e36bb4a41ea1efec16234d | |
| parent | 0f2586d94b508476fce57bb73c9de2a649389129 (diff) | |
| download | org.eclipse.ecf-6179fbe5489b0615c15eecf4db2644d5882c897a.tar.gz org.eclipse.ecf-6179fbe5489b0615c15eecf4db2644d5882c897a.tar.xz org.eclipse.ecf-6179fbe5489b0615c15eecf4db2644d5882c897a.zip | |
Added margins to readComp for visibility
| -rw-r--r-- | framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/views/ChatRoomView.java | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/views/ChatRoomView.java b/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/views/ChatRoomView.java index 75e9c7376..f4ebc9258 100644 --- a/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/views/ChatRoomView.java +++ b/framework/bundles/org.eclipse.ecf.ui/src/org/eclipse/ecf/ui/views/ChatRoomView.java @@ -24,13 +24,19 @@ import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.events.KeyListener; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Text; import org.eclipse.ui.part.ViewPart; public class ChatRoomView extends ViewPart implements IMessageListener, IParticipantListener, IInvitationListener { - protected static final String DEFAULT_ME_COLOR = "0,255,0"; + private static final int RATIO_WRITE_PANE = 12; + private static final int RATIO_READ_PANE = 88; + private static final int RATIO_READ_WRITE_PANE = 85; + private static final int RATIO_PRESENCE_PANE = 15; + protected static final String DEFAULT_ME_COLOR = "0,255,0"; protected static final String DEFAULT_OTHER_COLOR = "0,0,0"; protected static final String DEFAULT_SYSTEM_COLOR = "0,0,255"; @@ -87,14 +93,17 @@ public class ChatRoomView extends ViewPart implements IMessageListener, IPartici SashForm rightSash = new SashForm(rightComp, SWT.VERTICAL); rightSash.setLayout(new FillLayout()); - - Composite readComp = new Composite(rightSash, SWT.NONE); - readComp.setLayout(new FillLayout()); - //readComp.setLayout(cl); - readText = new TextViewer(readComp, SWT.V_SCROLL | SWT.H_SCROLL - | SWT.WRAP | SWT.BORDER); + Composite readComp = new Composite(rightSash, SWT.BORDER); + readComp.setLayout(new FillLayout()); + Composite readInlayComp = new Composite(readComp, SWT.NONE); + readInlayComp.setLayout(new GridLayout()); + readInlayComp.setLayoutData(new GridData(GridData.FILL_BOTH)); + readInlayComp.setBackground(memberViewer.getList().getBackground()); + readText = new TextViewer(readInlayComp, SWT.V_SCROLL | SWT.H_SCROLL + | SWT.WRAP); readText.setDocument(new Document()); readText.setEditable(false); + readText.getTextWidget().setLayoutData(new GridData(GridData.FILL_BOTH)); Composite writeComp = new Composite(rightSash, SWT.NONE); writeComp.setLayout(new FillLayout()); @@ -109,8 +118,8 @@ public class ChatRoomView extends ViewPart implements IMessageListener, IPartici } }); - form.setWeights(new int[] {15, 85}); - rightSash.setWeights(new int[] {88, 12}); + form.setWeights(new int[] {RATIO_PRESENCE_PANE, RATIO_READ_WRITE_PANE}); + rightSash.setWeights(new int[] {RATIO_READ_PANE, RATIO_WRITE_PANE}); } protected void clearInput() { writeText.setText(""); |
