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


Java SashForm.setSashWidth方法代碼示例

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


在下文中一共展示了SashForm.setSashWidth方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: 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

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

示例3: 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

示例4: 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});
}
 
開發者ID:ffmmjj,項目名稱:uefi_edk2_wizards_plugin,代碼行數:25,代碼來源:ExistingModuleWizardPage.java

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

示例6: 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});
}
 
開發者ID:ffmmjj,項目名稱:uefi_edk2_wizards_plugin,代碼行數:25,代碼來源:NewEdk2ModuleProjectPage.java

示例7: createDialogArea

import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
/**
 * Create contents of the dialog.
 * 
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {

	getShell().setText(
			MultiParameterFileDialogConstants.PARAMETER_FILE_DIALOG_TEXT);
	
	container_1 = (Composite) super.createDialogArea(parent);
	mainSashForm = new SashForm(container_1, SWT.HORIZONTAL);
	mainSashForm.setSashWidth(6);
	GridData gd_mainSashForm = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
	gd_mainSashForm.heightHint = 476;
	gd_mainSashForm.widthHint = 851;
	mainSashForm.setLayoutData(gd_mainSashForm);
	createParameterFilesBox(container_1);
	populateFilePathTableViewer();

	Composite composite = createParameterFileViewOuterComposite(mainSashForm);
	SashForm childSashForm=new SashForm(composite, SWT.VERTICAL);
	childSashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
	createViewParameterFileBox(childSashForm);
	ParameterFile jobSpecificFile = getJobSpecificFile();
	if (jobSpecificFile != null)
		populateViewParameterFileBox(jobSpecificFile);

	createParameterSearchBox(childSashForm);
	mainSashForm.setWeights(new int[] {260, 214});
	
	Label lblNewLabel = new Label(container_1, SWT.NONE);
	lblNewLabel.setText(Messages.NOTE_FOR_SAME_PARAMETERS_DEFINED_IN_MULTIPLE_PARAMETER_FILES_THE_LOWERMOST_FILE_WILL_BE_GIVEN_PRECEDENCE_OVER_OTHERS);
	return container_1;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:38,代碼來源:MultiParameterFileDialog.java

示例8: createDialogArea

import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
/**
 * Create contents of the dialog.
 * 
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {

	isAnyUpdatePerformed = false;
	if(OSValidator.isMac()){
		getShell().setMinimumSize(new Point(500, 500));
	}else{
		getShell().setMinimumSize(new Point(500, 525));
	}
	getShell().setText(buttonWithLabelConfig.getWindowName());

	container_1 = (Composite) super.createDialogArea(parent);
	container_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
	addButtonPanel(container_1);

	Composite tableComposite = new Composite(container_1, SWT.NONE);
	tableComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	tableComposite.setLayout(new GridLayout(2, false));
	
	mainSashForm = new SashForm(tableComposite, SWT.HORIZONTAL);
	mainSashForm.setSashWidth(6);
	mainSashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
	createSourceTable(mainSashForm);

	createTargetTable(mainSashForm);
	mainSashForm.setWeights(new int[] {200, 285});
	
	attachShortcutListner();
	addErrorLabel(container_1);

	return container_1;
	
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:41,代碼來源:SecondaryColumnKeysDialog.java

示例9: 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));
	
	getShell().setText(title);
	
	SashForm mainSashForm = new SashForm(container, SWT.BORDER);
	mainSashForm.setSashWidth(2);
	mainSashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
	createAvailableFieldTable(mainSashForm);
	
	Composite filterLogicMainComposite = new Composite(mainSashForm, SWT.NONE);
	filterLogicMainComposite.setLayout(new GridLayout(1, false));
	
	SashForm filterLogicSashForm = new SashForm(filterLogicMainComposite, SWT.VERTICAL);
	filterLogicSashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
	filterLogicInnerComposite = new Composite(filterLogicSashForm, SWT.BORDER);
	filterLogicInnerCompositeLayout = new StackLayout();
	filterLogicInnerComposite.setLayout(filterLogicInnerCompositeLayout);
	
	createExpressionOrOperationComposite(filterLogicInnerComposite);
	
	createErrorLogsTable(filterLogicSashForm);
	
	filterLogicSashForm.setWeights(new int[] {3, 1});
	mainSashForm.setWeights(new int[] {1, 2});
	return container;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:36,代碼來源:FilterExpressionOperationDialog.java

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

示例11: createSashForm

import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
private void createSashForm(Composite parent) {
    sashForm = new SashForm(parent, SWT.VERTICAL);
    GridLayout layout = new GridLayout();
    layout.marginHeight = layout.marginWidth = 0;
    sashForm.setLayout(layout);
    sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));
    sashForm.setSashWidth(10);
}
 
開發者ID:yamcs,項目名稱:yamcs-studio,代碼行數:9,代碼來源:CommandHistoryEntryDetailsDialog.java

示例12: createControls

import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
@Override
public void createControls(Composite parent) {
	parent.setLayout(new FillLayout());
	SashForm sashForm = new SashForm(parent, SWT.HORIZONTAL | SWT.SMOOTH);
	sashForm.setSashWidth(2);
	sashForm.setBackground(sashForm.getDisplay().getSystemColor( SWT.COLOR_GRAY));
	sashForm.setLayout(new FillLayout());
	Composite leftColumn = getToolkit().createComposite(sashForm);
	leftColumn.setLayout(createLeftColumnLayout());
	Composite rightColumn = getToolkit().createComposite(sashForm);
	rightColumn.setLayout(createRightColumnLayout());
	sashForm.setWeights(new int[] { 1, 1 });
	createLeftColumnControls(leftColumn);
	createRightColumnControls(rightColumn);
}
 
開發者ID:Yakindu,項目名稱:statecharts,代碼行數:16,代碼來源:AbstractTwoColumnEditorPropertySection.java

示例13: RouterLoggerGui

import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
private RouterLoggerGui(final Display display) {
	shell = new Shell(display);

	// Fix invisible (transparent) shell bug with some Linux distibutions
	if (SwtUtils.isGtk3() != null && !SwtUtils.isGtk3() && configuration.getBoolean("gui.start.minimized", Defaults.GUI_START_MINIMIZED)) {
		shell.setMinimized(true);
	}

	shell.setText(Messages.get("lbl.window.title"));
	shell.setImages(Images.getMainIcons());
	shell.setLayout(new GridLayout());

	trayIcon = new TrayIcon(this);

	menuBar = new MenuBar(this);

	sashForm = new SashForm(shell, SWT.VERTICAL);
	sashForm.setSashWidth((int) (sashForm.getSashWidth() * SASH_MAGNIFICATION_FACTOR));
	sashForm.setLayout(new GridLayout());
	sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

	dataTable = new DataTable(sashForm, new GridData(SWT.FILL, SWT.FILL, true, true), this);

	console = new StyledTextConsole(sashForm, new GridData(SWT.FILL, SWT.FILL, true, true), true);
	final String fontDataString = configuration.getString("gui.console.font", true);
	if (!fontDataString.isEmpty()) {
		console.setFont(PreferenceConverter.readFontData(fontDataString));
	}
	console.setLimit(new Supplier<Integer>() {
		@Override
		public Integer get() {
			return configuration.getInt("gui.console.max.chars");
		}
	});

	shell.addListener(SWT.Close, new CloseListener(this));
}
 
開發者ID:Albertus82,項目名稱:RouterLogger,代碼行數:38,代碼來源:RouterLoggerGui.java

示例14: ownCreatePartControl

import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
@Override
public void ownCreatePartControl(final Composite c) {
	if (getOutput() == null) { return; }
	c.setLayout(emptyLayout());

	// First create the sashform

	form = new SashForm(c, SWT.HORIZONTAL);
	form.setLayoutData(fullData());
	form.setBackground(IGamaColors.WHITE.color());
	form.setSashWidth(8);
	decorator.createSidePanel(form);
	final Composite centralPanel = new Composite(form, CORE_DISPLAY_BORDER.getValue() ? SWT.BORDER : SWT.NONE);

	centralPanel.setLayout(emptyLayout());
	setParentComposite(new Composite(centralPanel, SWT.NONE) {

		@Override
		public boolean setFocus() {
			return forceFocus();
		}

	});

	getParentComposite().setLayoutData(fullData());
	getParentComposite().setLayout(emptyLayout());
	createSurfaceComposite(getParentComposite());
	surfaceComposite.setLayoutData(fullData());
	getOutput().setSynchronized(getOutput().isSynchronized() || CORE_SYNC.getValue());
	form.setMaximizedControl(centralPanel);
	decorator.createDecorations(form);
	c.layout();

}
 
開發者ID:gama-platform,項目名稱:gama,代碼行數:35,代碼來源:LayeredDisplayView.java

示例15: createDialogArea

import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
/**
 * Create contents of the dialog.
 * 
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {

	isAnyUpdatePerformed = false;

	if (Constants.KEY_FIELDS_WINDOW_TITLE.equalsIgnoreCase(componentName)) {
		getShell().setText(Constants.KEY_FIELDS_WINDOW_TITLE);
	}
	if (Constants.OPERATION_FIELDS_WINDOW_TITLE.equalsIgnoreCase(componentName)) {
		getShell().setText(Constants.OPERATION_FIELDS_WINDOW_TITLE);
	}
	if (Constants.JOIN_KEYS_WINDOW_TITLE.equalsIgnoreCase(componentName)) {
		getShell().setText(Constants.JOIN_KEYS_WINDOW_TITLE);
	}
	if(Constants.LOOKUP_KEYS_WINDOW_TITLE.equalsIgnoreCase(componentName)){
		getShell().setText(Constants.LOOKUP_KEYS_WINDOW_TITLE);
	}
	if(Constants.PARTITION_KEYS_WINDOW_TITLE.equalsIgnoreCase(componentName)){
		getShell().setText(Constants.PARTITION_KEYS_WINDOW_TITLE);
	}		
	if(Messages.UPDATE_KEYS_WINDOW_LABEL.equalsIgnoreCase(componentName)){
		getShell().setText(Messages.UPDATE_KEYS_WINDOW_LABEL);
	}
	if(Messages.PRIMARY_KEYS_WINDOW_LABEL.equalsIgnoreCase(componentName)){
		getShell().setText(Messages.PRIMARY_KEYS_WINDOW_LABEL);
		isPrimaryKeyDialog  =true;
	}
	if(Messages.PARTITION_KEYS_FOR_DB_COMPONENT.equalsIgnoreCase(componentName)){
		getShell().setText(Messages.PARTITION_KEYS_FOR_DB_COMPONENT);
	}
	
	if(OSValidator.isMac()){
		getShell().setMinimumSize(new Point(500, 500));
	}else{
		getShell().setMinimumSize(new Point(500, 525));
	}
	
	container_1 = (Composite) super.createDialogArea(parent);
	container_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
	addButtonPanel(container_1);
		
	tableComposite = new Composite(container_1, SWT.NONE);
	tableComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
	mainSashForm = new SashForm(tableComposite, SWT.HORIZONTAL);
	mainSashForm.setSashWidth(6);
	mainSashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

	createSourceTable(mainSashForm);
	createTargetTable(mainSashForm);
	mainSashForm.setWeights(new int[] {230, 255});

	addErrorLabel(container_1);
	checkFieldsOnStartup();
	if(Messages.PARTITION_KEYS_FOR_DB_COMPONENT.equalsIgnoreCase(componentName)){
		if(propertyList.size() > 0){
			addButton.setEnabled(false);
		}
	}
	return container_1;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:68,代碼來源:FieldDialog.java


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