|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel edu.ucla.stat.SOCR.util.Graph edu.ucla.stat.SOCR.util.varHistogram edu.ucla.stat.SOCR.util.ModelerHistogram
public class ModelerHistogram
This class models an interactive histogram. The user can click on the horizontal axes to add points to the data set.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
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 boolean |
drawUserClicks
|
protected double |
graphLeft
|
protected double |
graphRight
|
double |
maxY
|
protected int |
modelCount
|
double[] |
modelX
|
double[] |
modelX1
|
double[] |
modelX2
|
double[] |
modelY
|
double[] |
modelY1
|
double[] |
modelY2
|
protected static int |
MULTIPLE_DEFAULT_VALUE
|
java.util.Vector<java.lang.Double> |
rawDat
|
Fields inherited from class edu.ucla.stat.SOCR.util.varHistogram |
---|
axisType, BOX, currentXLowerBound, currentXUpperBound, DENSITY, domain, FREQ, intervals, listOfTicks, MAD, MMM, modelType, MSD, NONE, REL_FREQ, summaryStats, type |
Fields inherited from class edu.ucla.stat.SOCR.util.Graph |
---|
ABOVE, BELOW, bottomMargin, BOUNDS, HORIZONTAL, LEFT, leftMargin, MIDPOINTS, pointSize, RIGHT, rightMargin, showModelDistribution, topMargin, VERTICAL, xMax, xMin, yMax, yMin |
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 | |
---|---|
ModelerHistogram()
|
|
ModelerHistogram(double a,
double b,
double w)
This general constructor creates a new interactive histogram corresponding to a specified domain. |
Method Summary | |
---|---|
void |
addDataPoint()
|
void |
clear()
This method resets the interactive histogram. |
int |
getdataCursor()
|
double |
getMaxInputX()
|
int |
getMaxInputY()
|
int |
getMaxRawY()
|
double |
getMaxX()
|
double |
getMaxY()
|
double |
getMinInputX()
|
double |
getMinX()
|
double |
getMinY()
|
java.awt.Color |
getOutlineColor()
|
java.awt.Color |
getOutlineColor1()
|
java.awt.Color |
getOutlineColor2()
|
double |
getValue()
This method returns the last value. |
double |
getValue(int i)
This method returns the values from the data set. |
float[] |
getXData()
|
float[] |
getYData()
|
double |
maxV(java.util.Vector<java.lang.Double> vals)
|
double |
minV(java.util.Vector<java.lang.Double> vals)
|
void |
mouseClicked(java.awt.event.MouseEvent event)
This method handles the events corresponding to mouse clicks. |
void |
mouseEntered(java.awt.event.MouseEvent event)
|
void |
mouseExited(java.awt.event.MouseEvent event)
|
void |
mousePressed(java.awt.event.MouseEvent event)
|
void |
mouseReleased(java.awt.event.MouseEvent event)
|
void |
paintComponent(java.awt.Graphics g)
This method paints the graph of the getDensity function, empirical getDensity function, moment bar, and empirical moment bar |
void |
panLeft()
|
void |
panRight()
|
void |
resetGraphLimits()
|
void |
setBarWidth(double input)
|
void |
setBins(int n)
|
void |
setDrawUserClicks(boolean flag)
|
void |
setGraphLeft(double input)
|
void |
setGraphRight(double input)
|
void |
setHistogramLeft(double input)
|
void |
setHistogramRight(double input)
|
void |
setIntervalData()
|
void |
setLeft(double input)
|
void |
setModel(int cnt,
double[] xMod,
double[] yMod)
|
void |
setModelCount(int ct)
|
void |
setModelType(int modelType)
|
void |
setModelX(double[] input)
|
void |
setModelY(double[] input)
|
void |
setOutlineColor(java.awt.Color color)
|
void |
setOutlineColor1(java.awt.Color color)
|
void |
setOutlineColor2(java.awt.Color color)
|
void |
setRight(double input)
|
void |
setTwoModel(int cnt,
double[] xMod1,
double[] yMod1,
double[] xMod2,
double[] yMod2)
|
void |
setTwoModel(int cnt,
double[] xMod1,
double[] yMod1,
double[] xMod2,
double[] yMod2,
java.awt.Color color1,
java.awt.Color color2)
|
void |
setWidth(double width)
This method sets the width of the domain. |
void |
setXExtrema(float a,
float b)
|
void |
setxy(float[] raw)
|
void |
setYExtrema(float a,
float b)
|
void |
setZoomInIntervalData()
|
void |
setZoomOutIntervalData()
|
int |
zoomIn()
|
int |
zoomOut()
|
Methods inherited from class edu.ucla.stat.SOCR.util.varHistogram |
---|
getIntervalData, getListOfTicks, setAxisType, setIntervalData, setListOfTicks, setPlotXMax, setPlotXMin, setPlotYMax, setPlotYMin, setType, setxMax, setxMin, setyMax, showSummaryStats |
Methods inherited from class edu.ucla.stat.SOCR.util.Graph |
---|
drawAxis, drawAxis, drawAxis, drawAxis, drawAxis, drawAxis, drawAxisWithDomain, drawBox, drawBox, drawBoxPlot, drawBoxPlot, drawCircle, drawLabel, drawLine, drawPoint, drawTick, drawTick, fillBox, fillBox, fillBoxPlot, fillBoxPlot, fillCircle, format, getPointSize, getXMax, getXMin, getYMax, getYMin, isReal, main, setMargins, setPointSize, setScale, setShowModelDistribution, xGraph, xGraphDouble, xGraphInverse, xPixels, xScale, yGraph, yGraphDouble, yGraphInverse, yPixels, yScale |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, 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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, 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 |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, 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, getName, 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, removePropertyChangeListener, removePropertyChangeListener, 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 java.util.Vector<java.lang.Double> rawDat
public double[] modelX
public double[] modelY
public double[] modelX1
public double[] modelY1
public double[] modelX2
public double[] modelY2
protected double graphLeft
protected double graphRight
protected int modelCount
public double maxY
protected static int MULTIPLE_DEFAULT_VALUE
protected boolean drawUserClicks
Constructor Detail |
---|
public ModelerHistogram(double a, double b, double w)
public ModelerHistogram()
Method Detail |
---|
public void setDrawUserClicks(boolean flag)
public void setLeft(double input)
public void setRight(double input)
public void setGraphLeft(double input)
public void setGraphRight(double input)
public void setBarWidth(double input)
public void setIntervalData()
public void setZoomInIntervalData()
public void setZoomOutIntervalData()
public void setBins(int n)
public void panRight()
public void panLeft()
public int zoomIn()
public int zoomOut()
public void setModelType(int modelType)
setModelType
in class varHistogram
public void paintComponent(java.awt.Graphics g)
varHistogram
paintComponent
in class varHistogram
public void setWidth(double width)
public void clear()
public void resetGraphLimits()
public double getValue(int i)
public double getValue()
public void mouseClicked(java.awt.event.MouseEvent event)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent event)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent event)
mouseExited
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent event)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent event)
mouseReleased
in interface java.awt.event.MouseListener
public void addDataPoint()
public void setModel(int cnt, double[] xMod, double[] yMod)
public void setTwoModel(int cnt, double[] xMod1, double[] yMod1, double[] xMod2, double[] yMod2)
public void setTwoModel(int cnt, double[] xMod1, double[] yMod1, double[] xMod2, double[] yMod2, java.awt.Color color1, java.awt.Color color2)
public int getdataCursor()
public float[] getXData()
public float[] getYData()
public void setxy(float[] raw)
public void setXExtrema(float a, float b)
public void setYExtrema(float a, float b)
public double getMinX()
public double getMaxX()
public double getMinY()
public double getMaxY()
public double minV(java.util.Vector<java.lang.Double> vals)
public double maxV(java.util.Vector<java.lang.Double> vals)
public void setModelCount(int ct)
public void setModelX(double[] input)
public void setModelY(double[] input)
public void setOutlineColor(java.awt.Color color)
public java.awt.Color getOutlineColor()
public void setOutlineColor1(java.awt.Color color)
public java.awt.Color getOutlineColor1()
public void setOutlineColor2(java.awt.Color color)
public java.awt.Color getOutlineColor2()
public void setHistogramRight(double input)
public void setHistogramLeft(double input)
public double getMaxInputX()
public double getMinInputX()
public int getMaxInputY()
public int getMaxRawY()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |