当前位置: 首页>>代码示例>>Java>>正文


Java SWT.SMOOTH属性代码示例

本文整理汇总了Java中org.eclipse.swt.SWT.SMOOTH属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.SMOOTH属性的具体用法?Java SWT.SMOOTH怎么用?Java SWT.SMOOTH使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.eclipse.swt.SWT的用法示例。


在下文中一共展示了SWT.SMOOTH属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createDialogArea

/**
 * 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,代码行数:25,代码来源:JoinMapDialog.java

示例2: createDialogArea

/**
 * 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));

	createInputFieldSection(composite);

	creatFieldMappingSection(composite);
	composite.setWeights(new int[] {267, 618});

	populateLookupMapDialog();
	
	getShell().setMinimumSize(800,500);
	return container;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:24,代码来源:LookupMapDialog.java

示例3: createDialogArea

/**
 * 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,代码行数:27,代码来源:TransformDialog.java

示例4: createProgressBar

protected final ProgressBar createProgressBar(int min, int max, int width, final ProgressBarText pbt) {
	width = (int)(width * width_multiplier );
	final ProgressBar result = new ProgressBar(splash, SWT.SMOOTH);
	result.setBackground(Colors.blues[Colors.BLUES_LIGHTEST]);
	result.setForeground(Colors.blues[Colors.BLUES_MIDLIGHT]);
	result.setMinimum(min);
	result.setMaximum(max);
	result.addMouseListener(this.mListener);
	result.addMouseMoveListener(this.mMoveListener);
    if (this.hSize == -1) {
    	throw new RuntimeException("must add fixed text label first!");
    }
	result.setSize(width, hSize);
	result.setLocation(this.xSize, 0);
	result.setMenu(this.menu);
	this.xSize += width + 3;

	// Add a listener to display text on the progress bar.
	if (pbt != null) {
		result.addListener(SWT.Paint, new Listener() {
    		@Override
		    public void handleEvent(Event event) {
    			Color old = event.gc.getForeground();
    			event.gc.setForeground(Colors.black);
    			int	char_width = event.gc.getFontMetrics().getAverageCharWidth();
    			String pb_text = pbt.convert(result.getSelection());
    			event.gc.drawText(pb_text, (result.getSize().x - pb_text.length() * char_width )/2, -1, true);
    			event.gc.setForeground(old);
    		}
		});
	}

	return result;
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:34,代码来源:MiniBar.java

示例5: createDialogArea

private Control createDialogArea(Composite shell) {
       GridLayout layout = new GridLayout();
	layout.numColumns = 1;
	shell.setLayout(layout);

	lblStep = new Label(shell, SWT.NONE);
	lblStep.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
	lblStep.setText("Step 1 / 999");

	lblMessage = new Label(shell, SWT.NONE);
	lblMessage.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
	lblMessage.setText("Idle");

	pbProg = new ProgressBar(shell, SWT.SMOOTH | SWT.INDETERMINATE);
	pbProg.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
	pbProg.setMaximum(1000);
	pbProg.setSelection(0);
	pbProg.setSelection(256);

	final Label lblSeparator = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
	lblSeparator.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));

	txtLog = new Text(shell, SWT.MULTI
	          | SWT.BORDER
	          | SWT.H_SCROLL
	          | SWT.V_SCROLL);
	txtLog.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
	txtLog.setEditable(false);
	txtLog.setBackground(new Color(shell.getDisplay(), 10,10,10));
	txtLog.setForeground(new Color(shell.getDisplay(), 200,200,200));

	shell.layout();

	return shell;
}
 
开发者ID:aserg-ufmg,项目名称:RefDiff,代码行数:35,代码来源:ProgressBarDialog.java

示例6: createShell

/**
 * Create the Shell, setting up any elements that are not set up by the main Composite.
 *
 * @param parentShell The parent windows' Shell.
 */
private void createShell(Shell parentShell) {
	// Set up the sell.
	this.shell = new Shell(this.display, SWT.BORDER);
	this.shell.setLayout(new GridLayout(3, false));
	this.shell.setText("Fast Execution...");

	// Check if the number of instructions is greater than an int value. Find a divisor in that case.
	if (this.numberOfInstructions > Integer.MAX_VALUE) {
		this.divisor = (double) this.numberOfInstructions / (double) Integer.MAX_VALUE;
	}

	// Components
	GridData gridData = new GridData();
	gridData.horizontalSpan = 2;

	this.informationLabel = new Label(this.shell, SWT.NONE);
	this.informationLabel.setText("Executing " + this.numberOfInstructions + " instructions...");
	this.informationLabel.setLayoutData(gridData);

	this.button = new Button(this.shell, SWT.PUSH);
	this.button.setText("&Stop");
	this.shell.setDefaultButton(this.button);

	this.instructionsText = new Text(this.shell, SWT.BORDER | SWT.RIGHT);
	this.instructionsText.setBackground(this.shell.getDisplay().getSystemColor(SWT.COLOR_WHITE));
	this.instructionsText.setText("     " + String.valueOf(this.numberOfInstructions));
	this.instructionsText.setEditable(false);

	this.progressBar = new ProgressBar(this.shell, SWT.HORIZONTAL | SWT.SMOOTH);
	this.progressBar.setMinimum(0);
	this.progressBar.setMaximum((int) (this.numberOfInstructions / this.divisor));

	this.percentText = new Text(this.shell, SWT.BORDER | SWT.RIGHT);
	this.percentText.setBackground(this.shell.getDisplay().getSystemColor(SWT.COLOR_WHITE));
	this.percentText.setText("    " + "00%");
	this.percentText.setEditable(false);

	// Listener.
	/**
	 * Close the window.
	 */
	this.button.addListener(SWT.Selection, new Listener() {
		public void handleEvent(Event event) {
			doExit();
		}
	});

	// Escape Listener.
	this.shell.addKeyListener(new EscKeyListener(this));
	this.informationLabel.addKeyListener(new EscKeyListener(this));
	this.button.addKeyListener(new EscKeyListener(this));
	this.instructionsText.addKeyListener(new EscKeyListener(this));
	this.progressBar.addKeyListener(new EscKeyListener(this));
	this.percentText.addKeyListener(new EscKeyListener(this));

	// Compute the needed size.
	Point point = this.shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);
	point.x += 2;
	point.y += 2;
	int[] posXY = StaticGuiSupport.getCenteredPosition(point.x, point.y, parentShell);
	this.shell.setBounds(posXY[0], posXY[1], point.x, point.y);
}
 
开发者ID:wwu-pi,项目名称:tap17-muggl-javaee,代码行数:67,代码来源:FastExecutionWindow.java


注:本文中的org.eclipse.swt.SWT.SMOOTH属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。