org.sourceforge.espro.elicitation
Class DProbWheel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by org.sourceforge.espro.elicitation.ElicitationMethod
                  extended by org.sourceforge.espro.elicitation.PointMethod
                      extended by org.sourceforge.espro.elicitation.DProbWheel
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, ModelInterface

public class DProbWheel
extends PointMethod

This is the direct probability wheel, where the expert can adjust the proportions of the wheel to show the probability.

Version:
2.0
Author:
(c) 2007 Martin Kaffanke
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class org.sourceforge.espro.elicitation.PointMethod
value
 
Fields inherited from class org.sourceforge.espro.elicitation.ElicitationMethod
frozen, g2, pcs
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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
  DProbWheel()
          The Constructor.
protected DProbWheel(java.lang.String name, java.lang.String category)
          Constructor for extending classes.
 
Method Summary
protected  void addSelfListeners()
          DOCUMENT ME!
protected  void adjustValue(int x, int y)
          According that the center point of the wheel is also in the center of the component, this will calculate the value out of the given x/y (mouse) coordinates.
protected  double calcDegrees(int x, int y)
          DOCUMENT ME!
 java.awt.Color getBackground()
          Returns the background color of the wheel.
 java.awt.Color getForeground()
          Returns the foreground color of the wheel.
protected  void initialize()
          An initialize function, which can be used within several constructors.
protected  void paintComponent(java.awt.Graphics g)
          DOCUMENT ME!
 void setBackground(java.awt.Color background)
          Sets the background color of the wheel.
 void setForeground(java.awt.Color foreground)
          Sets the foreground Color of the wheel.
 
Methods inherited from class org.sourceforge.espro.elicitation.PointMethod
getValue, setValue
 
Methods inherited from class org.sourceforge.espro.elicitation.ElicitationMethod
addPropertyChangeListener, addPropertyChangeListener, getCategory, getName, isEdit, isFrozen, removePropertyChangeListener, removePropertyChangeListener, setEdit, setFrozen, smothed
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DProbWheel

public DProbWheel()
The Constructor.


DProbWheel

protected DProbWheel(java.lang.String name,
                     java.lang.String category)
Constructor for extending classes.

Parameters:
name - The name of the elicitation method.
category - The category it belongs to.
Method Detail

getBackground

public java.awt.Color getBackground()
Returns the background color of the wheel.

Overrides:
getBackground in class java.awt.Component
Returns:
The color of the background.
See Also:
Component.getBackground()

getForeground

public java.awt.Color getForeground()
Returns the foreground color of the wheel.

Overrides:
getForeground in class java.awt.Component
Returns:
The color.
See Also:
Component.getForeground()

setBackground

public void setBackground(java.awt.Color background)
Sets the background color of the wheel.

Overrides:
setBackground in class javax.swing.JComponent
Parameters:
background - The background color.
See Also:
JComponent.setBackground(java.awt.Color)

setForeground

public void setForeground(java.awt.Color foreground)
Sets the foreground Color of the wheel.

Overrides:
setForeground in class javax.swing.JComponent
Parameters:
foreground - The foreground color.
See Also:
JComponent.setForeground(java.awt.Color)

addSelfListeners

protected void addSelfListeners()
DOCUMENT ME!

Overrides:
addSelfListeners in class ElicitationMethod

adjustValue

protected void adjustValue(int x,
                           int y)
According that the center point of the wheel is also in the center of the component, this will calculate the value out of the given x/y (mouse) coordinates.

Parameters:
x - The x value.
y - The y value.

calcDegrees

protected double calcDegrees(int x,
                             int y)
DOCUMENT ME!

Parameters:
x - DOCUMENT ME!
y - DOCUMENT ME!
Returns:
DOCUMENT ME!

initialize

protected void initialize()
Description copied from class: ElicitationMethod
An initialize function, which can be used within several constructors.

Specified by:
initialize in class ElicitationMethod
See Also:
ElicitationMethod.initialize()

paintComponent

protected void paintComponent(java.awt.Graphics g)
Description copied from class: ElicitationMethod
DOCUMENT ME!

Overrides:
paintComponent in class ElicitationMethod
Parameters:
g - DOCUMENT ME!
See Also:
JComponent.paintComponent(java.awt.Graphics)