|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Window | +--java.awt.Frame | +--javax.swing.JFrame | +--org.apache.batik.apps.svgviewer.ViewerFrame
This class represents a viewer frame.
Inner Class Summary | |
class |
ViewerFrame.AboutAction
To display the about dialog. |
static interface |
ViewerFrame.Application
To manage the actions associated with the application. |
class |
ViewerFrame.BackAction
To go back to the previous document |
class |
ViewerFrame.DescriptionAction
To display the description of the document |
class |
ViewerFrame.ExportJPGAction
To save the current document as JPG. |
class |
ViewerFrame.ExportPNGAction
To save the current document as PNG. |
class |
ViewerFrame.FixedSizeAction
To make the frame fit the SVG viewport |
class |
ViewerFrame.ForwardAction
To go forward to the previous document |
class |
ViewerFrame.LanguageAction
To show the language dialog. |
class |
ViewerFrame.LocationBarAction
To manage the location bar action |
class |
ViewerFrame.MonitorAction
To display the memory monitor. |
class |
ViewerFrame.NewWindowAction
To create a new frame |
class |
ViewerFrame.OpenAction
To open a new document |
class |
ViewerFrame.OpenPageAction
To open a new document |
class |
ViewerFrame.ProgressivePaintAction
To turn progressive rendering of the offscreen buffer on and off. |
class |
ViewerFrame.ReloadAction
To reload the current document |
protected class |
ViewerFrame.SourceAction
To view the current document source. |
class |
ViewerFrame.StopAction
To stop the current processing |
class |
ViewerFrame.ThumbnailAction
To display the thumbnail view of the document |
class |
ViewerFrame.TreeAction
To display the tree view of the document |
class |
ViewerFrame.URIChooserOKAction
The action associated with the 'OK' button of the URI chooser. |
class |
ViewerFrame.UserStyleAction
To display the user style options dialog. |
Inner classes inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
Inner classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
Inner classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
static java.lang.String |
ABOUT_ACTION
|
protected static javax.swing.JFrame |
aboutFrame
The about frame. |
protected ViewerFrame.Application |
application
The application. |
static java.lang.String |
BACK_ACTION
|
protected ViewerFrame.BackAction |
backAction
The back action |
protected static char[] |
buffer
The input buffer |
protected static java.util.ResourceBundle |
bundle
The resource bundle |
protected JSVGCanvas |
canvas
The SVG canvas. |
static java.lang.String |
CLOSE_ACTION
|
protected java.lang.String |
currentExportPath
The current path where to export files. |
protected java.lang.String |
currentPath
The current path. |
protected static java.awt.Cursor |
DEFAULT_CURSOR
The default cursor. |
protected java.lang.String |
description
The document description. |
static java.lang.String |
DESCRIPTION_ACTION
|
protected DOMViewer |
domViewer
The tree view panel. |
static java.lang.String |
EXIT_ACTION
|
static java.lang.String |
EXPORT_JPG_ACTION
|
static java.lang.String |
EXPORT_PNG_ACTION
|
static java.lang.String |
FIXED_SIZE_ACTION
|
protected boolean |
fixedSize
Has the windows a fixed size? |
static java.lang.String |
FORWARD_ACTION
|
protected ViewerFrame.ForwardAction |
forwardAction
The forward action |
static java.lang.String |
LANGUAGE_ACTION
|
protected LanguageDialog |
languageDialog
The language dialog. |
protected java.util.Map |
listeners
The map that contains the action listeners |
protected int |
loadedDocument
The current document index. |
protected java.util.List |
loadedDocuments
The documents loaded with this viewer. |
protected int |
loadedDocumentsCount
The loaded documents count. |
protected LocationBar |
locationBar
The location bar. |
protected static javax.swing.JFrame |
memoryMonitor
The memory monitor frame. |
static java.lang.String |
MONITOR_ACTION
|
static java.lang.String |
NEW_WINDOW_ACTION
|
static java.lang.String |
OPEN_ACTION
|
static java.lang.String |
OPEN_PAGE_ACTION
|
protected javax.swing.JPanel |
panel
The view panel. |
static java.lang.String |
PROG_PAINT_ACTION
|
protected boolean |
progressivePaintEnabled
Is incremental painting of the offscreen buffer enabled? |
static java.lang.String |
RELOAD_ACTION
|
protected ViewerFrame.ReloadAction |
reloadAction
The reload action |
protected static ResourceManager |
resources
The resource manager |
static java.lang.String |
RESOURCES
The gui resources file name |
static java.lang.String |
SOURCE_ACTION
|
protected StatusBar |
statusBar
The status bar. |
static java.lang.String |
STOP_ACTION
|
protected ViewerFrame.StopAction |
stopAction
The stop action |
protected java.lang.Thread |
thread
The current processing thread |
static java.lang.String |
THUMBNAIL_ACTION
|
protected javax.swing.JFrame |
thumbnailFrame
The thumbnail frame. |
static java.lang.String |
TREE_ACTION
|
protected java.lang.String |
uri
The URI of the current document. |
protected URIChooser |
uriChooser
The uri chooser. |
static java.lang.String |
USER_STYLE_ACTION
|
protected java.lang.String |
userLanguages
The user languages. |
protected UserStyleDialog |
userStyleDialog
The user style dialog. |
protected java.lang.String |
userStyleSheetURI
The user style sheet URI. |
protected static java.awt.Cursor |
WAIT_CURSOR
The wait cursor. |
Fields inherited from class javax.swing.JFrame |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
ViewerFrame(ViewerFrame.Application a)
Creates a new ViewerFrame object. |
Method Summary | |
void |
close()
Closes the frame. |
void |
displayError(java.lang.Exception ex)
Displays an error resulting from the specified Exception. |
void |
displayError(java.lang.String msg)
Displays an error message in the User Agent interface. |
void |
displayMessage(java.lang.String message)
Displays a message in the User Agent interface. |
javax.swing.Action |
getAction(java.lang.String key)
Returns the action associated with the given string or null on error |
java.awt.Point |
getClientAreaLocationOnScreen()
Returns the location on the screen of the client area in the UserAgent. |
EventDispatcher |
getEventDispatcher()
Returns the EventDispatcher used by the
UserAgent to dispatch events on GVT. |
java.lang.String |
getLanguages()
Returns the language settings. |
java.lang.Thread |
getLoadingThread()
Returns the current loading thread if one. |
float |
getPixelToMM()
Returns the pixel to mm factor. |
java.awt.geom.AffineTransform |
getTransform()
Returns the AffineTransform currently
applied to the drawing by the UserAgent. |
java.lang.String |
getUserStyleSheetURI()
Returns the user stylesheet uri. |
java.awt.geom.Dimension2D |
getViewportSize()
Returns the default size of the viewport of this user agent. |
java.lang.String |
getXMLParserClassName()
Returns the class name of the XML parser. |
boolean |
isFixedSize()
Returns the fixedSize field value. |
void |
languageChanged(java.lang.String lang)
Called when the language settings change. |
void |
loadDocument(java.lang.String s)
Loads the given document. |
void |
openLink(SVGAElement elt)
Opens a link. |
void |
processDocumentEvent(DocumentEvent e)
Take action on receipt of a document event. |
void |
processDocumentLoadingEvent(DocumentLoadingEvent e)
Take action on receipt of a document loading event. |
void |
processDocumentPropertyEvent(DocumentPropertyEvent e)
Take action on receipt of a document property change. |
void |
runThread(java.lang.Thread t)
Runs the given thread. |
void |
setFixedSize(boolean b)
Tells the viewer whether or not it must be set to the size of the loaded documents. |
void |
setSVGCursor(java.awt.Cursor cursor)
Informs the user agent to change the cursor. |
void |
userStyleSheetURIChanged(java.lang.String s)
Called when the user stylesheet has changed. |
void |
zoomChanged(float f)
|
Methods inherited from class javax.swing.JFrame |
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Frame |
addNotify, finalize, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, isResizable, remove, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle |
Methods inherited from class java.awt.Window |
addWindowListener, applyResourceBundle, applyResourceBundle, dispose, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isShowing, pack, postEvent, processEvent, removeWindowListener, setCursor, show, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFont, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
Field Detail |
public static final java.lang.String OPEN_ACTION
public static final java.lang.String OPEN_PAGE_ACTION
public static final java.lang.String NEW_WINDOW_ACTION
public static final java.lang.String EXPORT_PNG_ACTION
public static final java.lang.String EXPORT_JPG_ACTION
public static final java.lang.String RELOAD_ACTION
public static final java.lang.String BACK_ACTION
public static final java.lang.String FORWARD_ACTION
public static final java.lang.String CLOSE_ACTION
public static final java.lang.String EXIT_ACTION
public static final java.lang.String SOURCE_ACTION
public static final java.lang.String DESCRIPTION_ACTION
public static final java.lang.String TREE_ACTION
public static final java.lang.String THUMBNAIL_ACTION
public static final java.lang.String STOP_ACTION
public static final java.lang.String FIXED_SIZE_ACTION
public static final java.lang.String PROG_PAINT_ACTION
public static final java.lang.String LANGUAGE_ACTION
public static final java.lang.String USER_STYLE_ACTION
public static final java.lang.String MONITOR_ACTION
public static final java.lang.String ABOUT_ACTION
protected static final java.awt.Cursor DEFAULT_CURSOR
protected static final java.awt.Cursor WAIT_CURSOR
public static final java.lang.String RESOURCES
protected static javax.swing.JFrame memoryMonitor
protected static javax.swing.JFrame aboutFrame
protected static java.util.ResourceBundle bundle
protected static ResourceManager resources
protected static char[] buffer
protected ViewerFrame.Application application
protected LocationBar locationBar
protected java.lang.String uri
protected java.lang.String currentPath
protected java.lang.String currentExportPath
protected URIChooser uriChooser
protected javax.swing.JPanel panel
protected StatusBar statusBar
protected JSVGCanvas canvas
protected java.lang.Thread thread
protected DOMViewer domViewer
protected LanguageDialog languageDialog
protected UserStyleDialog userStyleDialog
protected javax.swing.JFrame thumbnailFrame
protected ViewerFrame.ReloadAction reloadAction
protected ViewerFrame.BackAction backAction
protected ViewerFrame.ForwardAction forwardAction
protected ViewerFrame.StopAction stopAction
protected java.lang.String description
protected boolean fixedSize
protected boolean progressivePaintEnabled
protected java.lang.String userLanguages
protected java.lang.String userStyleSheetURI
protected java.util.List loadedDocuments
protected int loadedDocument
protected int loadedDocumentsCount
protected java.util.Map listeners
Constructor Detail |
public ViewerFrame(ViewerFrame.Application a)
a
- The current application.Method Detail |
public void setFixedSize(boolean b)
public boolean isFixedSize()
public java.lang.Thread getLoadingThread()
public void languageChanged(java.lang.String lang)
languageChanged
in interface LanguageChangeHandler
public void userStyleSheetURIChanged(java.lang.String s)
userStyleSheetURIChanged
in interface UserStyleDialog.ChangeHandler
public void zoomChanged(float f)
zoomChanged
in interface JSVGCanvas.ZoomHandler
public java.awt.geom.Dimension2D getViewportSize()
getViewportSize
in interface UserAgent
public EventDispatcher getEventDispatcher()
EventDispatcher
used by the
UserAgent
to dispatch events on GVT.getEventDispatcher
in interface UserAgent
public void displayError(java.lang.String msg)
displayError
in interface UserAgent
public void displayError(java.lang.Exception ex)
displayError
in interface UserAgent
public void displayMessage(java.lang.String message)
displayMessage
in interface UserAgent
public float getPixelToMM()
getPixelToMM
in interface UserAgent
public java.lang.String getLanguages()
getLanguages
in interface UserAgent
public java.lang.String getUserStyleSheetURI()
getUserStyleSheetURI
in interface UserAgent
public void openLink(SVGAElement elt)
openLink
in interface UserAgent
elt
- The activated link element.public void setSVGCursor(java.awt.Cursor cursor)
setSVGCursor
in interface UserAgent
cursor
- the new cursorpublic void runThread(java.lang.Thread t)
runThread
in interface UserAgent
public java.lang.String getXMLParserClassName()
getXMLParserClassName
in interface UserAgent
public java.awt.geom.AffineTransform getTransform()
AffineTransform
currently
applied to the drawing by the UserAgent.getTransform
in interface UserAgent
public java.awt.Point getClientAreaLocationOnScreen()
getClientAreaLocationOnScreen
in interface UserAgent
public void loadDocument(java.lang.String s)
s
- The document name.public javax.swing.Action getAction(java.lang.String key) throws MissingListenerException
getAction
in interface ActionMap
key
- the key mapped with the action to getMissingListenerException
- if the action is not foundpublic void close()
public void processDocumentEvent(DocumentEvent e)
processDocumentEvent
in interface DocumentListener
public void processDocumentLoadingEvent(DocumentLoadingEvent e)
public void processDocumentPropertyEvent(DocumentPropertyEvent e)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |