com.gotdns.jimula.EatHealthy
Class ServingPanel

java.lang.Object
  |
  +--com.gotdns.jimula.EatHealthy.ServingPanel

public class ServingPanel
extends java.lang.Object

ServingPanel is a module that can calculate food serving. It has a method addPanel()which return this panel to MainFrame.

EatHealthy

A simple personal nutrient need and food serving calculator

Copyright (c) 2003

See Also:
MainFrame

Field Summary
 float actual_calories
          Calories contents of actual serving
 float actual_carb
          Carbohydrate contents of actual serving
 float actual_fat
          Fat contents of actual serving
 float actual_protein
          Protein contents of actual serving
 
Constructor Summary
ServingPanel(MainFrame frame)
          Construsts a new ServingPanel instance.
ServingPanel(MainFrame frame, float protein, float fat, float carb, float calories)
          Construsts a new ServingPanel instance.
 
Method Summary
 javax.swing.JPanel addPanel()
          Which is evoked by MainFrame
 void show_serving()
          Calculate and show food serving depend on personal nutrient need.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actual_protein

public float actual_protein
Protein contents of actual serving


actual_fat

public float actual_fat
Fat contents of actual serving


actual_carb

public float actual_carb
Carbohydrate contents of actual serving


actual_calories

public float actual_calories
Calories contents of actual serving

Constructor Detail

ServingPanel

public ServingPanel(MainFrame frame)
Construsts a new ServingPanel instance. This construstor is evoked by food serving button of tools bar. User can directly input personal nutrient to calculate food serving.

Parameters:
frame - parent frame(MainFrame)
See Also:
MainFrame

ServingPanel

public ServingPanel(MainFrame frame,
                    float protein,
                    float fat,
                    float carb,
                    float calories)
Construsts a new ServingPanel instance. This construstor is evoked by NutrientPanel.

Parameters:
frame - parent frame(MainFrame)
protein - personal nutrient need of protein contents
fat - personal nutrient need of fat contents
carb - personal nutrient need of carbohydrate contents
calories - personal nutrient need of calories contents
See Also:
MainFrame, NutrientPanel
Method Detail

show_serving

public void show_serving()
Calculate and show food serving depend on personal nutrient need.

See Also:
CalculateServing

addPanel

public javax.swing.JPanel addPanel()
Which is evoked by MainFrame

Returns:
panel_allocate a JPanel with panel_allocate