|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Canvas
|
+--PaymentCanvas
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AWTTreeLock |
| Field Summary | |
(package private) double |
apr
variable to display the APR(Annual Percentage Rate) in the textfield |
(package private) java.awt.Graphics |
g
The graphics context of the instantiating applet |
(package private) int |
height
varianle determines the height of the drawing canvas |
(package private) java.awt.Image |
imageObject
contstuctor to create an image variable to create an image on the applet panel |
(package private) java.awt.TextField |
interestPaid
textfield for Interest paid during the period |
(package private) java.awt.TextField |
mon
textfield for months |
(package private) double |
monthlyPayment
variable to display the monthly payment |
(package private) java.awt.TextField |
monthPay
textfield for Monthly payment |
(package private) int |
months
variable to input the number of months the mortgage is taken |
(package private) java.awt.Checkbox |
paidInterest
Checkbox to select the type of graph for interest paid |
(package private) java.awt.Checkbox |
paidPrincipal
Checkbox to select the type of graph for Principal paid |
(package private) int |
principal
variable to display the principal amount on the applet textfield |
(package private) java.awt.TextField |
principalPaid
textfield for Principal paid |
(package private) java.awt.Checkbox |
principalUnpaid
Checkbox to select the type of graph for unpaid principal |
(package private) java.awt.TextField |
unpaidPrincipal
textfield for unpaid Principal amount |
(package private) int |
width
variable determines the width of the drawing canvas |
(package private) int |
xborder
variable representing the x coordinate of the graph canvas |
(package private) double |
xincr
variable to increment the loop value to draw the graph according to value changes |
(package private) int |
yborder
variable representing the y coordinate of the graph canvas |
(package private) int |
years
variable to display the number of years on the applet textfield |
| Fields inherited from class java.awt.Canvas |
base,
graphicsConfig,
nameCounter,
serialVersionUID |
| Fields inherited from class java.awt.Component |
actionListenerK,
adjustmentListenerK,
appContext,
assert,
background,
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
changeSupport,
componentListener,
componentListenerK,
componentOrientation,
componentSerializedDataVersion,
containerListenerK,
cursor,
dropTarget,
enabled,
eventMask,
focusListener,
focusListenerK,
font,
foreground,
hasFocus,
height,
incRate,
inputMethodListener,
inputMethodListenerK,
isInc,
isPacked,
itemListenerK,
keyListener,
keyListenerK,
LEFT_ALIGNMENT,
locale,
LOCK,
minSize,
mouseListener,
mouseListenerK,
mouseMotionListener,
mouseMotionListenerK,
name,
nameExplicitlySet,
newEventsOnly,
ownedWindowK,
parent,
peer,
peerFont,
popups,
prefSize,
RIGHT_ALIGNMENT,
serialVersionUID,
textListenerK,
TOP_ALIGNMENT,
valid,
visible,
width,
windowListenerK,
x,
y |
| Constructor Summary | |
(package private) |
PaymentCanvas()
|
| Method Summary | |
(package private) void |
draw()
|
(package private) double |
interestPaid(int i)
function to calculate the value of the interest paid to the period |
void |
mouseDragged(java.awt.event.MouseEvent e)
This method is defined for the sake of convinience Basically this function is called when the mouse is moved by pressing left mouse button |
void |
mouseMoved(java.awt.event.MouseEvent e)
This method is called when the mouse is moved over the graph panel this class implements MouseMotionListener, an abstract class |
(package private) double |
paidPrincipal(int i)
function to calculate the value of the paid principal to the period |
void |
paint(java.awt.Graphics g)
Paint method to paint the points again when the values are changed by the user |
(package private) void |
setParameters(java.awt.TextField loanAmount,
java.awt.TextField numberYears,
java.awt.TextField annualRate)
function to set the parameters to their corresponding calculated values. |
(package private) void |
setup(java.awt.TextField unpaidPrincipal,
java.awt.TextField principalPaid,
java.awt.TextField interestPaid,
java.awt.TextField monthPay,
java.awt.TextField mon,
java.awt.Checkbox paidPrincipal,
java.awt.Checkbox paidInterest,
java.awt.Checkbox principalUnpaid)
function to set the self-referenced values of the textfields and the checkboxes on the applet panel. |
(package private) double |
totalPaid(int i)
function to calculate the value of the total amount paid during the period the loan is borrowed |
(package private) int |
transform(double y,
double top)
function to transform the obtained calculated values into the data points on the graph |
(package private) double |
unpaidPrincipal(int i)
function to calculate the value of the unpaid principle of the loan amount |
| Methods inherited from class java.awt.Canvas |
|
| Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
areInputMethodsEnabled,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
deliverEvent,
disable,
disableEvents,
dispatchEvent,
dispatchEventImpl,
doLayout,
enable,
enable,
enableEvents,
enableInputMethods,
eventEnabled,
firePropertyChange,
getAlignmentX,
getAlignmentY,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentAt,
getComponentAt,
getComponentOrientation,
getCursor,
getDropTarget,
getFont_NoClientCode,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getIntrinsicCursor,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getMaximumSize,
getMinimumSize,
getName,
getNativeContainer,
getParent_NoClientCode,
getParent,
getPeer,
getPreferredSize,
getSize,
getSize,
getToolkit,
getToolkitImpl,
getTreeLock,
getWidth,
getWindowForObject,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
initIDs,
inside,
invalidate,
isDisplayable,
isDoubleBuffered,
isEnabled,
isEnabledImpl,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
layout,
lightweightPrint,
list,
list,
list,
list,
list,
locate,
location,
lostFocus,
minimumSize,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
paramString,
postEvent,
preferredSize,
prepareImage,
prepareImage,
print,
printAll,
printHeavyweightComponents,
processComponentEvent,
processEvent,
processFocusEvent,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
readObject,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setFont,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus,
update,
validate,
writeObject |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
| Field Detail |
java.awt.Image imageObject
java.awt.Graphics g
int principal
int years
int xborder
int yborder
int width
int height
int months
double xincr
double monthlyPayment
double apr
java.awt.TextField unpaidPrincipal
java.awt.TextField principalPaid
java.awt.TextField interestPaid
java.awt.TextField monthPay
java.awt.TextField mon
java.awt.Checkbox paidPrincipal
java.awt.Checkbox paidInterest
java.awt.Checkbox principalUnpaid
| Constructor Detail |
PaymentCanvas()
| Method Detail |
void setup(java.awt.TextField unpaidPrincipal,
java.awt.TextField principalPaid,
java.awt.TextField interestPaid,
java.awt.TextField monthPay,
java.awt.TextField mon,
java.awt.Checkbox paidPrincipal,
java.awt.Checkbox paidInterest,
java.awt.Checkbox principalUnpaid)
unpaidPrincipal - variable to display the unpaid principal amountprincipalPaid - variable to display the paid principal amountinterestPaid - variable to display the interest paid to the datemonthPay - non-editable textfield variable to display the monthly paymentmon - non-editable textfield variable to display the number of monthspaidPrincipal - checkbox variable to see the graph of principal paid during the periodpaidInterest - checkbox variable to see the graph of interest paid during the periodprincipalUnpaid - checkbox variable to see the graph of unpaid principal during the period
void setParameters(java.awt.TextField loanAmount,
java.awt.TextField numberYears,
java.awt.TextField annualRate)
loanAmount - textfield to input the loan amount borrowednumberYears - textfield to input the number of years for which the loan is borrowedannualRate - textfield to input the annual percentage rate of the loan borroweddouble unpaidPrincipal(int i)
double paidPrincipal(int i)
double interestPaid(int i)
double totalPaid(int i)
int transform(double y,
double top)
void draw()
public void paint(java.awt.Graphics g)
g - Graphics context of an appletpublic void mouseDragged(java.awt.event.MouseEvent e)
e - MouseEvent object supplied by the systempublic void mouseMoved(java.awt.event.MouseEvent e)
e - MouseEvent object supplied by the system
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||