private void setDecodingNow(boolean decodingNow) { if (this.decodingNow != decodingNow) { this.decodingNow = decodingNow; if (decodingNow) { documentView.getProgressModel().increase(); } else { documentView.getProgressModel().decrease(); } } }
/** * This method is called if this interceptor "wins the request". We intercepted creation of new * frames and loading of empty documents. Do it now. * * @param aURL describes the document * @param lArguments optional arguments for loading */ private void impl_dispatch( /*IN*/ com.sun.star.util.URL aURL, /*IN*/ com.sun.star.beans.PropertyValue[] lArguments) { synchronized (this) { if (m_bDead) return; } if ((aURL.Complete.startsWith("slot:5300")) || (aURL.Complete.startsWith(".uno:Quit"))) { System.exit(0); } else if (aURL.Complete.startsWith("private:factory")) { // Create view frame for showing loaded documents on demand. // The visible state is necessary for JNI functionality to get the HWND and plug office // inside a java window hierarchy! DocumentView aNewView = new DocumentView(); aNewView.setVisible(true); aNewView.createFrame(); aNewView.load(aURL.Complete, lArguments); } }
private void setBitmap(Bitmap bitmap) { if (bitmap != null && bitmap.getWidth() == -1 && bitmap.getHeight() == -1) { return; } if (this.bitmap != bitmap) { if (bitmap != null) { if (this.bitmap != null) { this.bitmap.recycle(); } bitmapWeakReference = new SoftReference<Bitmap>(bitmap); documentView.postInvalidate(); } this.bitmap = bitmap; } }
private boolean thresholdHit() { float zoom = documentView.zoomModel.getZoom(); int mainWidth = documentView.getWidth(); float height = page.getPageHeight(mainWidth, zoom); return (mainWidth * zoom * height) / (treeNodeDepthLevel * treeNodeDepthLevel) > SLICE_SIZE; }
private boolean isVisible() { return RectF.intersects(documentView.getViewRect(), getTargetRectF()); }
@Override public void run() { _view.refresh(); }