java.lang.Object
org.jpo.gui.PictureViewer
- All Implemented Interfaces:
NodeNavigatorListener
,AutoAdvanceInterface
PictureViewer is a Controller that manages a window which displays a picture. It
concerns itself with which picture from the Naviator Context should be displayed.
It provides navigation control over the collection as well as mouse and
keyboard control over the zooming.
The user can zoom in on a picture coordinate by clicking the left mouse button. The middle button scales the picture so that it fits in the available space and centers it there. The right mouse button zooms out.
-
Constructor Summary
ConstructorDescriptionPictureViewer
(ShowPictureRequest request) This is a Controller that works off a NodeNavigatorInterface. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Don't use: accessor to the private closeViewer function for unit tests.Don't use: accessor to the private getCurrentNode method for unit tests.void
gets called when the Navigator notices a changevoid
showNode
(NodeNavigatorInterface newNodeNavigator, int newIndex) Puts the picture of the indicated node onto the viewer panelvoid
startAdvanceTimer
(int seconds) This method sets up the Advance Timervoid
The location and size of the Window can be changed by a call to this method
-
Constructor Details
-
PictureViewer
This is a Controller that works off a NodeNavigatorInterface. It opens a new window and shows the picture pointed at by the NodeNavigator and the index. It has buttons to navigate, shows the description and responds to mouse actions of the user.
-
-
Method Details
-
closeViewerTest
@TestOnly public void closeViewerTest()Don't use: accessor to the private closeViewer function for unit tests. -
getCurrentNodeTest
Don't use: accessor to the private getCurrentNode method for unit tests.- Returns:
- the current node
-
nodeLayoutChanged
public void nodeLayoutChanged()gets called when the Navigator notices a change- Specified by:
nodeLayoutChanged
in interfaceNodeNavigatorListener
-
startAdvanceTimer
public void startAdvanceTimer(int seconds) This method sets up the Advance Timer- Specified by:
startAdvanceTimer
in interfaceAutoAdvanceInterface
- Parameters:
seconds
- Seconds
-
switchWindowMode
The location and size of the Window can be changed by a call to this method- Parameters:
newMode
- new window mode
-