當前位置: 首頁>>代碼示例>>Java>>正文


Java SashForm.setWeights方法代碼示例

本文整理匯總了Java中org.eclipse.swt.custom.SashForm.setWeights方法的典型用法代碼示例。如果您正苦於以下問題:Java SashForm.setWeights方法的具體用法?Java SashForm.setWeights怎麽用?Java SashForm.setWeights使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.custom.SashForm的用法示例。


在下文中一共展示了SashForm.setWeights方法的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 });
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:19,代碼來源:DashboardComposite.java

示例2: createContents

import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
@Override
protected Control createContents(Composite parent) {
	ResourcesPlugin.getWorkspace().getRoot().getProject(ExpressionEditorUtil.INSTANCE.lastString(getTitle(), Constants.SPACE));
	noDefaultAndApplyButton();
	Composite container = parent;
	container.setLayout(new GridLayout(1, false));
	this.getShell().setText(DIALOG_TITLE);
	Composite mainComposite = new Composite(container, SWT.BORDER);
	mainComposite.setLayout(new GridLayout(1, false));
	mainComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
	SashForm sashForm = new SashForm(mainComposite, SWT.NONE);
	sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
	
	categoriesDialogSourceComposite=new CategoriesDialogSourceComposite(sashForm, this, SWT.NONE);
	categoriesDialogTargetComposite=new CategoriesDialogTargetComposite(sashForm, categoriesDialogSourceComposite, SWT.NONE);
	
	sashForm.setWeights(new int[] {1, 1});

	return container;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:23,代碼來源:AddExternalJarPage.java

示例3: 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, false));
	this.getShell().setText(DIALOG_TITLE);
	Composite mainComposite = new Composite(container, SWT.BORDER);
	mainComposite.setLayout(new GridLayout(1, false));
	mainComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
	SashForm sashForm = new SashForm(mainComposite, SWT.NONE);
	sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
	
	categoriesDialogSourceComposite=new CategoriesDialogSourceComposite(sashForm,null, SWT.NONE);
	categoriesDialogTargetComposite=new CategoriesDialogTargetComposite(sashForm,categoriesDialogSourceComposite, SWT.NONE);
	
	sashForm.setWeights(new int[] {1, 1});

	return container;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:25,代碼來源:AddCategoreisDialog.java

示例4: 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, false));
	container.getShell().setText(DIALOG_TITLE);
	
	SashForm composite = new SashForm(container, SWT.SMOOTH);
	composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

	createInputFieldExpandBarSection(composite);

	creatFieldMappingSection(composite);

	createCopyInputToOutputFieldSection(composite);
	composite.setWeights(new int[] {215, 559, 116});

	populateJoinMapDialog();
	
	return container;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:26,代碼來源:JoinMapDialog.java

示例5: 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});
}
 
開發者ID:technology16,項目名稱:pgsqlblocks,代碼行數:18,代碼來源:ProcessesView.java

示例6: createDialogArea

