/** * Set <code>Page</code> parent. Called from <code>Page</code> when added to <code>Page</code> * object. * * @param page Page */ public void setPage(Page page) { if (this.page != null) removePropertyChangeListener(this.page); this.page = page; addPropertyChangeListener(this.page); page.addComponentListener(this); page.addPropertyChangeListener(this); pageSize = page.getSize(); }
/** * Listener to update <code>Page</code> size if it changes. * * @param e ComponentEvent */ public void componentResized(ComponentEvent e) { pageSize = page.getSize(); }