/* * Pehr Hovey * pehr.hovey@gmail.com * MAT259 Data Visualization * Winter 2009 * * BalanceObject.java * * This is an object with mass, labels, etc that is at one end of the balance beam */ public class BalanceObject { private float count; // this is the number that this object represents. // Will causesize to change proportionally float size; // size of object to render float x, y; // current coordinates of this object int obj_stroke; int obj_fill; int text_fill; double extension_pct ; //experiments in positioning the sphere further or closer to the pivot on the beam //1 is fully out, 0 is at the pivot (would overlap though boolean draw_center = false; int center_fill; float center_size = 5f; //give the fill here since fill varies depending on which instance this is BalanceObject( float _x, float _y, int fill) { count = 1; // default x = _x; y = _y; // http://www.colourlovers.com/palette/697368/Cherry_Bomb extension_pct = 1; } public void updateY(float _y) { // test y = _y; } public void updateCount(float _count) {// insert data into this node and adjust mass count = _count; } public void updateSize(float _size){ //called before rendering, helps animate size changess size = _size; } public float getCount() { return count; } }