當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。