|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.swing.pageview.AbstractContinuousLayout
public abstract class AbstractContinuousLayout
Field Summary | |
---|---|
protected Rectangle |
aggregateBounds
|
protected int |
currentPageIndexCache
|
protected EventList<Page> |
pageList
|
protected ArrayList<com.levigo.jadice.swing.pageview.RenderedPage> |
renderedPages
|
protected AtomicBoolean |
renderingValid
|
protected PageView |
view
|
Constructor Summary | |
---|---|
AbstractContinuousLayout(PageView view)
|
Method Summary | |
---|---|
boolean |
canHandle(Document document)
Verify whether this PageLayout is prepared to deal with the given document. |
protected abstract void |
doLayout()
This method must be implemented in order to provide the actual layout functionality. |
abstract com.levigo.jadice.swing.pageview.RenderedPage |
findPageNextTo(Point p)
Find the page closest to the given point. |
int |
getAdjacentNavigationIndex(Rectangle visibleRect,
Position.Bias bias)
By default, we assume a navigation increment of one. |
Rectangle |
getAggregateBounds()
|
int |
getCurrentPageIndex(Rectangle visibleRect)
|
com.levigo.jadice.swing.pageview.RenderedPage |
getCurrentRenderedPage(Rectangle visibleRect)
|
Dimension |
getPreferredSize(Dimension viewportSize)
Return the preferred size occupied by the laid-out pages based on the given viewport size. |
com.levigo.jadice.swing.pageview.RenderedPage |
getRenderedPage(Page p)
|
List<com.levigo.jadice.swing.pageview.RenderedPage> |
getRenderedPages()
|
void |
invalidate()
Invalidate the layout. |
void |
listChanged(ListEvent<Page> listChanges)
When the underlying list changes, this notification allows the object to repaint itself or update itself as necessary. |
protected void |
revalidateView()
Synchronously invalidate then validate the view size, so that the view size is updated immediately. |
void |
setCurrentPageIndex(int index)
|
void |
setPageList(EventList<Page> pageList)
Set the current document. |
void |
validate()
Validate the layout. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int currentPageIndexCache
protected final ArrayList<com.levigo.jadice.swing.pageview.RenderedPage> renderedPages
protected final Rectangle aggregateBounds
protected final AtomicBoolean renderingValid
protected final PageView view
protected EventList<Page> pageList
Constructor Detail |
---|
public AbstractContinuousLayout(PageView view)
Method Detail |
---|
public void setPageList(EventList<Page> pageList)
public void setCurrentPageIndex(int index)
public List<com.levigo.jadice.swing.pageview.RenderedPage> getRenderedPages()
public Rectangle getAggregateBounds()
public int getCurrentPageIndex(Rectangle visibleRect)
public void listChanged(ListEvent<Page> listChanges)
ListEventListener
It is mandatory that the calling thread has obtained the write lock on the source list. This is because the calling thread will have written to the source list to cause this event. This condition guarantees that no writes can occur while the listener is handling this event. It is an error to write to the source list while processing an event.
public com.levigo.jadice.swing.pageview.RenderedPage getCurrentRenderedPage(Rectangle visibleRect)
public com.levigo.jadice.swing.pageview.RenderedPage getRenderedPage(Page p)
public boolean canHandle(Document document)
public void validate()
public void invalidate()
protected abstract void doLayout()
public abstract com.levigo.jadice.swing.pageview.RenderedPage findPageNextTo(Point p)
null
if there is no page at all.
public int getAdjacentNavigationIndex(Rectangle visibleRect, Position.Bias bias)
visibleRect
- the visible regionbias
- the direction for which to return the next index. See Position.Bias.Forward
,
Position.Bias.Backward
.
PageLayout.getAdjacentNavigationIndex(java.awt.Rectangle,
javax.swing.text.Position.Bias)
protected void revalidateView()
public Dimension getPreferredSize(Dimension viewportSize)
null
, if the client PageView doesn't
reside within a viewport.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |