net.sourceforge.pavlov.pluglets.feedback.random
Class RandomImage

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by javax.swing.JDialog
                      extended by net.sourceforge.pavlov.pluglets.feedback.AbstractFeedbackPluglet
                          extended by net.sourceforge.pavlov.feedback.old.AbstractFeedbackPanel
                              extended by net.sourceforge.pavlov.pluglets.feedback.random.RandomImage
All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants, AnswerListener, MediaRootChangedListener, Pluglet

public class RandomImage
extends AbstractFeedbackPanel
implements AnswerListener, ActionListener, MediaRootChangedListener

RandomImage is a concrete example of a user feedback module.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  JMenuItem adv
          Describe variable adv here.
protected  JMenuItem begin
          Describe variable begin here.
protected  BeginnerFeedbackMode beginner
          Describe variable beginner here.
protected  CacheObject cacheObject
          Describe variable cacheObject here.
protected  JMenuItem chooseItem
          Describe variable chooseItem here.
protected  ExpertFeedbackMode expert
          Describe variable expert here.
protected  RandomImageFactory ifac
          Describe variable ifac here.
protected  JMenuItem inter
          Describe variable inter here.
protected  IntermediateFeedbackMode intermed
          Describe variable intermed here.
protected  Icon logo
          Describe variable logo here.
protected  JMenuBar menu
          Describe variable menu here.
protected  DefaultVisualFeedbackMode mode
          Describe variable mode here.
protected  HashtableJRadioButtonMenu pix
          Describe variable pix here.
static String PLUGLET_FEEDBACK_IMAGE_RANDOM
           
static String PLUGLET_FEEDBACK_IMAGE_RANDOM_DESCRIPTION
           
protected  JMenuItem refreshItem
          Describe variable refreshItem here.
protected  int rights
          Describe variable rights here.
protected  Dimension screenSize
          Describe variable screenSize here.
protected  JScrollPane scroller
          Describe variable scroller here.
protected  int size
          Describe variable size here.
 
Fields inherited from class net.sourceforge.pavlov.feedback.old.AbstractFeedbackPanel
imageLabel, jCheckBox1, jLabel4, jLabel7
 
Fields inherited from class net.sourceforge.pavlov.pluglets.feedback.AbstractFeedbackPluglet
rb
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
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, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
RandomImage()
          Creates a new RandomImage instance.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Describe actionPerformed method here.
 void answerEvent(AnswerEvent e)
          Describe answerEvent method here.
 String getDescription()
          Describe getDescription method here.
 String getDirectoryName()
          Describe getDirectoryName method here.
 String getName()
          Describe getName method here.
 String getResourcePath(String in)
          Describe getResourcePath method here.
protected  void makeImageBaseMenu()
          Creates a menu allowing the user to select or refresh the base directory * or JAR file for images.
protected  void makeModeMenu()
          Creates the Beginner/Intermediate/Advanced mode Menu.
protected  void makeTitle()
          Sets the window title to "mode: filename"
 void mediaRootChanged()
          Called when user selects a new base directory/JAR for images.
protected  void resetPicture()
          Describe resetPicture method here.
 void setFeedbackMode(DefaultVisualFeedbackMode m)
          Describe setFeedbackMode method here.
 void setFeedbackMode(int i)
          Deprecated.  
protected  void setMessage(String pre)
          Describe setMessage method here.
 void setSticky(boolean s)
          Describe setSticky method here.
 void start()
          Describe start method here.
 
Methods inherited from class net.sourceforge.pavlov.feedback.old.AbstractFeedbackPanel
init, setDirectoryName, setImageSize, setNumberOfActiveItems, setTopMessage
 
Methods inherited from class net.sourceforge.pavlov.pluglets.feedback.AbstractFeedbackPluglet
setVisible, stop, toString
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Dialog
addNotify, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, 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, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, show, size, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PLUGLET_FEEDBACK_IMAGE_RANDOM

public static final String PLUGLET_FEEDBACK_IMAGE_RANDOM
See Also:
Constant Field Values

