Class OrandaNav
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----OrandaNav
- public class OrandaNav
- extends Applet
- implements Runnable
-
OrandaNav()
-
-
anyLinkHighlighted()
- Gets the index of a main link which has been highlighted.
-
drawBackground()
- Draws the background of the nav applet and the sub-links.
-
drawLinks()
- Draws the links for the nav applet.
-
drawLinkString(Graphics, int)
- Calculate the position in which to draw a main link, and draw it.
-
drawSubLinks(Graphics, int)
- Draw the second layer of links, highlighting one if it has been flagged
by a MouseOver event.
-
getParameters()
- Get the parameters.
-
init()
- Initialise the fonts, colors, offscreenImage, and create all the links
-
mouseDown(Event, int, int)
- If there is a mouse click, see what the last link flagged by MouseOver
was and go to the corresponding URL.
-
mouseEnter(Event, int, int)
- The same code as mouseMove: it is a "boundary case".
-
mouseExit(Event, int, int)
- The same code as mouseMove: it is a "boundary case".
-
mouseMove(Event, int, int)
- Whenever the pointer moves in the Graphics area, check if it has
moved over a link or sublink, and if so, flag that link or sublink.
-
paint(Graphics)
- Copy the offscreenImage to the screen.
-
run()
- Keep painting.
-
start()
- Start the thread.
-
stop()
- Stop the thread.
-
update(Graphics)
- Draw the image in memory before copying to the screen.
OrandaNav
public OrandaNav()
init
public void init()
- Initialise the fonts, colors, offscreenImage, and create all the links
- Overrides:
- init in class Applet
start
public void start()
- Start the thread.
- Overrides:
- start in class Applet
stop
public void stop()
- Stop the thread.
- Overrides:
- stop in class Applet
run
public void run()
- Keep painting.
paint
public void paint(Graphics g)
- Copy the offscreenImage to the screen.
- Overrides:
- paint in class Container
update
public void update(Graphics g)
- Draw the image in memory before copying to the screen.
- Overrides:
- update in class Component
drawBackground
public void drawBackground()
- Draws the background of the nav applet and the sub-links.
anyLinkHighlighted
public int anyLinkHighlighted()
- Gets the index of a main link which has been highlighted.
drawLinks
public void drawLinks()
- Draws the links for the nav applet.
drawLinkString
public void drawLinkString(Graphics gr,
int i)
- Calculate the position in which to draw a main link, and draw it.
drawSubLinks
public void drawSubLinks(Graphics gr,
int i)
- Draw the second layer of links, highlighting one if it has been flagged
by a MouseOver event.
mouseDown
public boolean mouseDown(Event evt,
int x,
int y)
- If there is a mouse click, see what the last link flagged by MouseOver
was and go to the corresponding URL.
- Overrides:
- mouseDown in class Component
mouseMove
public boolean mouseMove(Event evt,
int x,
int y)
- Whenever the pointer moves in the Graphics area, check if it has
moved over a link or sublink, and if so, flag that link or sublink.
- Overrides:
- mouseMove in class Component
mouseEnter
public boolean mouseEnter(Event evt,
int x,
int y)
- The same code as mouseMove: it is a "boundary case".
- Overrides:
- mouseEnter in class Component
mouseExit
public boolean mouseExit(Event evt,
int x,
int y)
- The same code as mouseMove: it is a "boundary case".
- Overrides:
- mouseExit in class Component
getParameters
public void getParameters()
- Get the parameters.