Changeset 10735
- Timestamp:
- 05/30/11 13:15:50 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
ossiedev/trunk/tools/OEF/src/edu/vt/ossie/editors/OWDEditor.java
r10559 r10735 39 39 import org.eclipse.jface.viewers.TreeViewer; 40 40 import org.eclipse.swt.SWT; 41 import org.eclipse.swt.custom.SashForm; 41 42 import org.eclipse.swt.custom.ScrolledComposite; 42 43 import org.eclipse.swt.dnd.DropTargetEvent; … … 137 138 scroller.setExpandHorizontal(true); 138 139 scroller.setExpandVertical(true); 139 mainWindow = new Composite(scroller, SWT.NONE); 140 mainWindow.setLayout(new GridLayout(2, false)); 141 142 Label resourcesLabel = new Label(mainWindow, SWT.NONE); 140 mainWindow = new SashForm(scroller, SWT.HORIZONTAL); 141 142 mainWindowLeft = new Composite(mainWindow, SWT.BORDER); 143 mainWindowLeft.setLayout(new GridLayout(1, true)); 144 Label resourcesLabel = new Label(mainWindowLeft, SWT.CENTER); 143 145 resourcesLabel.setText("Available Resources"); 146 144 147 //resourcesLabel.setBounds(15, 48, 140, 17); 145 148 resourcesLabel.setLayoutData( 146 149 new GridData(SWT.CENTER, SWT.BOTTOM, true, false)); 147 148 Label waveformLabel = new Label(mainWindow, SWT.NONE); 150 createResourcesTree(mainWindowLeft); 151 152 mainWindowRight = new SashForm(mainWindow, SWT.VERTICAL); 153 154 mainWindowRightTop = new Composite(mainWindowRight, SWT.BORDER); 155 mainWindowRightTop.setLayout(new GridLayout(1, true)); 156 Label waveformLabel = new Label(mainWindowRightTop, SWT.CENTER); 149 157 waveformLabel.setText("Waveform"); 150 158 //waveformLabel.setBounds(445, 7, 77, 23); … … 152 160 new GridData(SWT.CENTER, SWT.BOTTOM, true, false)); 153 161 154 createResourcesTree(mainWindow); 155 createWaveformTree(mainWindow); 156 157 Label platformLabel = new Label(mainWindow, SWT.NONE); 162 163 createWaveformTree(mainWindowRightTop); 164 165 mainWindowRightBottom = new Composite(mainWindowRight, SWT.BORDER); 166 mainWindowRightBottom.setLayout(new GridLayout(1, true)); 167 168 Label platformLabel = new Label(mainWindowRightBottom, SWT.CENTER); 158 169 platformLabel.setText("Platform"); 159 170 platformLabel.setLayoutData( 160 171 new GridData(SWT.CENTER, SWT.BOTTOM, true, false)); 161 172 162 createPlatformTree(mainWindow );163 164 mainWindow.setSize(mainWindow.computeSize(SWT.DEFAULT, SWT.DEFAULT));173 createPlatformTree(mainWindowRightBottom); 174 175 //mainWindow.setSize(mainWindow.computeSize(SWT.DEFAULT, SWT.DEFAULT)); 165 176 parent.setSize(parent.computeSize(SWT.DEFAULT, SWT.DEFAULT)); 166 177 167 scroller.setMinSize(mainWindow.computeSize(SWT.DEFAULT, SWT.DEFAULT));178 //scroller.setMinSize(mainWindow.computeSize(SWT.DEFAULT, SWT.DEFAULT)); 168 179 scroller.setContent(mainWindow); 169 180 … … 754 765 { 755 766 Tree resourcesTree = new Tree(parent, SWT.MULTI | SWT.BORDER); 756 GridData data = new GridData(SWT.FILL, SWT.FILL, true, true , 1, 3);767 GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); 757 768 data.minimumHeight = 200; 758 769 data.minimumWidth = 200; … … 1618 1629 } 1619 1630 } 1631 1632 public boolean isConnectedToFile() 1633 { 1634 return getEditorInput() instanceof IFileEditorInput; 1635 } 1636 1637 // ---------------------------------------------------------- 1638 public IFileEditorInput getFileInput() 1639 { 1640 return isConnectedToFile() 1641 ? (IFileEditorInput)getEditorInput() 1642 : null; 1643 } 1620 1644 1621 1645 … … 2105 2129 protected ResourceTreeViewer waveformTreeViewer; 2106 2130 protected ResourceTreeViewer platformTreeViewer; 2107 private Composite mainWindow; 2131 private SashForm mainWindow; 2132 private Composite mainWindowLeft; 2133 private SashForm mainWindowRight; 2134 private Composite mainWindowRightTop; 2135 private Composite mainWindowRightBottom; 2108 2136 2109 2137 private MainFrame mainFrame;