本文整理匯總了Java中org.eclipse.swt.custom.SashForm.setLayout方法的典型用法代碼示例。如果您正苦於以下問題:Java SashForm.setLayout方法的具體用法?Java SashForm.setLayout怎麽用?Java SashForm.setLayout使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.swt.custom.SashForm
的用法示例。
在下文中一共展示了SashForm.setLayout方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: DashboardComposite
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
/** {@code key} defines which data source will be used for display. */
public DashboardComposite(String key, Composite parent, int style) {
super(parent, style);
this.key = key;
this.setLayout(new FillLayout());
final SashForm sf = new SashForm(this, SWT.HORIZONTAL);
sf.setLayout(new FillLayout());
this.canvas = new VisualisationCanvas(sf, SWT.NONE);
this.text = new Text(sf, SWT.LEFT | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI);
text.setText("");
createVisualisationControls(sf);
sf.setWeights(new int[] { 45, 45, 10 });
}
示例2: createContent
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
private void createContent() {
toolBar = new ToolBar(this, SWT.HORIZONTAL);
GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
GridLayout layout = new GridLayout();
layout.marginWidth = 0;
layout.marginHeight = 0;
SashForm sashForm = new SashForm(this, SWT.HORIZONTAL);
sashForm.SASH_WIDTH = 2;
sashForm.setLayoutData(layoutData);
sashForm.setLayout(layout);
createLeftPanel(sashForm);
createRightPanel(sashForm);
sashForm.setSashWidth(2);
sashForm.setWeights(new int[] {15, 85});
}
示例3: createDialogArea
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
@Override
protected Control createDialogArea(Composite parent) {
Composite cont = (Composite) super.createDialogArea(parent);
SashForm sash = new SashForm(cont, SWT.HORIZONTAL);
sash.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
sash.setLayout(new GridLayout(2, false));
htrModelsComp = new HtrModelsComposite(sash, 0);
htrModelsComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
Group dictGrp = new Group(sash, SWT.NONE);
dictGrp.setLayout(new GridLayout(1, false));
dictGrp.setText("Dictionary");
htrDictComp = new HtrDictionaryComposite(dictGrp, 0);
htrDictComp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
applyConfig();
sash.setWeights(new int[] { 80, 20 });
return cont;
}
示例4: initFacetSf
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
private void initFacetSf(Group resultsGroup) {
int noOfFacets = 4;
SashForm facetSf = new SashForm(resultsGroup, SWT.HORIZONTAL);
facetSf.setLayout(new GridLayout(1, false));
facetSf.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, noOfFacets, 1));
int[] selection = new int[] { 0 };
noMultiCombos = true;
String[] startItems = new String[] { "All collections" };
collCombo = new MultiSelectionCombo(facetSf, startItems, selection, SWT.NONE, this);
startItems = new String[] { "All documents" };
docCombo = new MultiSelectionCombo(facetSf, startItems, selection, SWT.NONE, this);
startItems = new String[] { "All authors" };
authCombo = new MultiSelectionCombo(facetSf, startItems, selection, SWT.NONE, this);
startItems = new String[] { "All uploaders" };
uplCombo = new MultiSelectionCombo(facetSf, startItems, selection, SWT.NONE, this);
}
示例5: createModuleLocationFormInput
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
private void createModuleLocationFormInput(Composite container) {
Label infPathLabel = new Label(container, SWT.NULL);
infPathLabel.setText("Enter the module's .inf location:");
SashForm form = new SashForm(container, SWT.HORIZONTAL | SWT.NULL);
form.setLayout(new GridLayout(1, false));
form.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
form.setSashWidth(0);
Composite infLocationPathContainer = new Composite(form, SWT.NULL);
infLocationPathContainer.setLayout(new GridLayout(1, false));
infLocationPathContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
infLocationPath = new Text(infLocationPathContainer, SWT.BOLD | SWT.BORDER);
infLocationPath.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
Composite infBrowserBtnContainer = new Composite(form, SWT.NULL);
infBrowserBtnContainer.setLayout(new GridLayout(1, false));
infBrowserBtnContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
infBrowserBtn = new Button(infBrowserBtnContainer, SWT.PUSH);
infBrowserBtn.setText("Browse");
infBrowserBtn.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
form.setWeights(new int[]{7, 1});
}
示例6: createLibraryClassHeaderPathFormInput
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
private void createLibraryClassHeaderPathFormInput(Composite container) {
Label moduleRootLabel = new Label(container, SWT.NULL);
moduleRootLabel.setText("Enter the library class header location:");
SashForm form = new SashForm(container, SWT.HORIZONTAL | SWT.NULL);
form.setLayout(new GridLayout(1, false));
form.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
form.setSashWidth(0);
Composite libraryClassHeaderPathTxtContainer = new Composite(form, SWT.NULL);
libraryClassHeaderPathTxtContainer.setLayout(new GridLayout(1, false));
libraryClassHeaderPathTxtContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
libraryClassHeaderPath = new Text(libraryClassHeaderPathTxtContainer, SWT.BOLD | SWT.BORDER);
libraryClassHeaderPath.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
Composite libraryClassHeaderPathBtnContainer = new Composite(form, SWT.NULL);
libraryClassHeaderPathBtnContainer.setLayout(new GridLayout(1, false));
libraryClassHeaderPathBtnContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
libraryClassHeaderPathBtn = new Button(libraryClassHeaderPathBtnContainer, SWT.PUSH);
libraryClassHeaderPathBtn.setText("Browse");
libraryClassHeaderPathBtn.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
form.setWeights(new int[]{7, 1});
}
示例7: createModuleLocationFormInput
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
private void createModuleLocationFormInput(Composite container) {
Label moduleRootLabel = new Label(container, SWT.NULL);
moduleRootLabel.setText("Enter the module's .inf location:");
SashForm form = new SashForm(container, SWT.HORIZONTAL | SWT.NULL);
form.setLayout(new GridLayout(1, false));
form.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
form.setSashWidth(0);
Composite moduleRootFolderTxtContainer = new Composite(form, SWT.NULL);
moduleRootFolderTxtContainer.setLayout(new GridLayout(1, false));
moduleRootFolderTxtContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
moduleRootFolder = new Text(moduleRootFolderTxtContainer, SWT.BOLD | SWT.BORDER);
moduleRootFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
Composite moduleRootFolderBtnContainer = new Composite(form, SWT.NULL);
moduleRootFolderBtnContainer.setLayout(new GridLayout(1, false));
moduleRootFolderBtnContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
moduleRootFolderBtn = new Button(moduleRootFolderBtnContainer, SWT.PUSH);
moduleRootFolderBtn.setText("Browse");
moduleRootFolderBtn.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
form.setWeights(new int[]{7, 1});
}
示例8: LogicalViewComposite
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
public LogicalViewComposite(Composite parent) {
super(parent, SWT.NONE);
this.setLayout(new FillLayout());
SashForm sashMain = new SashForm(this, SWT.HORIZONTAL);
sashMain.setLayout(new FillLayout());
buildExplorerComposite(sashMain);
SashForm sashHisto = new SashForm(sashMain, SWT.VERTICAL);
sashHisto.setLayout(new FillLayout());
buildHistoryComposite(sashHisto);
buildManifestComposite(sashHisto);
sashMain.setWeights(new int[] {60, 40});
sashHisto.setWeights(new int[] {60, 40});
}
示例9: createInputFieldSection
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
private void createInputFieldSection(Composite composite) {
Composite inputComposite = new Composite(composite, SWT.NONE);
GridLayout gl_inputComposite = new GridLayout(1, false);
gl_inputComposite.horizontalSpacing = 0;
gl_inputComposite.verticalSpacing = 0;
gl_inputComposite.marginWidth = 0;
gl_inputComposite.marginHeight = 0;
inputComposite.setLayout(gl_inputComposite);
GridData gd_inputComposite = new GridData(SWT.FILL, SWT.FILL, false, true,
1, 1);
gd_inputComposite.widthHint = 269;
inputComposite.setLayoutData(gd_inputComposite);
inputComposite.setBounds(0, 0, 64, 64);
ScrolledComposite inputScrolledComposite = new ScrolledComposite(
inputComposite, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
inputScrolledComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
true, true, 1, 1));
inputScrolledComposite.setExpandHorizontal(true);
inputScrolledComposite.setExpandVertical(true);
final SashForm inputComposite2 = new SashForm(inputScrolledComposite, SWT.VERTICAL);
inputComposite2.addControlListener(new ControlAdapter() {
@Override
public void controlResized(ControlEvent e) {
in0Table.getColumn(0).setWidth(inputComposite2.getSize().x-5);
in1Table.getColumn(0).setWidth(inputComposite2.getSize().x-5);
}
});
inputComposite2.setLayout(new GridLayout(1, false));
addIn0InputFields(inputComposite2);
addIn1InputFields(inputComposite2);
inputScrolledComposite.setContent(inputComposite2);
inputScrolledComposite.setMinSize(inputComposite2.computeSize(SWT.DEFAULT,
SWT.DEFAULT));
}
示例10: MainWindow
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
public MainWindow(Composite c) {
super(c, SWT.NONE);
initLayoutFillMax();
SashForm main = new SashForm(this, SWT.VERTICAL);
main.setLayout(new GridLayout(1, true));
main.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
createTop(main);
createBottom(main);
// top a little bigger than the bottom..
int weights[] = {60, 40};
main.setWeights(weights);
}
示例11: createContents
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
@Override
protected Control createContents(Composite mainComposite) {
this.composite = mainComposite;
initTray();
createApplicationMenu();
GridLayout layout = new GridLayout();
layout.marginHeight = 0;
layout.marginWidth = 0;
GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
sashForm = new SashForm(mainComposite, SWT.VERTICAL);
sashForm.setLayout(layout);
sashForm.setLayoutData(layoutData);
sashForm.setBackground(composite.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
createTopPanel(sashForm);
createBottomPanel(sashForm);
sashForm.setSashWidth(2);
sashForm.setWeights(new int[] {80,20});
if (viewListener != null) {
viewListener.applicationViewDidLoad();
}
return mainComposite;
}
示例12: createControls
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
public void createControls(Composite composite) {
SashForm sashForm = new SashForm(composite, SWT.VERTICAL);
GridLayout gridLayout = new GridLayout();
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
sashForm.setLayout(gridLayout);
sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));
Composite cTop = new Composite(sashForm, SWT.NULL);
GridLayout topLayout = new GridLayout();
topLayout.marginHeight = 0;
topLayout.marginWidth = 0;
cTop.setLayout(topLayout);
cTop.setLayoutData(new GridData(GridData.FILL_BOTH));
Composite cBottom1 = new Composite(sashForm, SWT.NULL);
GridLayout bottom1Layout = new GridLayout();
bottom1Layout.marginHeight = 0;
bottom1Layout.marginWidth = 0;
cBottom1.setLayout(bottom1Layout);
cBottom1.setLayoutData(new GridData(GridData.FILL_BOTH));
Composite cBottom2 = new Composite(cBottom1, SWT.NULL);
GridLayout bottom2Layout = new GridLayout();
bottom2Layout.marginHeight = 0;
bottom2Layout.marginWidth = 0;
cBottom2.setLayout(bottom2Layout);
cBottom2.setLayoutData(new GridData(GridData.FILL_BOTH));
commitCommentArea.createArea(cTop);
addResourcesArea(cBottom2);
setPageComplete(canFinish());
// set F1 help
PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.LOCK_DIALOG);
}
示例13: buildBottomControl
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
private Control buildBottomControl( final Composite parent){
Composite bottom = new Composite(parent, SWT.NULL);
FillLayout layout = new FillLayout();
bottom.setLayout(layout);
bottom.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL));
vSash = new SashForm(bottom, SWT.HORIZONTAL);
vSash.setLayout(layout);
Composite leftBottom = new Composite(vSash, SWT.NULL);
leftBottom.setLayout(new FillLayout(SWT.VERTICAL));
hSash = new SashForm(leftBottom, SWT.VERTICAL);
hSash.setLayout(layout);
requestView = new RequestView(model, vSash);
responseView = new ResponseView(model, vSash);
vSash.setWeights(model.getVSashWeights());
headerView = new HeaderView(model, hSash);
paramView = new ParamView(model, hSash);
bodyView = new BodyView(model, hSash);
hSash.setWeights(model.getHSashWeights());
return bottom;
}
示例14: createDialogArea
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
/**
* Create contents of the dialog.
* @param parent
*/
@Override protected Control createDialogArea(Composite parent) {
Composite container = (Composite) super.createDialogArea(parent);
container.setLayout(new GridLayout(1, true));
Label titleLabel = new Label(container, SWT.WRAP | SWT.LEFT);
titleLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, false, 1, 2));
titleLabel.setText("Move pages from the source document on the right to correspond with pages on the target document on the left. Only checked pages are synced");
SashForm sf = new SashForm(container, SWT.HORIZONTAL);
sf.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
sf.setLayout(new GridLayout(2, true));
targetViewer = new DocPageViewer(sf, 0, true, true, false);
targetViewer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
targetViewer.setDataList(target.getPages());
targetViewer.setTitle("Target doc: "+target.getMd().getTitle()+" ("+target.getNPages()+" Pages)");
sourceViewer = new ImgUrlListViewer(sf, 0, true, true, false);
sourceViewer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
sourceViewer.setDataList(sourceUrls);
sourceViewer.setTitle("Source Images ("+sourceUrls.size()+")");
sf.setWeights(new int[] { 1, 1 } );
return container;
}
示例15: createDialogArea
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
/**
* Create contents of the dialog.
* @param parent
*/
@Override protected Control createDialogArea(Composite parent) {
getShell().setText("Sychronize current document with files on local hard disc");
Composite container = (Composite) super.createDialogArea(parent);
container.setLayout(new GridLayout(1, true));
Label titleLabel = new Label(container, SWT.WRAP | SWT.LEFT);
titleLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, false, 1, 2));
titleLabel.setText("Select pages from the source document on the right to correspond with pages on the target document on the left. \n"
+ "\n"
+ "Note: Pages are synced according to filename! Only checked pages will be synced.");
SashForm sf = new SashForm(container, SWT.HORIZONTAL);
sf.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
sf.setLayout(new GridLayout(2, true));
targetViewer = new DocPageViewer(sf, 0, false, false, false);
targetViewer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
targetViewer.setDataList(target.getPages());
targetViewer.setTitle("Target: "+target.getMd().getTitle());
sourceViewer = new DocPageViewer(sf, 0, false, true, false);
sourceViewer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
sourceViewer.setDataList(source.getPages());
sourceViewer.setTitle("Source: "+source.getMd().getTitle());
sourceViewer.togglePreview(false);
sf.setWeights(new int[] { 1, 1 } );
return container;
}