私はSWTを使用してレイアウトを作成することにかなり慣れています。これは私が SWTレイアウトの作成
を作成する必要があり、これはこれまでのところ、私の試みは何かということです:
コード:
private void createContents(final Shell shell) {
shell.setLayout(new GridLayout(2,true));
/// Side Panel
Composite sideComposite = new Composite(shell, SWT.NONE);
sideComposite.setLayout(new RowLayout(SWT.VERTICAL | SWT.BORDER));
Label codeLabel = new Label(sideComposite, SWT.NONE);
codeLabel.setText("Folders");
// Create list of folders
Composite foldersComposite = new Composite(sideComposite, SWT.NONE);
foldersComposite.setLayout(new GridLayout(2,true));
createFoldersComposite(foldersComposite);
// Create tags
Composite tagsComposite = new Composite(sideComposite, SWT.NONE);
tagsComposite.setLayout(new RowLayout());
createTagsComposte(tagsComposite);
/// .Side Panel
/// Main Panel
Composite mainComposite = new Composite(shell, SWT.NONE);
mainComposite.setLayout(new RowLayout(SWT.VERTICAL));
// Create search field
Composite searchComposite = new Composite(mainComposite, SWT.NONE);
searchComposite.setLayout(new GridLayout(2,true));
Label searchLabel = new Label(searchComposite, SWT.NONE);
searchLabel.setText("Search");
GridData gridData = new GridData();
gridData.horizontalSpan = 1;
searchLabel.setLayoutData(gridData);
Text searchText = new Text(mainComposite, SWT.BORDER | SWT.V_SCROLL);
searchLabel.setLayoutData(gridData);
// Create search result
Composite resultComposite = new Composite(mainComposite, SWT.BORDER);
resultComposite.setLayout(new GridLayout(2,true));
createResultComposite(resultComposite);
// Code Review
Text codeText = new Text(mainComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
codeText.setSize(500, 500);
/// .Main Panel
}
質問:どのように私は、正確なレイアウトを持つことが、私の既存のコードを修正することができますが欲しいです ?
何が質問ですか? –