|
|||||||||
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.FunctionalMethod
org.sourceforge.espro.elicitation.BetaDist
public class BetaDist
The BetaDist method shows a beta distribution to the user and lets them manipulate it by dragging the function courve arround.
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 | |
---|---|
protected double |
betaP
The p value of the beta distribution function. |
protected double |
betaQ
The q value of the beta distribution function. |
static int |
DISTANCED_TWO_POINT
|
static int |
DYNAMIC_POINT
|
static int |
THREE_POINT
|
static int |
THREE_POINT_FIT
|
Fields inherited from class org.sourceforge.espro.elicitation.FunctionalMethod |
---|
fitFunction, highlight, markers, maxMarkers, maxValue, points, showHighlights, showMarkers, standardHeight, standardWidth |
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 | |
---|---|
|
BetaDist()
Default constructor. |
protected |
BetaDist(java.lang.String name,
java.lang.String category)
Constructor for extensions of this class. |
Method Summary | |
---|---|
protected double |
angleOfPoint(int pid)
Calculates the angle of a given point. |
protected void |
distancedTwoPointMethod(java.awt.Point p)
The fixedTwoPointMethod takes the next point on the actual courve to calculate two points next to it with the distance of the give distance, or the last point of the actual courve. |
protected void |
dynamicPointsMethod(java.awt.Point p)
This finds dynamic points using an algorithm, so the user can intuitivly modify the courve. |
protected void |
fit(java.awt.Point point)
Fits the given point into the curve, using the given fit method. |
protected void |
fitCurve(double[] p1,
double[] p2,
double[] p3)
Fits the curve so it matches this point. |
double |
fX(double x)
DOCUMENT ME! |
double |
getBetaP()
DOCUMENT ME! |
double |
getBetaQ()
DOCUMENT ME! |
double |
getDistance()
Returns the distance. |
int |
getFitMethod()
Returns the fitMethod. |
protected void |
initialize()
An initialize function, which can be used within several constructors. |
protected void |
paintComponent(java.awt.Graphics g)
DOCUMENT ME! |
protected int |
seekPoint(int pid,
double alpha,
int direction)
Seeks a point which reaches the angle. |
void |
setBetaP(double betaP)
DOCUMENT ME! |
void |
setBetaQ(double betaQ)
DOCUMENT ME! |
void |
setDistance(double distance)
Sets the distance |
void |
setFitMethod(int fitMethod)
Sets the fitMethod |
protected void |
threePointFitMethod(java.awt.Point point)
This is a three Point Method where the points are fitted into the courve. |
protected void |
threePointMethod(java.awt.Point point)
Takes three cursur inputs and draws on this. |
protected void |
trackMouse(int x,
int y)
This watches the mouse where it is and if the button is pressed this recalculates the beta curve. |
Methods inherited from class org.sourceforge.espro.elicitation.FunctionalMethod |
---|
addSelfListeners, calcFunction, calcReals, clearMarkers, drawAxis, drawFilledScaledBox, drawFunction, drawScaledBox, drawStandardLine, getDigits, getMaxMarkers, getMaxPoint, getStandardHeight, getStandardWidth, graphicsPoint, graphicsXPoint, graphicsYPoint, highlightNearest, isFitFunction, nearestPoint, setDigits, setFitFunction, setMaxMarkers, setStandardHeight, setStandardSize, setStandardWidth, standardPoint, standardXPoint, standardYPoint, viewBox |
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 |
Field Detail |
---|
public static final int THREE_POINT
threePointMethod(Point)
,
Constant Field Valuespublic static final int THREE_POINT_FIT
threePointFitMethod(Point)
,
Constant Field Valuespublic static final int DISTANCED_TWO_POINT
distancedTwoPointMethod(Point)
,
Constant Field Valuespublic static final int DYNAMIC_POINT
dynamicPointsMethod(Point)
,
Constant Field Valuesprotected double betaP
protected double betaQ
Constructor Detail |
---|
public BetaDist()
protected BetaDist(java.lang.String name, java.lang.String category)
name
- The name of the method.category
- The (menu) category of the method.Method Detail |
---|
public double fX(double x)
FunctionalMethod
x
- DOCUMENT ME!
FunctionalMethod.fX(double)
public double getBetaP()
public double getBetaQ()
public double getDistance()
public int getFitMethod()
public void setBetaP(double betaP)
betaP
- The betaP to set.public void setBetaQ(double betaQ)
betaQ
- The betaQ to set.public void setDistance(double distance)
distance
- The distance to set.public void setFitMethod(int fitMethod)
fitMethod
- The fitMethod to set.protected double angleOfPoint(int pid)
pid
- The index of the point in the points array.
protected void distancedTwoPointMethod(java.awt.Point p)
p
- The mouse pointer on the scale.protected void dynamicPointsMethod(java.awt.Point p)
p
- The mouse pointer position.protected void fit(java.awt.Point point)
point
- The mouse pointer position.protected void fitCurve(double[] p1, double[] p2, double[] p3)
p1
- Point 1.p2
- Point 2.p3
- Point 3.protected void initialize()
ElicitationMethod
initialize
in class FunctionalMethod
ElicitationMethod.initialize()
protected void paintComponent(java.awt.Graphics g)
ElicitationMethod
paintComponent
in class FunctionalMethod
g
- DOCUMENT ME!FunctionalMethod.paintComponent(java.awt.Graphics)
protected int seekPoint(int pid, double alpha, int direction)
pid
- The point to start from.alpha
- The angle searched.direction
- The direction (1 = forward, -1 = backwards)
java.lang.IllegalArgumentException
- DOCUMENT ME!protected void threePointFitMethod(java.awt.Point point)
point
- The mouse pointer position.threePointMethod(java.awt.Point)
protected void threePointMethod(java.awt.Point point)
point
- A Point from the mouse.protected void trackMouse(int x, int y)
x
- The x position of the mouse.y
- The y position of the mouse.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |