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


Java SWTGraphicUtil类代码示例

本文整理汇总了Java中org.mihalis.opal.utils.SWTGraphicUtil的典型用法代码示例。如果您正苦于以下问题:Java SWTGraphicUtil类的具体用法?Java SWTGraphicUtil怎么用?Java SWTGraphicUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: start

import org.mihalis.opal.utils.SWTGraphicUtil; //导入依赖的package包/类
/**
 * Starts the ticker
 */
public void start() {
	if (this.c.isDisposed()) {
		SWT.error(SWT.ERROR_WIDGET_DISPOSED);
	}

	this.currentPosition = 0;
	this.fadeIn = true;
	this.fadeOut = false;
	this.fadeOutCounter = 0;

	if (this.defaultColor == null) {
		this.defaultColor = SWTGraphicUtil.getDefaultColor(this.c, 200, 200, 200);
	}

	if (this.selectionColor == null) {
		this.selectionColor = this.c.getDisplay().getSystemColor(SWT.COLOR_BLACK);
	}

	createShell();
	createAndRunAnimatorThread();
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:25,代码来源:MyInfiniteProgressPanel.java

示例2: main

import org.mihalis.opal.utils.SWTGraphicUtil; //导入依赖的package包/类
/**
 * @param args
 */
public static void main(final String[] args) {

        Locale.setDefault(Locale.ENGLISH);

        final Display display = new Display();
        final Shell shell = new Shell(display);
        shell.setText("PropertyTable snippet");
        shell.setLayout(new FillLayout(SWT.VERTICAL));

        final TabFolder tabFolder = new TabFolder(shell, SWT.BORDER);

        final TabItem item1 = new TabItem(tabFolder, SWT.NONE);
        item1.setText("First");
        item1.setControl(buildPropertyTable(tabFolder, true, true, true));

        final TabItem item2 = new TabItem(tabFolder, SWT.NONE);
        item2.setText("Second");
        item2.setControl(buildPropertyTable(tabFolder, false, true, false));

        final TabItem item3 = new TabItem(tabFolder, SWT.NONE);
        item3.setText("Third");
        item3.setControl(buildPropertyTable(tabFolder, true, false, true));

        final TabItem item4 = new TabItem(tabFolder, SWT.NONE);
        item4.setText("Forth");
        item4.setControl(buildPropertyTable(tabFolder, true, false, false));

        shell.setSize(800, 600);
        shell.open();
        SWTGraphicUtil.centerShell(shell);

        while (!shell.isDisposed()) {
                if (!display.readAndDispatch()) {
                        display.sleep();
                }
        }

        display.dispose();
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:43,代码来源:PropertyTableSnippet.java

示例3: createButton

import org.mihalis.opal.utils.SWTGraphicUtil; //导入依赖的package包/类
/**
 * Create a button
 *
 * @param fileName file name of the icon
 * @param verticalExpand if <code>true</code>, the button will take all the
 *            available space vertically
 * @param alignment button alignment
 * @return a new button
 */
private Button createButton(final String fileName, final boolean verticalExpand, final int alignment) {
	final Button button = new Button(this, SWT.PUSH);
	final Image image = new Image(this.getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/" + fileName));
	button.setImage(image);
	button.setLayoutData(new GridData(GridData.CENTER, alignment, false, verticalExpand));
	SWTGraphicUtil.addDisposer(button, image);
	return button;
}
 
开发者ID:kopl,项目名称:SPLevo,代码行数:18,代码来源:DualList.java

示例4: setDefaultColor

import org.mihalis.opal.utils.SWTGraphicUtil; //导入依赖的package包/类
/**
 * @param defaultColor the new default color for the ticker's bars. Please
 *            notice that the previous color is disposed.
 * 
 * @exception IllegalArgumentException <ul>
 *                <li>ERROR_INVALID_ARGUMENT - if the animation is running</li>
 *                </ul>
 */
public void setDefaultColor(final Color defaultColor) {
	this.checkIfAnimationIsRunning();
	SWTGraphicUtil.safeDispose(this.defaultColor);
	this.defaultColor = defaultColor;
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:14,代码来源:MyInfiniteProgressPanel.java


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