import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
/**
 * Create contents of the dialog.
 * 
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {
	container = (Composite) super.createDialogArea(parent);
	container.setLayout(new GridLayout(3, false));
	container.getShell().setText(Messages.TRANSFORM_EDITOR);
	propertyDialogButtonBar = new PropertyDialogButtonBar(container);
	mainSashForm = new SashForm(container, SWT.SMOOTH);
	mainSashForm.setSashWidth(5);
	mainSashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 0, 0));
	createInputFieldTable(mainSashForm);
       createOperationClassGrid(mainSashForm);
	createOutputFieldTable(mainSashForm);
	if(OSValidator.isMac()){
		mainSashForm.setWeights(new int[] {54, 242, 120});
	}else{
		mainSashForm.setWeights(new int[] {67, 242, 107});
	}
	Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
	final Point newSize = container.getShell().computeSize(screenSize.width/2, screenSize.height/2, true);
	getShell().setMinimumSize(newSize);
	return mainSashForm;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:28,代碼來源:TransformDialog.java

示例7: createPartControl

import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
@Override
public void createPartControl(Composite parent) {
	Composite sash = new Composite(parent, SWT.NONE);
	sash.setLayout(new FillLayout());
	sash.setLayoutData(new GridData(GridData.FILL_BOTH));
	final SashForm sashForm = new SashForm(sash, SWT.HORIZONTAL);

	// Left sash
	super.createEditor(sashForm);

	// Right sash
	createConfigurationPanel(sashForm);
	sashForm.setWeights(new int[] { 4, 1});

	parent.setLayout(new GridLayout(1, false));
	super.createSliderControl(parent);

	registerListeners();
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:20,代碼來源:DwFeatureModelConfiguratorEditor.java

示例8: main

import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
public static void main(String[] args) {
  Display display = new Display();
  Shell shell = new Shell(display);
  shell.setText("SashForm Test");
  // Fill the parent window with the buttons and sash
  shell.setLayout(new FillLayout());

  // Create the SashForm and the buttons
  SashForm sashForm = new SashForm(shell, SWT.VERTICAL);
  new Button(sashForm, SWT.PUSH).setText("Left");
  new Button(sashForm, SWT.PUSH).setText("Right");
  new Button(sashForm, SWT.PUSH).setText("Right2");
  new Button(sashForm, SWT.PUSH).setText("Right3");

  sashForm.setWeights(new int[] { 1, 3, 2, 3});
  
  shell.open();
  while (!shell.isDisposed()) {
    if (!display.readAndDispatch()) {
      display.sleep();
    }
  }
  display.dispose();

}
 
開發者ID:Transkribus,項目名稱:TranskribusSwtGui,代碼行數:26,代碼來源:SashFormWeight.java

示例9: 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;
}
 
開發者ID:Transkribus,項目名稱:TranskribusSwtGui,代碼行數:25,代碼來源:HtrTextRecognitionConfigDialog.java

示例10: createContents

import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
@Override
protected Control createContents(final Composite parent) {
	trayIcon = new TrayIcon(this);

	menuBar = new MenuBar(this);

	searchForm = new SearchForm(this);

	sashForm = new SashForm(parent, SWT.HORIZONTAL);
	sashForm.setSashWidth((int) (sashForm.getSashWidth() * SASH_MAGNIFICATION_FACTOR));
	GridLayoutFactory.swtDefaults().applyTo(sashForm);
	GridDataFactory.fillDefaults().grab(true, true).applyTo(sashForm);

	resultsTable = new ResultsTable(sashForm, GridDataFactory.fillDefaults().grab(true, true).create(), this);

	mapCanvas = new MapCanvas(sashForm);
	sashForm.setWeights(new int[] { configuration.getInt(SHELL_SASH_WEIGHT + ".0", Defaults.SASH_WEIGHTS[0]), configuration.getInt(SHELL_SASH_WEIGHT + ".1", Defaults.SASH_WEIGHTS[1]) });

	return parent;
}
 
開發者ID:Albertus82,項目名稱:EarthquakeBulletin,代碼行數:21,代碼來源:EarthquakeBulletinGui.java

示例11: createControl

import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
public Control createControl(Composite parent) {
	control=new Composite(parent, SWT.NONE);
	GridLayout controlGl=new GridLayout(1,true);
	controlGl.marginWidth=0;
	controlGl.marginHeight=0;
	control.setLayout(controlGl);
	
	createTitleBar(control);
	
	SashForm sashForm = new SashForm(control, SWT.NONE);
	sashForm.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
	
	createTreeViewer(sashForm);
	
	createQueryTextArea(sashForm);
	
	// Standard proportions
	sashForm.setWeights(new int[] {30, 70});
	return control;
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:21,代碼來源:TreeBasedQueryDesigner.java

示例12: postConstruct

import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
@PostConstruct
public void postConstruct(Composite parent) {
	this.parent = parent;
	GridLayout gl_parent = new GridLayout(1, false);
	gl_parent.horizontalSpacing = 0;
	gl_parent.verticalSpacing = 0;
	gl_parent.marginHeight = 0;
	parent.setLayout(gl_parent);
	
	SashForm sashForm = new SashForm(parent, SWT.NONE);
	sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
	leftComposite = new Composite(sashForm, SWT.NONE);
	loadLeftEditor();
	
	rightComposite = new Composite(sashForm, SWT.NONE);
	loadRightEditor();
	sashForm.setWeights(new int[] {1, 1});
	//TODO Your code here
}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:21,代碼來源:CompareViewerEgyTextImpl.java

示例13: createDialogArea

import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
protected Control createDialogArea(Composite parent) {
	Composite container =  (Composite) super.createDialogArea(parent);
	FillLayout layout = new FillLayout();
	container.setLayout(layout);
	SashForm sashVertForm = new SashForm(container, SWT.VERTICAL);
	sashVertForm.SASH_WIDTH = 3;
	initSQLTable(sashVertForm);
	initBindTable(sashVertForm);

	sashVertForm.setWeights(new int [] {55, 45});

	processSqlData();
	displaySQLSumData();
	
	return container;
}
 
開發者ID:scouter-project,項目名稱:scouter,代碼行數:17,代碼來源:XlogSummarySQLDialog.java

示例14: LogContent

import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
public LogContent(Composite parent, Log<T> log) {
  super(parent, SWT.NONE);

  this.log = log;

  setLayout(new FillLayout());
  SashForm sashForm = new SashForm(this, SWT.VERTICAL);

  createViewer(sashForm);
  createDetailsPane(sashForm, treeViewer.getTree().getBackground());

  sashForm.setWeights(new int[] {70, 30});

  revealChildrenThatNeedAttention(treeViewer, log.getRootLogEntry());

  LogEntry<T> entryToSelect = log.getFirstDeeplyNestedChildWithMaxAttn();
  if (entryToSelect != null) {
    treeViewer.setSelection(new StructuredSelection(entryToSelect));
  }
}
 
開發者ID:gwt-plugins,項目名稱:gwt-eclipse-plugin,代碼行數:21,代碼來源:LogContent.java

示例15: LatticeTabUI

import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
private LatticeTabUI(TabFolder tabFolderMIPA) 
{
	TabItem tabItemLattice = new TabItem(tabFolderMIPA, SWT.NONE);
	tabItemLattice.setToolTipText("representation of lattice");
	tabItemLattice.setText("Lattice");

	SashForm sashLattice = new SashForm(tabFolderMIPA, SWT.NONE);
	tabItemLattice.setControl(sashLattice);

	StyledText styledTextLattice = new StyledText(sashLattice, SWT.BORDER
			| SWT.READ_ONLY);
	styledTextLattice.setText("Information for lattice are given here \n.");
	styledTextLattice.setToolTipText("Information for lattice.");

	Group grpLatticeTree = new Group(sashLattice, SWT.NONE);
	grpLatticeTree.setToolTipText("tree view of lattice");
	grpLatticeTree.setText("Lattice Tree View");
	
	latticeTreeViewer = new TreeViewer(grpLatticeTree, SWT.BORDER);
	Tree latticeTree = latticeTreeViewer.getTree();
	latticeTree.setBounds(10, 29, 444, 526);
	//latticeTreeViewer.setLabelProvider(new LatticeTreeLabelProvider());
	//latticeTreeViewer.setContentProvider(new LatticeTreeContentProvider());
	sashLattice.setWeights(new int[] { 1, 1 });
}
 
開發者ID:alg-nju,項目名稱:mipa,代碼行數:26,代碼來源:LatticeTabUI.java


注:本文中的org.eclipse.swt.custom.SashForm.setWeights方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。