|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwheelsunh.users.Frame
public class Frame
Frame that has public methods to allow for behind-the-scenes manipulation and GUI creation. Used to create graphical programming assignments that hide actual graphics code from students. The JFrame is actually contained by the class instead of subclassed so that the frame can be updated (packed) when components are added. Not beautiful, but, if Frame were a subclass of JFrame, components added after creation through the static methods would not show up until the user resized the window.
Field Summary | |
---|---|
static DrawingPanel |
_dp
|
Constructor Summary | |
---|---|
Frame()
Default Frame is 700 x 500 |
|
Frame(int w,
int h)
Drawing panel size parameters added at UNH. |
Method Summary | |
---|---|
static void |
addElementColumn(java.awt.Component component)
Adds Component to column along right side and repacks. |
static void |
addElementRow(java.awt.Component component)
Adds a Component to the row at the bottom of the frame and repacks the frame so that everything shows up all pretty. |
void |
addKeyListener(java.awt.event.KeyListener k)
Add KeyListener to _frame mb 7/23/2010 |
static int |
getHeight()
getHeight() added at UNH by rdb 11/15/09 |
static int |
getWidth()
getWidth() added at UNH by rdb 11/15/09 |
static void |
setHeight(int h)
setHeight( int ) added at UNH |
static void |
setSize(int w,
int h)
setSize( int, iny ) added at UNH |
static void |
setWidth(int w)
setWidth( int ) added at UNH |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static DrawingPanel _dp
Constructor Detail |
---|
public Frame()
public Frame(int w, int h)
Method Detail |
---|
public void addKeyListener(java.awt.event.KeyListener k)
public static void setWidth(int w)
public static void setHeight(int h)
public static void setSize(int w, int h)
public static int getWidth()
public static int getHeight()
public static void addElementRow(java.awt.Component component)
public static void addElementColumn(java.awt.Component component)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |