|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Panel
|
+--java.applet.Applet
|
+--showmap.ShowMap
Abstract applet for showing an interactive map. The applet allows navigating, zooming and retrieval of object information.
| Nested Class Summary |
| Nested classes inherited from class java.applet.Applet |
java.applet.Applet.AccessibleApplet |
| Nested classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
protected static int |
ACTIVE
Status "aktiv: gestarted und bereit für Interaktion". |
protected java.awt.Color |
backgroundColor
Hintergrundfarbe. |
protected int |
baseScaleFactor
Faktor des Basis-Maßstabs (gibt an, mit welchen Faktor der Maßstab zu multiplizieren ist, um die eigentliche Maßstabszahl zu erhalten). |
protected static int |
COMPLETE
Status "vollständig geladen". |
protected DrawableObjects |
drawableObjects
Container über Drawable-Objekte. |
protected static int |
ENGLISH
Sprache Englisch. |
protected static int |
GERMAN
Sprache Deutsch. |
protected boolean |
infoIsShown
Wird aktuell eine Info-Box angezeigt? |
protected int |
language
gewählte Sprache |
protected java.awt.Color |
mapColor
Basis-Kartenfarbe. |
protected int |
mapHeight
Höhe der Gesamtkarte im Basis-Maßstab 1 in Pixel. |
protected int |
mapWidth
Breite der Gesamtkarte im Basis-Maßstab 1 in Pixel. |
protected int |
maxScale
detailiertester Maßstab (in Maßstabseinheiten). |
protected int |
minScale
gröbster Maßstab (in Maßstabseinheiten). |
protected int |
numOfLayers
Anzahl der Layer. |
protected int |
panelHeight
Höhe des Ein-/Ausgabebereichs (in Pixel). |
protected int |
panelY
Obere Position des Ein-/Ausgabebereichs (in Pixel). |
protected int |
scale
aktueller Maßstab (in Maßstabseinheiten). |
protected static int |
STARTED
Status "gestarted". |
protected static int |
STARTING
Status "startend". |
protected int |
state
Applet-Status |
protected boolean |
unicodeSupported
Wird der Wechsel auf Unicode-Darstellung unterstützt? |
protected static long |
UPDATETIME
Wartezeit für nächsten Update in Millisekunden. |
protected CPUTimer |
updateTimer
ID der Update-Timers. |
protected int |
viewHeight
Höhe der Kartenanzeige (in Pixel). |
protected int |
viewMapX
x-Koordinate des Mittelpunkts des akt. angezeigten Kartenausschnitts im akt. |
protected int |
viewMapY
y-Koordinate des Mittelpunkts des akt. angezeigten Kartenausschnitts im akt. |
protected int |
viewWidth
Breite der Kartenanzeige (in Pixel). |
protected int |
viewX
Linke Position der Kartenanzeige (in Pixel). |
protected int |
viewY
Obere Position der Kartenanzeige (in Pixel). |
| Fields inherited from class java.awt.Component |
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 | |
ShowMap()
|
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Event handling for the ActionListener interface. |
protected void |
addComponentsToApplet()
Adds the components to the applet. |
protected void |
addComponentsToListeners()
Announces the components to the event listeners. |
void |
changeComponentPositions()
Sets or changes the positions of the components. |
protected void |
checkViewPoint()
Prüft, ob der Anzeige-Mittelpunkt (viewMapX,viewMapY) im zulässigen Bereich liegt. |
protected java.net.URL |
computeURL(java.lang.String name)
Computes the URL from the specified name. |
protected void |
depictObjectAttributes(DrawableObject obj)
Deselektiert das bisher darstellte Objekt und selektiert das übergebene Objekt. |
protected void |
drawMap(java.awt.Graphics g,
java.awt.Rectangle r,
int scale)
Draws the map. |
protected DrawableObject |
findObject(int mx,
int my,
boolean selectable)
Sucht, ob sich ein sichtbares Objekt an der angegebenen Position befindet. |
java.lang.String |
getAppletInfo()
Information about the applet. |
protected java.awt.Label |
getClickInfoLabel()
Anlegen / Zurückgeben des ClickInfo-Labels. |
protected java.awt.Label |
getCopyrightLabel()
Anlegen / Zurückgeben des Copyright-Labels. |
protected java.awt.Button |
getEastButton()
Anlegen / Zurückgeben des East-Buttons. |
long |
getIdOfSelectedObject()
Gibt die ID des selektierten Objekts zurück. |
java.lang.String |
getIdOfSelectedObjectAsString()
Gibt die ID des selektierten Objekts als String zurück. |
protected abstract java.lang.String |
getInfoText(DrawableObject obj)
Gibt den Info-Text zu einem Objekt zurück. |
protected java.awt.Label |
getNameLabel()
Anlegen / Zurückgeben des Name-Labels. |
java.lang.String |
getNameOfSelectedObject()
Returns the name of the selected object. |
protected java.awt.Button |
getNorthButton()
Anlegen / Zurückgeben des North-Buttons. |
java.lang.String[][] |
getParameterInfo()
Gibt Informationen über die unterstützten Parameter zurück. |
protected java.awt.Label |
getPressInfoLabel()
Anlegen / Zurückgeben des PressInfo-Labels. |
protected java.awt.Label |
getScaleLabel()
Anlegen / Zurückgeben des Scale-Labels. |
protected java.awt.Label |
getShiftClickInfoLabel()
Anlegen / Zurückgeben des ShiftClickInfo-Labels. |
protected java.awt.Button |
getSouthButton()
Anlegen / Zurückgeben des South-Buttons. |
protected int |
getState()
Gibt Applet-Status zurück. |
protected java.awt.Label |
getTagLabel()
Anlegen / Zurückgeben des Tag-Labels. |
protected java.awt.Checkbox |
getUnicodeCheckbox()
Anlegen / Zurückgeben der Unicode-Checkbox. |
protected java.awt.Label |
getValueLabel()
Anlegen / Zurückgeben des Value-Labels. |
protected java.awt.Button |
getWestButton()
Anlegen / Zurückgeben des West-Buttons. |
protected java.awt.Button |
getZoomInButton()
Anlegen / Zurückgeben des ZoomIn-Buttons. |
protected java.awt.Button |
getZoomOutButton()
Anlegen / Zurückgeben des ZoomOut-Buttons. |
void |
init()
Initialisieren des Applets. |
protected abstract void |
initDrawablePresentation()
Legt die notwendigen Darstellungsobjekte an. |
protected void |
interpretParameters()
Interpretiert die Parameter des Applets (mit Ausnahme der URLs). |
void |
itemStateChanged(java.awt.event.ItemEvent e)
Methode zur Behandlung von StateChanged-Events für das ItemListener-Interface. |
protected void |
loadDrawables()
Die Methode wird aufgerufen, falls evtl. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Methode zur Behandlung vom mouseClicked-Event für das MouseListener-Interface. |
void |
mouseDragged(java.awt.event.MouseEvent e)
Methode zur Behandlung vom mouseDragged-Event für das MouseMotionerListener-Interface. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Methode zur Behandlung vom mouseEntered-Event für das MouseListener-Interface. |
void |
mouseExited(java.awt.event.MouseEvent e)
Methode zur Behandlung vom mouseExited-Event für das MouseListener-Interface. |
void |
mouseMoved(java.awt.event.MouseEvent e)
Methode zur Behandlung vom mouseMoved-Event für das MouseMotionerListener-Interface. |
void |
mousePressed(java.awt.event.MouseEvent e)
Methode zur Behandlung vom mousePressed-Event für das MouseListener-Interface. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Methode zur Behandlung vom mouseReleased-Event für das MouseListener-Interface. |
void |
moveEast()
Kartenausschnitt nach Osten verschieben. |
void |
moveNorth()
Kartenausschnitt nach Norden verschieben. |
void |
movePos(int x,
int y)
Verschiebt Mittelpunkt des Kartenausschnitts auf (x,y). |
void |
movePos(int x,
int y,
int s)
Verschiebt Mittelpunkt des Kartenausschnitts auf (x,y) und setzt Maßstab auf den kleinsten Maßstab, der größergleich s ist. |
void |
movePos(long id)
Setzt des Kartenausschnitt so, daß sich das Symbol mit der übergebenen ID in der Ausschnittsmitte befindet. |
void |
moveSouth()
Kartenausschnitt nach Süden verschieben. |
void |
moveWest()
Kartenausschnitt nach Westen verschieben. |
void |
paint(java.awt.Graphics g)
Draw the double buffer (or the map if the buffer does not exist). |
protected void |
paintDragBox(int x1,
int y1,
int x2,
int y2)
Zeichnet die Drag-Box, falls sie hinreichend groß ist. |
protected void |
paintInfo(int x,
int y,
DrawableObject obj)
Stellt einen Info-Text zum übergebenen Objekt dar. |
protected int |
readDrawables(int objNum,
EntryInput ber)
Liest Drawable-Datei vom Enry-Input und erzeugt entsprechende Drawable-Objekte. |
protected int |
readDrawables(int objNum,
java.net.URL url,
int index)
Wertet URL aus; weiteres siehe readDrawables (int,EntryInput,String). |
void |
setMapSize(int pViewWidth,
int pViewHeight)
Ändert die Größe der Karte und des Applets. |
protected void |
setState(int state)
Sets the state of the applet. |
protected void |
setUnicode(boolean f)
Stellt die Text-Ausgabe in Abhängigkeit vom Parameter auf Unicode oder ANSI. |
void |
setViewToPrefinedValue()
Sets the viewpoint to the value predefined by the parameters. |
protected void |
startLoadingThread()
Interprets the parameter "url" and starts the loading thread. |
void |
update(java.awt.Graphics pg)
Paints the map. |
int |
xIntoCoord(int x)
Transforms pixel position into x-coordinate. |
int |
yIntoCoord(int y)
Transforms pixel position into y-coordinate. |
void |
zoomIn()
Zoomt in Karte hinein. |
void |
zoomOut()
Zoomt aus der Karte heraus. |
| Methods inherited from class java.applet.Applet |
destroy, getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop |
| Methods inherited from class java.awt.Panel |
addNotify |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static final int STARTING
protected static final int STARTED
protected static final int ACTIVE
protected static final int COMPLETE
protected static final int ENGLISH
protected static final int GERMAN
protected CPUTimer updateTimer
protected static final long UPDATETIME
protected int numOfLayers
protected DrawableObjects drawableObjects
protected int baseScaleFactor
protected int mapWidth
protected int mapHeight
protected int viewMapX
protected int viewMapY
protected int maxScale
protected int minScale
protected int scale
protected int viewWidth
protected int viewHeight
protected int viewX
protected int viewY
protected int panelY
protected int panelHeight
protected java.awt.Color backgroundColor
protected java.awt.Color mapColor
protected boolean unicodeSupported
protected int language
protected int state
protected boolean infoIsShown
| Constructor Detail |
public ShowMap()
| Method Detail |
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenere - the eventprotected void addComponentsToApplet()
protected void addComponentsToListeners()
public void changeComponentPositions()
protected void checkViewPoint()
protected java.net.URL computeURL(java.lang.String name)
name - absolute orL
protected void depictObjectAttributes(DrawableObject obj)
obj - Objekt
protected void drawMap(java.awt.Graphics g,
java.awt.Rectangle r,
int scale)
g - graphical contextr - clipping rectangle in world coordinatesscale - current scale
protected DrawableObject findObject(int mx,
int my,
boolean selectable)
mx - x-Position in Applet-Pixel-Koordinatenmy - y-Position in Applet-Pixel-Koordinatenselectable - nur selektierbare Objekte suchen?public java.lang.String getAppletInfo()
getAppletInfo in class java.applet.Appletprotected java.awt.Label getClickInfoLabel()
protected java.awt.Label getCopyrightLabel()
protected java.awt.Button getEastButton()
public long getIdOfSelectedObject()
public java.lang.String getIdOfSelectedObjectAsString()
protected abstract java.lang.String getInfoText(DrawableObject obj)
obj - Objekt
protected java.awt.Label getNameLabel()
public java.lang.String getNameOfSelectedObject()
protected java.awt.Button getNorthButton()
public java.lang.String[][] getParameterInfo()
getParameterInfo in class java.applet.Appletprotected java.awt.Label getPressInfoLabel()
protected java.awt.Label getScaleLabel()
protected java.awt.Label getShiftClickInfoLabel()
protected java.awt.Button getSouthButton()
protected int getState()
protected java.awt.Label getTagLabel()
protected java.awt.Checkbox getUnicodeCheckbox()
protected java.awt.Label getValueLabel()
protected java.awt.Button getWestButton()
protected java.awt.Button getZoomInButton()
protected java.awt.Button getZoomOutButton()
public void init()
init in class java.applet.Appletprotected abstract void initDrawablePresentation()
protected void interpretParameters()
public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListenere - akt. Eventprotected void loadDrawables()
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenere - akt. Eventpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenere - akt. Eventpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenere - akt. Eventpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenere - akt. Eventpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenere - akt. Eventpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenere - akt. Eventpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenere - akt. Eventpublic void moveEast()
public void moveNorth()
public void movePos(int x,
int y)
x - x-Koordinate in Applet-Pixely - y-Koordinate in Applet-Pixel
public void movePos(int x,
int y,
int s)
x - x-Koordinate in Welt-Koordinateny - y-Koordinate in Welt-Koordinatens - Maßstabpublic void movePos(long id)
id - ID des Symbolspublic void moveSouth()
public void moveWest()
public void paint(java.awt.Graphics g)
paint in class java.awt.Containerg - graphical context.
protected void paintDragBox(int x1,
int y1,
int x2,
int y2)
x1 - x-Koordinate 1y1 - y-Koordinate 1x2 - x-Koordinate 2y2 - y-Koordinate 2
protected void paintInfo(int x,
int y,
DrawableObject obj)
x - x-Positiony - y-Position
protected int readDrawables(int objNum,
java.net.URL url,
int index)
objNum - Anzahl bisher eingelesener Objekteurl - URL, wo die zu lesenden Daten liegenindex - Index der URL
protected int readDrawables(int objNum,
EntryInput ber)
objNum - Anzahl bisher eingelesener Objekteber - EntryInput
public void setMapSize(int pViewWidth,
int pViewHeight)
pViewWidth - Breite der KartenanzeigepViewHeight - Höhe der Kartenanzeigeprotected void setState(int state)
state - the new stateprotected void setUnicode(boolean f)
f - Unicode?public void setViewToPrefinedValue()
protected void startLoadingThread()
public void update(java.awt.Graphics pg)
update in class java.awt.Containerpg - graphical context.public int xIntoCoord(int x)
x - x-pixel
public int yIntoCoord(int y)
y - y-pixel
public void zoomIn()
public void zoomOut()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||