Display.getDefault(): 该方法会返回用户图形界面线程中的Display实例,不管当前线程是否是用户图形界面线程.如果这个实例不存在,默认创建一个用户图形界面线程中的Display实例.
/**
* Returns the default display. One is created (making the thread that
* invokes this method its user-interface thread) if it did not already
* exist.
*
* @return the default display
*/
public static Display getDefault()
{
synchronized (Device.class)
{
if (Default == null)
Default = new Display();
return Default;
}
}
Display.getCurrent(): 返回当前线程中的Display实例.如果这是一个图形界面线程,实例非空;如果当前线程不是一个图形界面线程,则实例为空.
/**
* Returns the display which the currently running thread is the
* user-interface thread for, or null if the currently running thread is not
* a user-interface thread for any display.
*
* @return the current display
*/
public static Display getCurrent()
{
return findDisplay(Thread.currentThread());
}
分享到:
相关推荐
14.1.3. 使用静态 get() 方法 14.2. 标准过滤器类 14.2.1. Alnum 14.2.2. Alpha 14.2.3. BaseName 14.2.4. Digits 14.2.5. Dir 14.2.6. HtmlEntities 14.2.7. Int 14.2.8. RealPath 14.2.9. StringToLower...
Bootstrapping pip By Default Documentation Changes PEP 446: Newly Created File Descriptors Are Non-Inheritable Improvements to Codec Handling PEP 451: A ModuleSpec Type for the Import System ...
Called by the server (via the service method) to allow a servlet to handle a GET request. doHead(HttpServletRequest, HttpServletResponse) - Method in class javax.servlet.http.HttpServlet Receives an...
Current working directory (except CLI) ; 5. The web server's directory (for SAPI modules), or directory of PHP ; (otherwise in Windows) ; 6. The directory from the --with-config-file-path compile ...
Display 实例的创建可以使用 getDefault() 方法,第一次调用将创建一个新的 Display 实例,后续调用将获取已经创建的 Display 实例。getCurrent() 方法可以获取当前线程对应的 Display 实例。 需要注意的是,一个...
non-current slot (default: current active slot). --set-active[=SLOT] Sets the active slot before rebooting. --skip-secondary Don't flash secondary slots in flashall/update. --skip-reboot Don't ...
- FIX The current scale ignores in TFlexBox.GetRefreshRect and TFlexEllipse.GetRefreshRect methods for pen width calculation. - FIX The method TFlexText.GetRefreshRect don't takes into account the ...
this.element.bind("remove."+this.widgetName,function(){d.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return a.metadata&&a.metadata.get(this.element[0]...
InitialSessionState initialSessionState = InitialSessionState.CreateDefault(); using (PowerShell powershell = PowerShell.Create(initialSessionState)) { powershell.AddCommand("Get-AppxPackage"); ...
NEURAL NETWORK PC TOOLS SOFTWARE USER'S ... present in the file, the current version of hinton.exe does not portray the bias weights. This will be changed in the next version of hinton.exe. ...
- change in RTF reader to let section inherit the default layout, not the current page layout - fix of problem with table borders when also PageMirror was used. * change to DeleteMarkedChar. It now ...
Get the Selected Cells, Rows, and Columns in the Windows Forms DataGridView Control Samples: 见msdn。 10、显示录入时出现的错误信息 Handle Errors that Occur During Data Entry in the Windows Forms ...
与加权限不一样,赋权限有覆盖的效果。 主要形式有如下几种 chmod u+rw chmod u=rw chmod u+r, u+w chmod u+rw,g+w, o+r chmod 777( 用数字的方式设置权限是最常用的) 数字表示权限时,各数位分别表示属主、属...
* Asynchronous targets appears to be broken in the current release. * When TDropFileTarget.GetDataOnEnter is set to True, the component doesn't work with WinZip. Although the file names are ...
objReg.GetStringValue strKeyPath, arrSubKeys(i), "DisplayName", strAppName objReg.GetStringValue strKeyPath, arrSubKeys(i), "DisplayVersion", strAppVersion If strAppName <> "" And strAppVersion ...
specify macros for current page, current date, current time and/or static text. Automatically print/preview multiselected area of TDBGridEh if it area is not empty. Ability to print/preview ...
o Fixed bug: CurrPorts failed to display the current Auto Refresh status in Menu. * Version 1.40: o Added support for IPv6. * Version 1.37: o Fixed bug: CurrPorts failed to display process ...
- A printer to run the printer test, set-up as the default printer in Windows. - A CD ROM + 1 Music CD or Data CD to run the CD test. - A CD-RW to run the CD burn test. - A network connection and the ...
Flash Rendering (ASP.NET Enterprise Edition only) - Looking for Flash Charts to complement your current or new web projects? Version 4.0 now fully supports Flash, opening up a whole new dimension to ...
* Sentinel value for no current active pointer. Used by * {@link #mActivePointerId}. */ private static final int INVALID_POINTER = -1; /** * Determines speed during touch scrolling */ ...