JDK-6748082 : remove platform-specific code from SwingUtilities2.isDisplayLocal
Type:Bug
Component:client-libs
Sub-Component:2d
Affected Version:7
Priority:P4
Status:Resolved
Resolution:Fixed
OS:generic
CPU:generic
Submitted:2008-09-12
Updated:2010-04-02
Resolved:2009-01-09
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
rkennke: In SwingUtilities2.isLocalDisplay(), we have some crazy platform
specific code to find if we have a local display or not. This is of
course not very nice for other Toolkit implementations than the Win32
and X11 ones in OpenJDK.
EVALUATION
rkennke:
Our solution is to introduce an abstract method
isLocalDisplay() in SunGraphicsEnvironment, which we call from
SwingUtilities2. This method is then overridden by the specific GE
implementations. If we don't have a SGE, we assume a local display.
There are also some changes in the native font code, which used to call
the static X11GraphicsEnvironment.isLocalDisplay(), to call the new
instance method in SGE.