snap
Class Snapplet

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--javax.swing.JApplet
                                |
                                +--snap.Snapplet
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, Snapable

public abstract class Snapplet
extends javax.swing.JApplet
implements Snapable

An abstract applet that implements the Snapable interface. The developer must fill in some of the functionality that is component-specific.

Author:
Nathan Conklin - nathan@conklinfamily.net, Chris North - north@cs.vt.edu
See Also:
Serialized Form

Field Summary
 
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
Snapplet()
           
 
Method Summary
 void addSnapEventListener(snap.SnapEventListener sel)
          Adds a listener for snap events.
 void fireSnapEvent(snap.SnapEvent snapEvent)
          Fires a SnapEvent to all registered listeners.
 javax.swing.Icon getIcon()
          Returns null, setting the Icon to a default Icon.
abstract  java.util.Enumeration getSupportedActions()
          Returns an Enumeration of actions (as Strings) that the component can perform and will fire as SnapEvents.
abstract  void load(java.sql.ResultSet rs, java.lang.String primaryKeyColumnName)
          Method called when Snap needs to load data into the visualization.
abstract  void performSnapEvent(snap.SnapEvent e)
          Executes the appropriate action for the SnapEvent.
 void removeSnapEventListener(snap.SnapEventListener sel)
          Removes a listener for snap events.
 
Methods inherited from class javax.swing.JApplet
getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, update
 
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, 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, isFocusTraversable, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Snapplet

public Snapplet()
Method Detail

addSnapEventListener

public void addSnapEventListener(snap.SnapEventListener sel)
Adds a listener for snap events.

Specified by:
addSnapEventListener in interface Snapable

removeSnapEventListener

public void removeSnapEventListener(snap.SnapEventListener sel)
Removes a listener for snap events.

Specified by:
removeSnapEventListener in interface Snapable

fireSnapEvent

public void fireSnapEvent(snap.SnapEvent snapEvent)
Fires a SnapEvent to all registered listeners.


getIcon

public javax.swing.Icon getIcon()
Returns null, setting the Icon to a default Icon. This method should be overloaded in extending subclasses to return the Icon for the new visualization.

Specified by:
getIcon in interface Snapable

load

public abstract void load(java.sql.ResultSet rs,
                          java.lang.String primaryKeyColumnName)
Method called when Snap needs to load data into the visualization.

Specified by:
load in interface Snapable
Parameters:
rs - the data to be loaded by the component
primaryKeyColumnName - identifies the column to be used when throwing and receiving SnapEvents.

getSupportedActions

public abstract java.util.Enumeration getSupportedActions()
Returns an Enumeration of actions (as Strings) that the component can perform and will fire as SnapEvents.

Specified by:
getSupportedActions in interface Snapable

performSnapEvent

public abstract void performSnapEvent(snap.SnapEvent e)
Executes the appropriate action for the SnapEvent.

Specified by:
performSnapEvent in interface Snapable