public void deinstall(XHTMLPanel panel) { if (panel.getTransferHandler() == handler) { panel.setTransferHandler(null); } panel.removeMouseListener(this); panel.removeMouseMotionListener(this); }
/** * Sets the SharedContext for rendering. * * @param ctx The new renderingContext value */ public void setSharedContext(SharedContext ctx) { panel.setSharedContext(ctx); }
/** * Creates a new renderer with no document specified. */ public Graphics2DRenderer() { panel = new XHTMLPanel(); panel.setInteractive(false); }
/** * Renders an XML Document instance. * Make sure that no relative resources are needed * * @param doc The document to render. */ public void setDocument(Document doc) { setDocument(doc, ""); }
/** * Loads and renders a Document given a uri. * The uri is resolved by the UserAgentCallback * * @param uri */ public void setDocument(String uri) { setDocument(loadDocument(uri), uri); }
/** * Gets the SharedContext for layout and rendering. * * @return see desc */ public SharedContext getSharedContext() { return panel.getSharedContext(); }
/** * Instantiates a panel with a custom {@link org.xhtmlrenderer.extend.UserAgentCallback} * implementation. * * @param uac The custom UserAgentCallback implementation. */ public XHTMLPanel(UserAgentCallback uac) { super(uac); setupListeners(); }
/** * Increments all rendered fonts on the current document by the current * scaling factor for the panel. Scaling applies culmulatively, which means that * multiple calls to this method scale fonts larger and larger by applying the * current scaling factor against itself. You can modify the scaling factor by * {@link #setFontScalingFactor(float)}, and reset to the document's specified * font size with {@link #resetFontSize()}. */ public void incrementFontSize() { scaleFont(fontScalingFactor); }
/** * Loads and renders a Document given a uri. The uri is resolved by the * UserAgentCallback * * @param uri */ public void setDocument(String uri) { setDocument(loadDocument(uri), uri); }
public void run() { if (panel != null) { panel.scrollRectToVisible(r); } }
/** * Renders an XML Document instance. Make sure that no relative resources * are needed * * @param doc The document to render. */ public void setDocument(Document doc) { setDocument(doc, ""); }
/** * Creates a new renderer with no document specified. */ public Graphics2DRenderer() { panel = new XHTMLPanel(); panel.setInteractive(false); }
/** * Set the document to be rendered, lays it out, and * renders it. * * @param url the URL for the document to render. */ public void setDocument(String url) { panel.setDocument(url); }
public void deinstall(XHTMLPanel panel) { if (panel.getTransferHandler() == handler) { panel.setTransferHandler(null); } panel.removeMouseListener(this); panel.removeMouseMotionListener(this); }
/** * Instantiates a panel with a custom {@link org.xhtmlrenderer.extend.UserAgentCallback} * implementation. * * @param uac The custom UserAgentCallback implementation. */ public XHTMLPanel(UserAgentCallback uac) { super(uac); setupListeners(); }
/** * Sets the SharedContext for rendering. * * @param ctx The new renderingContext value */ public void setSharedContext(SharedContext ctx) { panel.setSharedContext(ctx); }
/** * Decrements all rendered fonts on the current document by the current * scaling factor for the panel. Scaling applies culmulatively, which means that * multiple calls to this method scale fonts smaller and smaller by applying the * current scaling factor against itself. You can modify the scaling factor by * {@link #setFontScalingFactor(float)}, and reset to the document's specified * font size with {@link #resetFontSize()}. */ public void decrementFontSize() { scaleFont(1 / fontScalingFactor); }
/** * Sets the document to render, lays it out, and renders it. * * @param doc the Document to render * @param base_url base URL for relative links within the Document. */ public void setDocument(Document doc, String base_url) { panel.setDocument(doc, base_url); }
/** * Instantiates an XHTMLPanel with no {@link Document} loaded by default. */ public XHTMLPanel() { setupListeners(); }
/** * Renders an XML Document instance. * Make sure that no relative resources are needed * * @param doc The document to render. */ public void setDocument(Document doc) { setDocument(doc, ""); }