|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Panel
|
+--java.applet.Applet
|
+--javax.swing.JApplet
|
+--numbers.TestApplet
This is a test program. It contains 4 radio buttons that each build a different tree at run time. That tree is then compiled into a method and run when the run button is hit. There are 10 inputs and 10 outputs to show that the method can be used multiple times once it is generated. There are also 2 fields for variables.
| Inner classes inherited from class javax.swing.JApplet |
javax.swing.JApplet.AccessibleJApplet |
| Inner classes inherited from class java.applet.Applet |
java.applet.Applet.AccessibleApplet |
| Inner classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock |
| Field Summary | |
private javax.swing.JLabel |
addLabel
|
private javax.swing.JTextField |
addTF
|
private javax.swing.JRadioButton |
adrndRBTN
|
private javax.swing.JRadioButton |
donotRBTN
|
private javax.swing.JLabel |
inLabel
|
private javax.swing.JTextField |
input0
|
private javax.swing.JTextField |
input1
|
private javax.swing.JTextField |
input2
|
private javax.swing.JTextField |
input3
|
private javax.swing.JTextField |
input4
|
private javax.swing.JTextField |
input5
|
private javax.swing.JTextField |
input6
|
private javax.swing.JTextField |
input7
|
private javax.swing.JTextField |
input8
|
private javax.swing.JTextField |
input9
|
private javax.swing.JRadioButton |
justrRBTN
|
private javax.swing.JLabel |
outLabel
|
private javax.swing.JTextField |
output0
|
private javax.swing.JTextField |
output1
|
private javax.swing.JTextField |
output2
|
private javax.swing.JTextField |
output3
|
private javax.swing.JTextField |
output4
|
private javax.swing.JTextField |
output5
|
private javax.swing.JTextField |
output6
|
private javax.swing.JTextField |
output7
|
private javax.swing.JTextField |
output8
|
private javax.swing.JTextField |
output9
|
private Parameters |
param
|
private javax.swing.ButtonGroup |
radios
|
private javax.swing.JRadioButton |
rndadRBTN
|
private javax.swing.JLabel |
roundLabel
|
private javax.swing.JTextField |
roundTF
|
private javax.swing.JButton |
runButton
|
private TreeNode |
tree
|
| Fields inherited from class javax.swing.JApplet |
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.applet.Applet |
serialVersionUID, stub |
| Fields inherited from class java.awt.Panel |
base, nameCounter |
| Fields inherited from class java.awt.Container |
component, containerListener, containerSerializedDataVersion, dbg, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads |
| Fields inherited from class java.awt.Component |
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
TestApplet()
|
|
| Method Summary | |
void |
init()
|
private TreeNode |
makeAddToRoundedTree()
Generates a tree that rounds the input to the number of decimal places listed as a variable and adds that to another variable, and returns the sum. |
private TreeNode |
makeNoChangeTree()
Generates a tree that simply retruns the input |
private TreeNode |
makeRoundAddedTree()
Generates a tree that rounds the input added to a variable to the number of decimal places listed as another variable and returns the rounded number. |
private TreeNode |
makeRoundTree()
Generates a tree that rounds the input to the number of decimal places listed as a variable and returns it. |
| Methods inherited from class javax.swing.JApplet |
addImpl, createRootPane, createRootPaneException, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.applet.Applet |
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop |
| Methods inherited from class java.awt.Panel |
|
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, adjustListeningChildren, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, initIDs, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, nextFocus, numListening, paint, paintComponents, paintHeavyweightComponents, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, print, printComponents, printHeavyweightComponents, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, readObject, remove, removeAll, removeContainerListener, removeNotify, setFocusOwner, setFont, transferFocus, validate, validateTree, writeObject |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, resetGC, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
| Field Detail |
private Parameters param
private TreeNode tree
private javax.swing.JButton runButton
private javax.swing.JRadioButton justrRBTN
private javax.swing.JRadioButton donotRBTN
private javax.swing.JRadioButton adrndRBTN
private javax.swing.JRadioButton rndadRBTN
private javax.swing.ButtonGroup radios
private javax.swing.JTextField roundTF
private javax.swing.JTextField addTF
private javax.swing.JTextField input0
private javax.swing.JTextField input1
private javax.swing.JTextField input2
private javax.swing.JTextField input3
private javax.swing.JTextField input4
private javax.swing.JTextField input5
private javax.swing.JTextField input6
private javax.swing.JTextField input7
private javax.swing.JTextField input8
private javax.swing.JTextField input9
private javax.swing.JTextField output0
private javax.swing.JTextField output1
private javax.swing.JTextField output2
private javax.swing.JTextField output3
private javax.swing.JTextField output4
private javax.swing.JTextField output5
private javax.swing.JTextField output6
private javax.swing.JTextField output7
private javax.swing.JTextField output8
private javax.swing.JTextField output9
private javax.swing.JLabel roundLabel
private javax.swing.JLabel addLabel
private javax.swing.JLabel inLabel
private javax.swing.JLabel outLabel
| Constructor Detail |
public TestApplet()
| Method Detail |
public void init()
init in class java.applet.Appletprivate TreeNode makeRoundTree()
private TreeNode makeAddToRoundedTree()
private TreeNode makeRoundAddedTree()
private TreeNode makeNoChangeTree()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||