|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.apache.batik.swing.JSVGScrollPane
public class JSVGScrollPane
A Swing component that consists of a JSVGCanvas with optional scroll bars.
Reimplementation, rather than imlementing the Scrollable interface, provides several advantages. The main advantage is the ability to control more precisely ScrollBar events; fewer JSVGCanvas updates are required when scrolling. This creates a significant performance (reflected by an increase in scroll speed) advantage compared to implementing the Scrollable interface.
Nested Class Summary | |
---|---|
protected class |
JSVGScrollPane.SBListener
Advanced JScrollBar listener. |
protected class |
JSVGScrollPane.ScrollListener
Handle scroll, zoom, and resize events |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected JSVGCanvas |
canvas
|
protected Component |
cornerBox
|
protected JScrollBar |
horizontal
|
protected JPanel |
horizontalPanel
|
protected JSVGScrollPane.SBListener |
hsbListener
|
protected boolean |
ignoreScrollChange
|
protected boolean |
scrollbarsAlwaysVisible
|
protected JScrollBar |
vertical
|
protected Rectangle2D |
viewBox
|
protected JSVGScrollPane.SBListener |
vsbListener
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JSVGScrollPane(JSVGCanvas canvas)
Creates a JSVGScrollPane, which will scroll an JSVGCanvas. |
Method Summary | |
---|---|
protected void |
checkAndSetViewBoxRect()
Derives the SVG Viewbox from the SVG root element. |
protected SVGDocumentLoaderListener |
createLoadListener()
Factory method so subclasses can override the default load listener. |
protected JSVGScrollPane.SBListener |
createScrollBarListener(boolean isVertical)
Scrollbar listener factory method so subclasses can override the default SBListener behaviour. |
protected JSVGScrollPane.ScrollListener |
createScrollListener()
Factory method so subclasses can override the default listener behaviour |
JSVGCanvas |
getCanvas()
|
boolean |
getScrollbarsAlwaysVisible()
|
protected Rectangle2D |
getViewBoxRect()
|
void |
reset()
Resets this object (for reloads), releasing any cached data and recomputing scroll extents. |
protected void |
resizeScrollBars()
Compute the scrollbar extents, and determine if scrollbars should be visible. |
void |
scaleChange(float scale)
Called when the scale size changes. |
void |
setScrollbarsAlwaysVisible(boolean vis)
|
protected void |
setScrollPosition()
Sets the translation portion of the transform based upon the current scroll bar position |
protected void |
updateScrollbarState(boolean hNeeded,
boolean vNeeded)
|
protected Dimension |
updateScrollbarVisibility(int tx,
int ty,
int maxW,
int maxH)
|
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected JSVGCanvas canvas
protected JPanel horizontalPanel
protected JScrollBar vertical
protected JScrollBar horizontal
protected Component cornerBox
protected boolean scrollbarsAlwaysVisible
protected JSVGScrollPane.SBListener hsbListener
protected JSVGScrollPane.SBListener vsbListener
protected Rectangle2D viewBox
protected boolean ignoreScrollChange
Constructor Detail |
---|
public JSVGScrollPane(JSVGCanvas canvas)
Method Detail |
---|
public boolean getScrollbarsAlwaysVisible()
public void setScrollbarsAlwaysVisible(boolean vis)
protected JSVGScrollPane.SBListener createScrollBarListener(boolean isVertical)
protected JSVGScrollPane.ScrollListener createScrollListener()
protected SVGDocumentLoaderListener createLoadListener()
public JSVGCanvas getCanvas()
public void reset()
protected void setScrollPosition()
protected void resizeScrollBars()
protected Dimension updateScrollbarVisibility(int tx, int ty, int maxW, int maxH)
protected void updateScrollbarState(boolean hNeeded, boolean vNeeded)
protected void checkAndSetViewBoxRect()
protected Rectangle2D getViewBoxRect()
public void scaleChange(float scale)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |