/* * Class.java * * Created on October 15, 2001, 9:56 AM */ import javax.swing.*; import java.awt.*; import java.awt.Color; import java.awt.event.*; /** * * @author adw131 */ public class GridValue extends Object { int row; //row to start from int column; //column to start from int width; //rows component to add will span int height; //columns component to add will span int anchor; int fill; int defAnchor; int defFill; GridBagConstraints gbConstraint; /** * GridValue()Creates new GridValue with default values */ public GridValue() { gbConstraint = new GridBagConstraints(); defAnchor = gbConstraint.WEST; defFill = gbConstraint.HORIZONTAL; set(0,0,1,1); } /** * GridValue()Creates new GridValue object with user-defined row,column,width,height * @param r--row to start component to be added * @param c--column to start component to be added * @param w--columns component will span * @param h--rows component will span */ public GridValue(int r, int c, int w, int h) { set(r,c,w,h); } /** * set() sets values of GridValue object * @param r--row to start component to be added * @param c--column to start component to be added * @param w--columns component will span * @param h--rows component will span */ public void set(int r, int c, int w, int h) { row=r; column=c; width = w; height = h; anchor = defAnchor; fill = defFill; } public void set(int r, int c, int w, int h, int a) { row = r; column = c; width = w; height = h; anchor = a; fill = defFill; } public void set(int r, int c, int w, int h, int a, int f) { row = r; column = c; width = w; height = h; anchor = a; fill = f; } }