PLUGLET_FEEDBACK_IMAGE_RANDOM_DESCRIPTION

public static final String PLUGLET_FEEDBACK_IMAGE_RANDOM_DESCRIPTION
See Also:
Constant Field Values

size

protected int size
Describe variable size here.


logo

protected Icon logo
Describe variable logo here.


rights

protected int rights
Describe variable rights here.


ifac

protected RandomImageFactory ifac
Describe variable ifac here.


mode

protected DefaultVisualFeedbackMode mode
Describe variable mode here.


beginner

protected BeginnerFeedbackMode beginner
Describe variable beginner here.


intermed

protected IntermediateFeedbackMode intermed
Describe variable intermed here.


expert

protected ExpertFeedbackMode expert
Describe variable expert here.


cacheObject

protected CacheObject cacheObject
Describe variable cacheObject here.


screenSize

protected Dimension screenSize
Describe variable screenSize here.


scroller

protected JScrollPane scroller
Describe variable scroller here.


refreshItem

protected JMenuItem refreshItem
Describe variable refreshItem here.


chooseItem

protected JMenuItem chooseItem
Describe variable chooseItem here.


begin

protected JMenuItem begin
Describe variable begin here.


inter

protected JMenuItem inter
Describe variable inter here.


adv

protected JMenuItem adv
Describe variable adv here.


pix

protected HashtableJRadioButtonMenu pix
Describe variable pix here.


menu

protected JMenuBar menu
Describe variable menu here.

Constructor Detail

RandomImage

public RandomImage()
Creates a new RandomImage instance.

Method Detail

setFeedbackMode

@Deprecated
public void setFeedbackMode(int i)
Deprecated. 

Describe setFeedbackMode method here.

Parameters:
i - an int value

setFeedbackMode

public void setFeedbackMode(DefaultVisualFeedbackMode m)
Describe setFeedbackMode method here.

Parameters:
m - a DefaultVisualFeedbackMode value

getName

public String getName()
Describe getName method here.

Specified by:
getName in interface Pluglet
Specified by:
getName in class AbstractFeedbackPanel
Returns:
a String value

getDescription

public String getDescription()
Describe getDescription method here.

Specified by:
getDescription in interface Pluglet
Overrides:
getDescription in class AbstractFeedbackPanel
Returns:
a String value

getDirectoryName

public String getDirectoryName()
Describe getDirectoryName method here.

Returns:
a String value

start

public void start()
Describe start method here.

Overrides:
start in class AbstractFeedbackPluglet

resetPicture

protected void resetPicture()
Describe resetPicture method here.


makeTitle

protected void makeTitle()
Sets the window title to "mode: filename"


answerEvent

public void answerEvent(AnswerEvent e)
Describe answerEvent method here.

Specified by:
answerEvent in interface AnswerListener
Overrides:
answerEvent in class AbstractFeedbackPluglet
Parameters:
e - an AnswerEvent value

setMessage

protected void setMessage(String pre)
Describe setMessage method here.

Overrides:
setMessage in class AbstractFeedbackPanel
Parameters:
pre - a String value

actionPerformed

public void actionPerformed(ActionEvent e)
Describe actionPerformed method here.

Specified by:
actionPerformed in interface ActionListener
Overrides:
actionPerformed in class AbstractFeedbackPluglet
Parameters:
e - a java.awt.event.ActionEvent value

mediaRootChanged

public void mediaRootChanged()
Called when user selects a new base directory/JAR for images.

Specified by:
mediaRootChanged in interface MediaRootChangedListener

makeModeMenu

protected void makeModeMenu()
Creates the Beginner/Intermediate/Advanced mode Menu.


makeImageBaseMenu

protected void makeImageBaseMenu()
Creates a menu allowing the user to select or refresh the base directory * or JAR file for images.


getResourcePath

public String getResourcePath(String in)
Describe getResourcePath method here.

Parameters:
in - a String value
Returns:
a String value

setSticky

public void setSticky(boolean s)
Describe setSticky method here. FIXME: broke sticky images in 1.0 push.

Parameters:
s - a boolean value