|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--sub_arctic.lib.interactor_canvas
This is the "glue" which will stick a sub_arctic interface inside an AWT interface. You can put a sub_arctic top_level inside this object with set_top_level and you are in business.
You have to provide a size for this object when you create it. If you would like to derive a size from your sub_arctic interface, use interactor_canvas.size_from_top_level().
Field Summary | |
protected int |
_forced_height
The height part of the size the user sets. |
protected int |
_forced_width
The width part of the size the user sets. |
protected top_level |
_top_interactor
This holds the top_level which is sitting inside this component. |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
interactor_canvas(int width,
int height)
Constructor an interactor_canvas. |
Method Summary | |
void |
finalize()
Clean up when we are about to go away. |
java.awt.Dimension |
minimumSize()
This function is part of the AWT world. |
void |
paint(java.awt.Graphics g)
This is the redraw part of the AWT interface. |
java.awt.Dimension |
preferredSize()
This function is part of the AWT world. |
void |
processEvent(java.awt.AWTEvent e)
This is where we catch the AWT events and turn them into SubArctic events. |
void |
remove_top_interactor()
Remove the top_level from being used by this canvas. |
void |
set_top_interactor(top_level top)
Set the top_level associated with this canvas. |
void |
setBounds(int x,
int y,
int width,
int height)
We override reshape to catch size changes and propagate those to top level interactor. |
static java.awt.Dimension |
size_from_top_level(top_level tl)
From a toplevel, determine a dimension. |
top_level |
top_interactor()
Access the top_level inside this component. |
void |
update(java.awt.Graphics g)
This is the redraw part of the AWT interface. |
Methods inherited from class java.awt.Canvas |
addNotify |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
deliverEvent,
disable,
disableEvents,
dispatchEvent,
doLayout,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getAlignmentX,
getAlignmentY,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentAt,
getComponentAt,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getMaximumSize,
getMinimumSize,
getName,
getParent,
getPeer,
getPreferredSize,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
invalidate,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
layout,
list,
list,
list,
list,
list,
locate,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
paramString,
postEvent,
prepareImage,
prepareImage,
print,
printAll,
processComponentEvent,
processFocusEvent,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setFont,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus,
validate |
Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected int _forced_width
protected int _forced_height
protected top_level _top_interactor
Constructor Detail |
public interactor_canvas(int width, int height)
int
- width the width of the canvasint
- height the height of the canvasMethod Detail |
public void finalize()
public top_level top_interactor()
public void set_top_interactor(top_level top)
top_level
- top the new top_level for this canvas.public void remove_top_interactor()
public void update(java.awt.Graphics g)
Graphics
- g the graphics object to do the drawing on.public void paint(java.awt.Graphics g)
Graphics
- g the graphics object to do the drawing on.public void setBounds(int x, int y, int width, int height)
int
- x the new X position of the objectint
- y the new Y position of the objectint
- w the new width of the objectint
- h the new height of the objectpublic void processEvent(java.awt.AWTEvent e)
public java.awt.Dimension preferredSize()
public java.awt.Dimension minimumSize()
public static java.awt.Dimension size_from_top_level(top_level tl)
top_level
- tl the top_level whose size you want
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |