|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
org.sourceforge.espro.elicitation.ElicitationMethod
org.sourceforge.espro.elicitation.PointMethod
org.sourceforge.espro.elicitation.BarScale
public class BarScale
Title: BarScale
Description: This method is represented by a vertical scale without any labels and a slider pointing to the scale. The BarScale has an inner area (colored orange) which indicates the estimated probability. In other words, the height of this inner area corresponds to the estimated probability and changes when the slider is moved. For estimating a probability, the user can click at the desired position on the scale with the mouse or drag the slider with the mouse on the desired scale position. Changing the position of the slider also changes the height of the inner area. If the user thinks the probability to be elicited is 1, the inner rectangle has the same height as the baseline. If the user thinks the probability to be elicited is 0, the height of the inner rectangle is 0 and therefor you do not see the inner area of the scale. All other estimated probabilities are somewhere between these two extremes.
Copyright: Copyright (c) 2006
Company:
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 | |
---|---|
BarScale()
default-constructor |
|
BarScale(java.lang.String name,
java.lang.String category)
Creates a new BarScale object. |
Method Summary | |
---|---|
protected void |
addSelfListeners()
DOCUMENT ME! |
void |
drawRectangles()
Method for drawing the baseline of the scale and an inner rectangle of the scale. |
void |
drawSlider()
Method for drawing a slider and an invisible slider. |
java.awt.Color |
getBackgroundColor()
DOCUMENT ME! |
java.awt.Color |
getForegroundColor()
DOCUMENT ME! |
double |
getSliderYPos()
Method for returning the actual y-coordinate of the slider's peak. |
protected void |
initialize()
DOCUMENT ME! |
boolean |
isShowSlider()
DOCUMENT ME! |
void |
moveSlider(int x,
int y)
Moves slider to the actual mouse-position by dragging the mouse. |
void |
moveSliderByClick(int x,
int y)
Moves slider to the actual mouse-position by clicking in the baseline of the scale. |
void |
paintComponent(java.awt.Graphics g)
Overridden Method for painting the scale on the panel. |
void |
setBackgroundColor(java.awt.Color backgroundColor)
DOCUMENT ME! |
void |
setForegroundColor(java.awt.Color foregroundColor)
DOCUMENT ME! |
void |
setShowSlider(boolean showSlider)
DOCUMENT ME! |
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, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, 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 |
---|
public BarScale()
public BarScale(java.lang.String name, java.lang.String category)
name
- DOCUMENT ME!category
- DOCUMENT ME!Method Detail |
---|
public void drawRectangles()
public void drawSlider()
public java.awt.Color getBackgroundColor()
public java.awt.Color getForegroundColor()
public double getSliderYPos()
public boolean isShowSlider()
public void moveSlider(int x, int y)
x
- x-coordinate of mousey
- y-coordinate of mousepublic void moveSliderByClick(int x, int y)
x
- x-coordinate of mousey
- y-coordinate of mousepublic void paintComponent(java.awt.Graphics g)
paintComponent
in class ElicitationMethod
g
- Graphics2D-objectpublic void setBackgroundColor(java.awt.Color backgroundColor)
backgroundColor
- DOCUMENT ME!public void setForegroundColor(java.awt.Color foregroundColor)
foregroundColor
- DOCUMENT ME!public void setShowSlider(boolean showSlider)
showSlider
- DOCUMENT ME!protected void addSelfListeners()
addSelfListeners
in class ElicitationMethod
protected void initialize()
initialize
in class ElicitationMethod
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |