@Override public final int[] convertToWindowUnits(final int[] pixelUnitsAndResult) { pixelUnitsAndResult[0] /= getPixelScaleX(); pixelUnitsAndResult[1] /= getPixelScaleY(); return pixelUnitsAndResult; }
@Override public final int[] convertToPixelUnits(final int[] windowUnitsAndResult) { windowUnitsAndResult[0] *= getPixelScaleX(); windowUnitsAndResult[1] *= getPixelScaleY(); return windowUnitsAndResult; }
@Override public final int getSurfaceWidth() { return getWidth() * getPixelScaleX(); }
protected StringBuilder jawt2String(StringBuilder sb) { if( null == sb ) { sb = new StringBuilder(); } sb.append("JVM version: ").append(PlatformPropsImpl.JAVA_VERSION).append(" ("). append(PlatformPropsImpl.JAVA_VERSION_NUMBER). append(" update ").append(PlatformPropsImpl.JAVA_VERSION_UPDATE).append(")").append(Platform.getNewline()); if(null != jawt) { sb.append("JAWT version: ").append(toHexString(jawt.getCachedVersion())). append(", CA_LAYER: ").append(JAWTUtil.isJAWTUsingOffscreenLayer(jawt)). append(", isLayeredSurface ").append(isOffscreenLayerSurfaceEnabled()). append(", bounds ").append(bounds).append(", insets ").append(insets). append(", pixelScale ").append(getPixelScaleX()).append("x").append(getPixelScaleY()); } else { sb.append("JAWT n/a, bounds ").append(bounds).append(", insets ").append(insets); } return sb; }
@Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append(jawtStr()+"["); jawt2String(sb); sb.append( ", shallUseOffscreenLayer "+shallUseOffscreenLayer+", isOffscreenLayerSurface "+isOffscreenLayerSurface+ ", attachedSurfaceLayer "+toHexString(getAttachedSurfaceLayer())+ ", windowHandle "+toHexString(getWindowHandle())+ ", surfaceHandle "+toHexString(getSurfaceHandle())+ ", bounds "+bounds+", insets "+insets ); sb.append(", window ["+getX()+"/"+getY()+" "+getWidth()+"x"+getHeight()+ "], pixels[s "+getPixelScaleX()+"x"+getPixelScaleY()+" -> "+getSurfaceWidth()+"x"+getSurfaceHeight()+"]"+ ", visible "+component.isVisible()); sb.append(", lockedExt "+isSurfaceLockedByOtherThread()+ ",\n\tconfig "+config+ ",\n\tawtComponent "+getAWTComponent()+ ",\n\tsurfaceLock "+surfaceLock+"]"); return sb.toString(); }