|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
objectdraw.JDrawingCanvas
objectdraw.FrameCanvas
public class FrameCanvas
FrameCanvas is an extension of JDrawingCanvas that creates a JFrame and puts a JDrawingCanvas inside. It is provided to make it possible to experiment with creating and manipulating graphical objects on a DrawingCanvas under environments like Dr. Java and BlueJ.
DrawingCanvas
,
JDrawingCanvas
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static Dimension |
DEFAULT_PREFERRED_SIZE
|
Fields inherited from class objectdraw.JDrawingCanvas |
---|
REPAINT_DELAY |
Fields inherited from class javax.swing.JComponent |
---|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
FrameCanvas()
Creates a new FrameCanvas. |
|
FrameCanvas(Dimension size)
Creates a new FrameCanvas. |
|
FrameCanvas(int width,
int height)
Creates a new FrameCanvas. |
Method Summary | |
---|---|
Dimension |
getPreferredSize()
Returns the preferred size of the Frame. |
void |
setSize(Dimension d)
Sets the size of the Frame to the given Dimension. |
void |
setSize(int width,
int height)
Sets the size of the Frame to the given width and height. |
void |
windowActivated(WindowEvent e)
Empty method included to implement the WindowListener interface. |
void |
windowClosed(WindowEvent e)
Empty method included to implement the WindowListener interface. |
void |
windowClosing(WindowEvent e)
Closes the Frame and kills all running ActiveObjects so they don't remain alive behind the scenes. |
void |
windowDeactivated(WindowEvent e)
Empty method included to implement the WindowListener interface. |
void |
windowDeiconified(WindowEvent e)
Empty method included to implement the WindowListener interface. |
void |
windowIconified(WindowEvent e)
Empty method included to implement the WindowListener interface. |
void |
windowOpened(WindowEvent e)
Empty method included to implement the WindowListener interface. |
Methods inherited from class objectdraw.JDrawingCanvas |
---|
clear, componentHidden, componentMoved, componentResized, componentShown, disableAutoRepaint, enableAutoRepaint, getCanvasContent, getDrawableIterator, imageUpdate, paint, repaint, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface objectdraw.DrawingCanvas |
---|
addComponentListener, addKeyListener, addMouseListener, addMouseMotionListener, clear, createImage, disableAutoRepaint, enableAutoRepaint, getCanvasContent, getDrawableIterator, getGraphics, getHeight, getSize, getWidth, prepareImage, repaint, requestFocus, requestFocusInWindow, setBackground, setForeground |
Methods inherited from interface java.awt.image.ImageObserver |
---|
imageUpdate |
Methods inherited from interface java.awt.event.ComponentListener |
---|
componentHidden, componentMoved, componentResized, componentShown |
Field Detail |
---|
public static final Dimension DEFAULT_PREFERRED_SIZE
Constructor Detail |
---|
public FrameCanvas()
public FrameCanvas(Dimension size)
size
- the canvas' preferred dimensionspublic FrameCanvas(int width, int height)
width
- the canvas' preferred widthheight
- the canvas' preferred heightMethod Detail |
---|
public Dimension getPreferredSize()
getPreferredSize
in class JDrawingCanvas
public void setSize(Dimension d)
setSize
in class Component
d
- the new dimension for the Framepublic void setSize(int width, int height)
setSize
in class Component
width
- the new width of the Frameheight
- the new height of the Framepublic void windowActivated(WindowEvent e)
windowActivated
in interface WindowListener
e
- an event that will be ignoredpublic void windowClosed(WindowEvent e)
windowClosed
in interface WindowListener
e
- an event that will be ignoredpublic void windowClosing(WindowEvent e)
windowClosing
in interface WindowListener
e
- the WindowEvent telling the window to closepublic void windowDeactivated(WindowEvent e)
windowDeactivated
in interface WindowListener
e
- an event that will be ignoredpublic void windowDeiconified(WindowEvent e)
windowDeiconified
in interface WindowListener
e
- an event that will be ignoredpublic void windowIconified(WindowEvent e)
windowIconified
in interface WindowListener
e
- an event that will be ignoredpublic void windowOpened(WindowEvent e)
windowOpened
in interface WindowListener
e
- an event that will be ignored
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |