go
Class GoInterface

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--go.GoInterface

public abstract class GoInterface
extends java.awt.Canvas
implements java.lang.Runnable

See Also:
Serialized Form

Field Summary
 Go go
          Variable containing the Go context that was created with this interface.
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
GoInterface()
          Constructor for creating a new Go rendering context.
 
Method Summary
 void initializeGo()
          Will initialize/reinitialize Go.
 void keyTyped(char key)
          Keyboard input method.
 void mouseDragged(int x, int y)
          Mouse dragged method.
 void mousePressed(int x, int y)
          Mouse pressed method.
 void mouseReleased(int x, int y)
          Mouse released method.
 void paint(java.awt.Graphics g)
           
 void render()
          Main rendering method.
 void rerender()
          Will force render( ) to be called.
 void resized(int width, int height)
          Context resized method.
 void run()
           
 void swap()
          All rendering is done off screen - calling this method will display the current off screen rendering buffer.
 void update(java.awt.Graphics g)
           
 
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, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, 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, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

go

public Go go
Variable containing the Go context that was created with this interface.
Constructor Detail

GoInterface

public GoInterface()
Constructor for creating a new Go rendering context.

This will create a new Go context which can be accessed via the variable go.

Method Detail

initializeGo

public void initializeGo()
Will initialize/reinitialize Go.

rerender

public void rerender()
Will force render( ) to be called.

render

public void render()
Main rendering method.

This is the rendering thread callback method for displaying graphics. This method is triggered by calling rerender( ).

Override this method with your rendering code.


resized

public void resized(int width,
                    int height)
Context resized method.

This is the rendering thread callback method for delivering new context size information. This method is automatically triggered when a resize event occurs.

The width and height arguments indicate the new rendering context size in pixels.

Override this method with your resize specific code.


keyTyped

public void keyTyped(char key)
Keyboard input method.

This is the rendering thread callback method for delivering keyboard input information. This method is automatically triggered when a key is typed on the keyboard.

The key argument is the ASCII character code of the key typed.

Override this method with your keyboard input specific code.


mousePressed

public void mousePressed(int x,
                         int y)
Mouse pressed method.

This is the rendering thread callback method for delivering mouse pressed information. This method is automatically triggered when a mouse button has been pressed.

The (x, y) arguments indicate the pixel coordinate at which the mouse was pressed.

Override this method with your mouse pressed specific code.


mouseReleased

public void mouseReleased(int x,
                          int y)
Mouse released method.

This is the rendering thread callback method for delivering mouse released information. This method is automatically triggered when a mouse button has been released.

The (x, y) arguments indicate the pixel coordinate at which the mouse was released.

Override this method with your mouse released specific code.


mouseDragged

public void mouseDragged(int x,
                         int y)
Mouse dragged method.

This is the rendering thread callback method for delivering mouse dragged information. This method is automatically triggered when a mouse button has been pressed and the mouse is being dragged.

The (x, y) arguments indicate the current pixel coordinate of the mouse.

Override this method with your mouse dragged specific code.


swap

public void swap()
All rendering is done off screen - calling this method will display the current off screen rendering buffer.

run

public void run()
Specified by:
run in interface java.lang.Runnable

update

public void update(java.awt.Graphics g)
Overrides:
update in class java.awt.Component

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class java.awt.Canvas