|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
thinlet.Thinlet
com.photoviewer.client.PhotoViewer
PhotoViewer is the main API for the client. This class performs the client initialization (fetching the directory.zip file), provides access to the Applet instance, provides access to a simple JOptionPane-like popup message dialog, and provides an API for updating the progress meter on the main page, handles all callbacks from the Thinlet GUI widgets (and dispatches those callbacks to the appropriate handler objects). It also provides the implementation and content for the Technical tab as well as access to a utility method for fetching documents via HTTP.
Nested Class Summary |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
static java.lang.String |
AD_INDEX
|
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 | |
PhotoViewer(java.applet.Applet applet)
Default constructor for use with classForName() |
Method Summary | |
protected void |
addTechRow(java.lang.String key,
java.lang.String value)
Add a row of information key-value pairs to the tech info table |
void |
characters(java.lang.String text)
XML Parser callback |
protected void |
endElement()
XML Parser callback |
java.lang.Object |
find(java.lang.String componentName)
Locate a component by componentName. |
void |
firstScreenImage()
Callback method triggered when the Previous Image button is pressed. |
void |
firstThumbPage()
Callback method triggered when the Previous Thumb Page button is pressed. |
java.lang.String |
getCodeBase()
|
byte[] |
getContent(java.lang.String uri)
Load content from Applet, using it's ClassLoader, which will attempt to find it in the codebase, and if it fails, will also try the server from which the Applet was loaded. |
java.awt.Image |
getIcon(java.lang.String path,
boolean preload)
Override parent class method because it does not work on Microsoft's Java 1.1 VM. |
java.lang.String |
getJavaVersion()
|
java.io.InputStream |
getResource(java.lang.String uri)
Fetch a resource from the classpath |
int |
getSelectedThumb()
Get the index of the "currently selected" thumb, independent of view. |
void |
gotoURL(java.lang.String url)
Send the browser to the URL passed in. |
void |
installParser(ThinletXmlParser parser)
Install a new parser for processing a new document type. |
void |
lastScreenImage()
Callback method triggered when the Next Image button is pressed. |
void |
lastThumbPage()
Callback method triggered when the Next Thumb Page button is pressed. |
java.awt.Image |
loadImageURL(java.lang.String url,
long waitTime)
Load an image from the given URL, and wait for it to complete loading. |
void |
nextScreenImage()
Callback method triggered when the Next Image button is pressed. |
void |
nextThumbPage()
Callback method triggered when the Next Thumb Page button is pressed. |
void |
prevScreenImage()
Callback method triggered when the Previous Image button is pressed. |
void |
prevThumbPage()
Callback method triggered when the Previous Thumb Page button is pressed. |
void |
setSelectedThumb(int i)
Store the current thumbnail index, independent of the view. |
void |
showDocument(java.net.URL url)
|
void |
sortByCategory()
Callback method triggered when the sort by Category button is pressed |
void |
sortByDate()
Callback method triggered when the Sort by date button is pressed |
void |
start()
Initialize the thinlet |
protected void |
startElement(java.lang.String tag,
java.util.Hashtable attributes)
XML Parser callback |
void |
tabChanged()
Callback method triggered when the tabs at the top of the application are selected. |
void |
thumbClicked(java.lang.String componentName)
Called when the thumbnails are clicked |
void |
updateTechInfo()
Callback method triggered when the Update tech info button is pressed |
void |
viewFullImage()
Tell the browser to show the full image for printing, saving. |
Methods inherited from class thinlet.Thinlet |
add, add, add, create, destroy, find, getBoolean, getChoice, getClass, getCount, getDesktop, getDOMAttribute, getDOMCount, getDOMNode, getDOMText, getIcon, getIcon, getInteger, getItem, getItems, getLangResource, getLangResourceDefault, getParent, getPreferredSize, getProperty, getSelectedIndex, getSelectedItem, getSelectedItems, getString, getWidget, handleException, isFocusTraversable, paint, parse, parse, parse, parse, parseDOM, parseXML, processEvent, putProperty, remove, removeAll, repaint, requestFocus, run, setAllI18n, setBoolean, setChoice, setColor, setColors, setFocus, setFont, setFont, setFont, setIcon, setInteger, setKeystroke, setLangResource, setLangResourceDefault, setMethod, setResourceBundle, setString, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String AD_INDEX
Constructor Detail |
public PhotoViewer(java.applet.Applet applet)
Method Detail |
public void start()
public void showDocument(java.net.URL url)
url
- URL to show in the browserpublic java.lang.String getCodeBase()
public void tabChanged()
public void firstScreenImage()
public void prevScreenImage()
public void nextScreenImage()
public void lastScreenImage()
public void firstThumbPage()
public void prevThumbPage()
public void nextThumbPage()
public void lastThumbPage()
public void thumbClicked(java.lang.String componentName)
public void sortByDate()
public void sortByCategory()
public void updateTechInfo()
public java.lang.String getJavaVersion()
protected void addTechRow(java.lang.String key, java.lang.String value)
key
- String property keyvalue
- String property valuepublic java.lang.Object find(java.lang.String componentName)
componentName
- String componentName of the component to locate
public void installParser(ThinletXmlParser parser)
parser
- ThinletXmlParser instance to use for the next parseXML()
invocation.protected void startElement(java.lang.String tag, java.util.Hashtable attributes)
tag
- String name of element being processedattributes
- Hashtable of attribute key/value pairs for the element being processed.protected void endElement()
public void characters(java.lang.String text)
text
- String content that appears between the Start and End element tagspublic java.io.InputStream getResource(java.lang.String uri)
uri
- String describing resource to load.
public byte[] getContent(java.lang.String uri)
uri
- String resource name
public void viewFullImage()
public void setSelectedThumb(int i)
i
- int index of the "current" thumbnail.public int getSelectedThumb()
public void gotoURL(java.lang.String url)
url
- public java.awt.Image loadImageURL(java.lang.String url, long waitTime)
url
- URL of the image.waitTime
- the amount of milliseconds to wait for the image to load.
public java.awt.Image getIcon(java.lang.String path, boolean preload)
path
- is relative to your thinlet instance or the classpath, or an URLpreload
- waits for the whole image if true, starts loading
(and repaints, and updates the layout) only when required (painted, or size requested) if false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |