// create a new renderer PdfRenderer renderer = new PdfRenderer(getSeekableFileDescriptor()); // let us just render all pages final int pageCount = renderer.getPageCount(); for (int i = 0; i < pageCount; i++) { Page page = renderer.openPage(i); // say we render for showing on the screen page.render(mBitmap, null, null, Page.RENDER_MODE_FOR_DISPLAY); // do stuff with the bitmap // close the page page.close(); } // close the renderer renderer.close();
@Override protected IConverterLocator newConverterLocator() { ConverterLocator converterLocator = new ConverterLocator(); converterLocator.set(BigDecimal.class, new CustomBigDecimalConverter()); return converterLocator; }
public void onRendered(Component component){ if(model.getObject().isEpicFail()){ component.getResponse().write( "<tr><td colspan=\"3\">This is an epic fail</td></tr>");
/** * Constructor */ public Behavior() { if (Application.exists()) { Application.get().getBehaviorInstantiationListeners().onInstantiation(this); } }
/** * @see org.apache.wicket.IPageMap#remove(org.apache.wicket.Page) */ public void remove(final Page page) { // Remove the pagemap entry from session removeEntry(page.getPageMapEntry()); // Make sure it doesn't get added again at the end of the request cycle Session.get().untouch(page); }
/** * */ private void newSession() { ThreadContext.setSession(null); // the following will create a new session and put it in the thread context session = Session.get(); }
/** * Redirects to any intercept page previously specified by a call to redirectToInterceptPage. * * @return True if an original destination was redirected to * @see Component#redirectToInterceptPage(Page) */ public final boolean continueToOriginalDestination() { return getPage().getPageMap().continueToOriginalDestination(); }
private void internalInvoke(final Component component, final Object target) { // save a reference to the page because the component can be removed // during the invocation of the listener and thus lose its parent Page page = component.getPage(); // initialization is required for stateless pages if (!page.isInitialized()) { page.internalInitialize(); } ((IRequestListener)target).onRequest(); }
/** * Gets the converter that should be used by this component. * * @param type * The type to convert to * * @return The converter that should be used by this component */ public IConverter getConverter(Class/* <?> */type) { return getApplication().getConverterLocator().getConverter(type); }
/** {@inheritDoc} */ @Override public final <T> void send(IEventSink sink, Broadcast type, T payload) { new ComponentEventSender(this, getApplication().getFrameworkSettings()).send(sink, type, payload); }
/** * @see org.apache.wicket.session.ISessionStore.UnboundListener#sessionUnbound(java.lang.String) */ @Override public void sessionUnbound(final String sessionId) { getSessionListeners().onUnbound(sessionId); }
@Override protected void onInitialize() { super.onInitialize(); dequeue(); } /**
private void dequeueChildrenContainer(DequeueContext dequeue, MarkupContainer child) { dequeue.pushContainer(child); child.dequeue(dequeue); dequeue.popContainer(); }
/** * @see org.apache.wicket.IPageMap#remove(org.apache.wicket.Page) */ public final void remove(final Page page) { // Remove the pagemap entry from session removeEntry(page.getPageMapEntry()); // Make sure it doesn't get added again at the end of the request cycle Session.get().untouch(page); }
/** {@inheritDoc} */ @Override public final <T> void send(IEventSink sink, Broadcast type, T payload) { new ComponentEventSender(this, getApplication().getFrameworkSettings()).send(sink, type, payload); }
@Override protected void onInitialize() { super.onInitialize(); dequeue(); } /**
private void dequeueChildrenContainer(DequeueContext dequeue, MarkupContainer child) { dequeue.pushContainer(child); child.dequeue(dequeue); dequeue.popContainer(); }