Methods Summary |
---|
public void | addMapArea(java.lang.String s)
if (s.startsWith("rect")) {
try {
RectArea r = new RectArea(s);
areas.addElement(r);
}
catch (MalformedURLException e) {
System.err.println(e);
}
}
else if (s.startsWith("circle")) {
;
}
else if (s.startsWith("poly")) {
;
}
else if (s.startsWith("oval")) {
;
}
else { // unrecognized tag
;
}
|
public java.awt.Dimension | minimumSize()
return new Dimension(theMap.getWidth(this), theMap.getHeight(this));
|
public boolean | mouseDown(java.awt.Event evt, int x, int y)
for (Enumeration e = areas.elements() ; e.hasMoreElements() ;) {
MapArea a = (MapArea) e.nextElement();
if (a.contains(x, y)) {
ac.showDocument(a.getURL());
break;
}
}
return true;
|
public void | paint(java.awt.Graphics g)
if(!g.drawImage(theMap, 0, 0, this)) {
g.drawString("Loading Picture. Please hang on", 25, 50);
}
|
public java.awt.Dimension | preferredSize()
return minimumSize();
|