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


Java SWT.error方法代码示例

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


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

示例1: checkWidget

import org.eclipse.swt.SWT; //导入方法依赖的package包/类
protected void checkWidget ()
{
    try
    {
        this.realm.checkRealm ();
    }
    catch ( final IllegalAccessException e )
    {
        SWT.error ( SWT.ERROR_THREAD_INVALID_ACCESS, e );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:12,代码来源:AbstractRenderer.java

示例2: checkDisplay

import org.eclipse.swt.SWT; //导入方法依赖的package包/类
protected void checkDisplay ()
{
    if ( Display.getCurrent () != this.display )
    {
        SWT.error ( SWT.ERROR_THREAD_INVALID_ACCESS );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:8,代码来源:DisplayBlinkServiceImpl.java

示例3: checkDisplay

import org.eclipse.swt.SWT; //导入方法依赖的package包/类
private void checkDisplay ()
{
    if ( Display.getCurrent () != this.display )
    {
        SWT.error ( SWT.ERROR_THREAD_INVALID_ACCESS );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:8,代码来源:KeyInstanceManager.java

示例4: getInstance

import org.eclipse.swt.SWT; //导入方法依赖的package包/类
public static KeyInstanceManager getInstance ( final Display display )
{
    if ( display == null )
    {
        SWT.error ( SWT.ERROR_NULL_ARGUMENT );
    }

    if ( Display.getCurrent () != display )
    {
        SWT.error ( SWT.ERROR_THREAD_INVALID_ACCESS );
    }

    if ( display.isDisposed () )
    {
        SWT.error ( SWT.ERROR_DEVICE_DISPOSED );
    }

    KeyInstanceManager mgr = instanceMap.get ( display );
    if ( mgr != null )
    {
        return mgr;
    }

    mgr = new KeyInstanceManager ( display );
    instanceMap.put ( display, mgr );

    display.disposeExec ( new Runnable () {

        @Override
        public void run ()
        {
            disposeDisplay ( display );
        }
    } );

    return mgr;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:38,代码来源:KeyInstanceManager.java

示例5: addDocumentCompletedListener

import org.eclipse.swt.SWT; //导入方法依赖的package包/类
/**
 * Adds a DocumentCompletedListener to the WebViewer. This listener will be fired when the document is completly loaded
 * 
 * @param  listener the DocumentCompletedListener to be added
 */
public synchronized void addDocumentCompletedListener(DocumentCompletedListener listener) {
	composite.checkWidget();
	if (listener == null)
		SWT.error(SWT.ERROR_NULL_ARGUMENT);
	documentCompletedListeners.add(listener);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:12,代码来源:XulWebViewerImpl.java

示例6: addHttpProxyEventListener

import org.eclipse.swt.SWT; //导入方法依赖的package包/类
/**
 * Adds a HttpProxyEventListener to the WebViewer. This listener will be fired when a http request is done
 * 
 * @param  listener the HttpProxyEventListener to be added
 */
public synchronized void addHttpProxyEventListener(HttpProxyEventListener listener) {
	composite.checkWidget();
	if (listener == null)
		SWT.error(SWT.ERROR_NULL_ARGUMENT);
	httpProxyEventListeners.add(listener);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:12,代码来源:XulWebViewerImpl.java

示例7: addSelectionChangedListener

import org.eclipse.swt.SWT; //导入方法依赖的package包/类
/**
 * Adds a SelectionChangedListener to the WebViewer. This listener will be fired when the users selects an element
 * in the web page
 * 
 * @param  listener the SelectionChangedListener to be added
 */
public void addSelectionChangedListener(SelectionChangedListener listener) {
	composite.checkWidget();
	if (listener == null)
		SWT.error(SWT.ERROR_NULL_ARGUMENT);
	selectionChangedListeners.add(listener);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:13,代码来源:XulWebViewerImpl.java

示例8: CocoaUIEnhancer

import org.eclipse.swt.SWT; //导入方法依赖的package包/类
private CocoaUIEnhancer()
		throws Throwable {

	// Instead of creating a new delegate class in objective-c,
	// just use the current SWTApplicationDelegate. An instance of this
	// is a field of the Cocoa Display object and is already the target
	// for the menuItems. So just get this class and add the new methods
	// to it.
	Object delegateObjSWTApplication = invoke(osCls, "objc_lookUpClass",
			new Object[] {
				"SWTApplicationDelegate"
			});
	delegateIdSWTApplication = convertToLong(delegateObjSWTApplication);

	// This doesn't feel right, but it works
	Class<?> swtapplicationdelegateCls = classForName("org.eclipse.swt.internal.cocoa.SWTApplicationDelegate");
	delegate = swtapplicationdelegateCls.newInstance();
	Object delegateAlloc = invoke(delegate, "alloc");
	invoke(delegateAlloc, "init");
	Object delegateIdObj = nsidCls.getField("id").get(delegate);
	delegateJniRef = ((Number) invoke(osCls, "NewGlobalRef", new Class<?>[] {
		Object.class
	}, new Object[] {
		CocoaUIEnhancer.this
	})).longValue();
	if (delegateJniRef == 0)
		SWT.error(SWT.ERROR_NO_HANDLES);
	//OS.object_setInstanceVariable(delegate.id, SWT_OBJECT, delegateJniRef);
	invoke(osCls, "object_setInstanceVariable", new Object[] {
		delegateIdObj,
		SWT_OBJECT,
		wrapPointer(delegateJniRef)
	});
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:35,代码来源:CocoaUIEnhancer.java

示例9: removeDocumentCompletedListener

import org.eclipse.swt.SWT; //导入方法依赖的package包/类
public synchronized void removeDocumentCompletedListener(DocumentCompletedListener listener) {
	composite.checkWidget();
	if (listener == null)
		SWT.error(SWT.ERROR_NULL_ARGUMENT);
	documentCompletedListeners.remove(listener);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:7,代码来源:XulWebViewerImpl.java

示例10: removeHttpProxyEventListener

import org.eclipse.swt.SWT; //导入方法依赖的package包/类
public synchronized void removeHttpProxyEventListener(HttpProxyEventListener listener) {
	composite.checkWidget();
	if (listener == null)
		SWT.error(SWT.ERROR_NULL_ARGUMENT);
	httpProxyEventListeners.remove(listener);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:7,代码来源:XulWebViewerImpl.java

示例11: addSelectionListener

import org.eclipse.swt.SWT; //导入方法依赖的package包/类
/**
 * Adds the listener to the collection of listeners who will be notified when the control 
 * is selected by the user, by sending it one of the messages defined in the 
 * <code>SelectionListener</code> interface.
 * <p>
 * <code>widgetDefaultSelected</code> is not called.
 * </p>
 * 
 * @param listener the listener which should be notified when the control is selected by the user,
 * 
 * @exception IllegalArgumentException <ul>
 *     <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
 * </ul>
 * @exception SWTException <ul>
 *     <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *     <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 * 
 * @see SelectionListener
 * @see #removeSelectionListener
 * @see SelectionEvent
 */
public void addSelectionListener(final SelectionListener listener) {
	checkWidget();
	if (listener == null) {
		SWT.error(SWT.ERROR_NULL_ARGUMENT);
	}
	this.selectionListeners.add(listener);
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:30,代码来源:BreadcrumbItem.java

示例12: removeSelectionListener

import org.eclipse.swt.SWT; //导入方法依赖的package包/类
/**
 * Removes the listener from the collection of listeners who will be notified when the 
 * control is selected by the user.
 * 
 * @param listener the listener which should no longer be notified
 * 
 * @exception IllegalArgumentException <ul>
 *     <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
 * </ul>
 * @exception SWTException <ul>
 *     <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *     <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 * 
 * @see SelectionListener
 * @see #addSelectionListener
 */
public void removeSelectionListener(final SelectionListener listener) {
	checkWidget();
	if (listener == null) {
		SWT.error(SWT.ERROR_NULL_ARGUMENT);
	}
	this.selectionListeners.remove(listener);
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:25,代码来源:BreadcrumbItem.java

示例13: setBounds

import org.eclipse.swt.SWT; //导入方法依赖的package包/类
/**
 * Sets the receiver's size and location to the rectangular area specified by the argument. 
 * The <code>x</code> and <code>y</code> fields of the rectangle are relative to the receiver's 
 * parent (or its display if its parent is null).
 * <p>
 * Note: Attempting to set the width or height of the receiver to a negative number will cause 
 * that value to be set to zero instead.
 * </p>
 * 
 * @param rect the new bounds for the receiver
 * 
 * @exception SWTException <ul>
 *     <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *     <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public void setBounds(final Rectangle rectangle) {
	checkWidget();
	if (this.bounds == null) {
		SWT.error(SWT.ERROR_NULL_ARGUMENT);
	}
	this.bounds = new Rectangle(Math.max(0, rectangle.x), //
			Math.max(0, rectangle.y), //
			Math.max(0, rectangle.width), //
			Math.max(0, rectangle.height));
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:27,代码来源:BreadcrumbItem.java

示例14: getItem

import org.eclipse.swt.SWT; //导入方法依赖的package包/类
/**
 * Returns the item at the given, zero-relative index in the
 * receiver. Throws an exception if the index is out of range.
 *
 * @param index the index of the item to return
 * @return the item at the given index
 *
 * @exception IllegalArgumentException <ul>
 *    <li>ERROR_INVALID_RANGE - if the index is not between 0 and the number of elements in the list minus 1 (inclusive)</li>
 * </ul>
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public BreadcrumbItem getItem(final int index) {
	checkWidget();
	if (index < 0 || index > this.items.size()) {
		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
	}
	return this.items.get(index);
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:23,代码来源:Breadcrumb.java


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