Class MapFrame

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Frame
                  extended byjavax.swing.JFrame
                      extended byMapFrame
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants

public class MapFrame
extends javax.swing.JFrame

This class is responsible for everything that is related to creating and displaying maps. The class lets the user choose the current network and map to be displayed and the time period for the statistic. The user can also filter the map to show only certain lines or nodes.

See Also:
Serialized Form

Nested Class Summary
(package private)  class MapFrame.MapImageComponent
          Class that contains the map image.
(package private)  class MapFrame.MapMouseListener
          Class that handles mouse events on the map.
(package private)  class MapFrame.SliderListener
           
(package private)  class MapFrame.StatisticTimerListener
           
 
Nested classes inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
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
private  Selectable activeElement
           
private  javax.swing.JLabel animation_label
           
private  javax.swing.JPanel animation_panel
           
private  boolean animationPlaying
           
private  javax.swing.Timer animationTimer
           
private  javax.swing.JPanel assoc_panel
           
private  javax.swing.JPanel assocComboBox_panel
           
private  javax.swing.JCheckBox autoUpdate_checkBox
           
private  javax.swing.JPanel autoUpdate_panel
           
private  javax.swing.JLabel autoUpdateBlank_label
           
private  boolean autoUpdating
           
private  javax.swing.JLabel blankSpace1_label
           
private  javax.swing.JLabel blankSpace2_label
           
private  javax.swing.JLabel blankSpace3_label
           
private  boolean blockDateUpdate
           
private  javax.swing.ButtonGroup buttonGroup
           
private  java.util.Date date
           
private  javax.swing.JLabel day_label
           
private  javax.swing.JButton decDay_button
           
private  javax.swing.JButton decMonth_button
           
private  javax.swing.JButton decYear_button
           
private  javax.swing.JPanel description_panel
           
private  javax.swing.JScrollPane description_scrollPane
           
private  javax.swing.JButton doc_button
           
private  javax.swing.JPanel doc_panel
           
private  javax.swing.JLabel dynIntervalSize_label
           
private  int fps
           
private  javax.swing.JComboBox frames_comboBox
           
private  javax.swing.JLabel frames_label
           
private  javax.swing.JPanel frames_panel
           
private  javax.swing.JLabel framesBlank_label
           
private  javax.swing.JButton incDay_button
           
private  javax.swing.JButton incMonth_button
           
private  javax.swing.JButton incYear_button
           
private  javax.swing.JPanel intervalSize_panel
           
private  javax.swing.JComboBox lineColour_comboBox
           
private  javax.swing.JLabel lineColour_label
           
private  javax.swing.JComboBox lines_comboBox
           
private  javax.swing.JLabel lines_label
           
private  javax.swing.JComboBox lineSize_comboBox
           
private  javax.swing.JLabel lineSize_label
           
private  javax.swing.JComboBox map_comboBox
           
private  javax.swing.JLabel map_label
           
private  javax.swing.JPanel map_panel
           
private  java.awt.Image mapImage
           
private  MapFrame.MapImageComponent mapImageComponent
           
private  javax.swing.JPanel maplist_panel
           
private  MapFrame.MapMouseListener mapMouseListener
           
private  javax.swing.JPanel mapSelection_panel
           
private  javax.swing.JLabel month_label
           
private  javax.swing.JComboBox network_comboBox
           
private  javax.swing.JLabel network_label
           
private  Netmonitor nm
           
private  javax.swing.JComboBox nodes_comboBox
           
private  javax.swing.JLabel nodes_label
           
private  javax.swing.JButton play_button
           
private  javax.swing.JPanel playPause_panel
           
private  javax.swing.JComboBox pointColour_comboBox
           
private  javax.swing.JLabel pointColour_label
           
private  javax.swing.JComboBox pointSize_comboBox
           
private  javax.swing.JLabel pointSize_label
           
private  javax.swing.JPanel selectChoice_panel
           
private  javax.swing.JPanel selectStaticLabel_panel
           
private  javax.swing.JPanel show_panel
           
private  javax.swing.JPanel showChoice_panel
           
private  javax.swing.JPanel showNodesLines_panel
           
private  boolean showOptions
           
private  javax.swing.JButton showOptions_button
           
private  javax.swing.JPanel showStaticLabel_panel
           
private  javax.swing.JLabel slider_label
           
private  javax.swing.JPanel slider_panel
           
private  MapFrame.SliderListener sliderListener
           
private  int statAnimationFrame
           
private  javax.swing.JPanel statAssocLabel_panel
           
private  javax.swing.JLabel staticIntervalSize_label
           
private  javax.swing.JPanel statIntervals_panel
           
private  javax.swing.JPanel statistic_panel
           
private  javax.swing.Timer statisticIntervalTimer
           
private  javax.swing.JButton stepBackward_button
           
private  javax.swing.JButton stepForward_button
           
private  javax.swing.JTabbedPane tabbedPane
           
private  javax.swing.JSlider time_slider
           
private  int timeAxisSize
           
private  javax.swing.JPanel timeOptions_panel
           
private  int timeStepSize
           
private  javax.swing.JToolBar toolbar
           
private  javax.swing.JLabel year_label
           
private  javax.swing.JButton zoomIn_button
           
private  javax.swing.JButton zoomOut_button
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Window
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
MapFrame(Netmonitor nm)
          Creates a new MapFrame instance.
 
Method Summary
 void addURL(LineElement lineElement, java.lang.String lineURL, java.lang.String URLInfo)
           
 void addURL(PointElement pointElement, java.lang.String pointURL, java.lang.String URLInfo)
           
 void createMap(MapElement mapElement)
          Creates a new map and draws it on the screen.
 void createTimeAxis()
           
private  void decDay_buttonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void decMonth_buttonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void decYear_buttonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void exitForm(java.awt.event.WindowEvent evt)
          Exit the Application
 void filterLines()
          Filter the lines according to the type chosen in the linetypes combobox.
 void filterPoints()
           
 java.util.Date getCurrentDate()
           
 void handleChosenMap()
          Selects the newly chosen map.
 void handleChosenNetwork()
          Selects the newly chosen network.
 void handleStatisticComboBox()
          Selects the newly chosen statistics.
 void handleToolbarClick(java.awt.event.ActionEvent evt)
           
private  void incDay_buttonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void incMonth_buttonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void incYear_buttonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void initComponents()
          This method is called from within the constructor to initialize the form.
private  void lineColour_comboBoxActionPerformed(java.awt.event.ActionEvent evt)
           
private  void lineSize_comboBoxActionPerformed(java.awt.event.ActionEvent evt)
           
 void makeFilterChoices(MapElement mapElement)
          Fills up the filter comboboxes with the relevant choices for this map.
private  void makeMapRegions(MapElement currentMap)
          Generates a list of clickable map regions.
 void mouseClickedOnMap(java.awt.event.MouseEvent e)
          Called when the mouse is clicked while over the map.
 void mouseExitedMap(java.awt.event.MouseEvent e)
          Called when the mouse pointer moves outside the map area.
 void mouseMovedOverMap(java.awt.event.MouseEvent event)
          Called when the mouse pointer moves over the map.
 void performStatAnimation()
           
private  void play_buttonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void pointColour_comboBoxActionPerformed(java.awt.event.ActionEvent evt)
           
private  void pointSize_comboBoxActionPerformed(java.awt.event.ActionEvent evt)
           
 void redrawMap()
          Redraws the map.
 void removeIntervalDescriptions()
          Clears the statistic interval description panel.
 void retrieveEquipmentStatistics(PointElement pointElement)
           
 void retrieveLineURL(LineElement lineElement)
           
 void retrieveLineValueStatistics(LineElement lineElement)
           
 void retrievePointURL(PointElement pointElement)
           
 void selectMap(MapElement map)
          Selects a new map in the combobox.
 void selectNetwork(NetworkElement network)
          Selects a network in the network combobox.
 void selectStatistic(StatisticElement statElement)
          Selects a new statistic in the combobox.
 void setAutoUpdate(boolean newState)
           
 void setFramesPerSecond()
           
 void setStepSize(int step)
           
 void showMissingStatistics(java.util.Vector missingStats, java.lang.String stepString)
           
private  void showOptions_buttonActionPerformed(java.awt.event.ActionEvent evt)
           
 void startAnimation()
           
private  void stepBackward_buttonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void stepForward_buttonActionPerformed(java.awt.event.ActionEvent evt)
           
 void stop()
           
 void stopAnimation()
           
 void updateIntervalDescriptions(StatisticElement statElement)
          Updates the statistic interval panel with a new statistic.
 void updateMapRegionList(javax.swing.DefaultListModel listModel)
          Updates the list of map regions.
 void updateNetworkList(javax.swing.DefaultListModel listModel)
          Updates the list of networks.
 void updateStatisticList(javax.swing.DefaultListModel listModel)
          Updates the list of statistics.
 void updateTimeLabels()
           
 void viewDocumentation()
           
private  void zoomIn_buttonActionPerformed(java.awt.event.ActionEvent evt)
           
private  void zoomOut_buttonActionPerformed(java.awt.event.ActionEvent evt)
           
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, 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, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

mapImageComponent

private MapFrame.MapImageComponent mapImageComponent

mapImage

private java.awt.Image mapImage

mapMouseListener

private MapFrame.MapMouseListener mapMouseListener

nm

private Netmonitor nm

animationTimer

private javax.swing.Timer animationTimer

statAnimationFrame

private int statAnimationFrame

showOptions

private boolean showOptions

statisticIntervalTimer

private javax.swing.Timer statisticIntervalTimer

sliderListener

private MapFrame.SliderListener sliderListener

date

private java.util.Date date

timeAxisSize

private int timeAxisSize

timeStepSize

private int timeStepSize

blockDateUpdate

private boolean blockDateUpdate

animationPlaying

private boolean animationPlaying

autoUpdating

private boolean autoUpdating

activeElement

private Selectable activeElement

fps

private int fps

doc_button

private javax.swing.JButton doc_button

doc_panel

private javax.swing.JPanel doc_panel

incMonth_button

private javax.swing.JButton incMonth_button

animation_label

private javax.swing.JLabel animation_label

autoUpdateBlank_label

private javax.swing.JLabel autoUpdateBlank_label

lineSize_label

private javax.swing.JLabel lineSize_label

stepForward_button

private javax.swing.JButton stepForward_button

incYear_button

private javax.swing.JButton incYear_button

timeOptions_panel

private javax.swing.JPanel timeOptions_panel

frames_label

private javax.swing.JLabel frames_label

pointSize_comboBox

private javax.swing.JComboBox pointSize_comboBox

description_panel

private javax.swing.JPanel description_panel

incDay_button

private javax.swing.JButton incDay_button

mapSelection_panel

private javax.swing.JPanel mapSelection_panel

map_panel

private javax.swing.JPanel map_panel

zoomIn_button

private javax.swing.JButton zoomIn_button

assoc_panel

private javax.swing.JPanel assoc_panel

description_scrollPane

private javax.swing.JScrollPane description_scrollPane

day_label

private javax.swing.JLabel day_label

decYear_button

private javax.swing.JButton decYear_button

tabbedPane

private javax.swing.JTabbedPane tabbedPane

showNodesLines_panel

private javax.swing.JPanel showNodesLines_panel

decDay_button

private javax.swing.JButton decDay_button

lineSize_comboBox

private javax.swing.JComboBox lineSize_comboBox

maplist_panel

private javax.swing.JPanel maplist_panel

selectChoice_panel

private javax.swing.JPanel selectChoice_panel

month_label

private javax.swing.JLabel month_label

autoUpdate_panel

private javax.swing.JPanel autoUpdate_panel

lineColour_comboBox

private javax.swing.JComboBox lineColour_comboBox

network_label

private javax.swing.JLabel network_label

intervalSize_panel

private javax.swing.JPanel intervalSize_panel

map_comboBox

private javax.swing.JComboBox map_comboBox

pointColour_comboBox

private javax.swing.JComboBox pointColour_comboBox

statAssocLabel_panel

private javax.swing.JPanel statAssocLabel_panel

year_label

private javax.swing.JLabel year_label

pointColour_label

private javax.swing.JLabel pointColour_label

statistic_panel

private javax.swing.JPanel statistic_panel

buttonGroup

private javax.swing.ButtonGroup buttonGroup

time_slider

private javax.swing.JSlider time_slider

lineColour_label

private javax.swing.JLabel lineColour_label

toolbar

private javax.swing.JToolBar toolbar

map_label

private javax.swing.JLabel map_label

network_comboBox

private javax.swing.JComboBox network_comboBox

showChoice_panel

private javax.swing.JPanel showChoice_panel

statIntervals_panel

private javax.swing.JPanel statIntervals_panel

play_button

private javax.swing.JButton play_button

decMonth_button

private javax.swing.JButton decMonth_button

animation_panel

private javax.swing.JPanel animation_panel

showStaticLabel_panel

private javax.swing.JPanel showStaticLabel_panel

staticIntervalSize_label

private javax.swing.JLabel staticIntervalSize_label

zoomOut_button

private javax.swing.JButton zoomOut_button

assocComboBox_panel

private javax.swing.JPanel assocComboBox_panel

framesBlank_label

private javax.swing.JLabel framesBlank_label

blankSpace2_label

private javax.swing.JLabel blankSpace2_label

nodes_label

private javax.swing.JLabel nodes_label

slider_panel

private javax.swing.JPanel slider_panel

showOptions_button

private javax.swing.JButton showOptions_button

stepBackward_button

private javax.swing.JButton stepBackward_button

frames_comboBox

private javax.swing.JComboBox frames_comboBox

slider_label

private javax.swing.JLabel slider_label

blankSpace3_label

private javax.swing.JLabel blankSpace3_label

dynIntervalSize_label

private javax.swing.JLabel dynIntervalSize_label

playPause_panel

private javax.swing.JPanel playPause_panel

lines_comboBox

private javax.swing.JComboBox lines_comboBox

lines_label

private javax.swing.JLabel lines_label

nodes_comboBox

private javax.swing.JComboBox nodes_comboBox

pointSize_label

private javax.swing.JLabel pointSize_label

frames_panel

private javax.swing.JPanel frames_panel

autoUpdate_checkBox

private javax.swing.JCheckBox autoUpdate_checkBox

selectStaticLabel_panel

private javax.swing.JPanel selectStaticLabel_panel

blankSpace1_label

private javax.swing.JLabel blankSpace1_label

show_panel

private javax.swing.JPanel show_panel
Constructor Detail

MapFrame

public MapFrame(Netmonitor nm)
Creates a new MapFrame instance.

Parameters:
nm - a reference to the Netmonitor class
Method Detail

initComponents

private void initComponents()
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.


stepBackward_buttonActionPerformed

private void stepBackward_buttonActionPerformed(java.awt.event.ActionEvent evt)

pointSize_comboBoxActionPerformed

private void pointSize_comboBoxActionPerformed(java.awt.event.ActionEvent evt)

pointColour_comboBoxActionPerformed

private void pointColour_comboBoxActionPerformed(java.awt.event.ActionEvent evt)

lineSize_comboBoxActionPerformed

private void lineSize_comboBoxActionPerformed(java.awt.event.ActionEvent evt)

lineColour_comboBoxActionPerformed

private void lineColour_comboBoxActionPerformed(java.awt.event.ActionEvent evt)

stepForward_buttonActionPerformed

private void stepForward_buttonActionPerformed(java.awt.event.ActionEvent evt)

play_buttonActionPerformed

private void play_buttonActionPerformed(java.awt.event.ActionEvent evt)

zoomOut_buttonActionPerformed

private void zoomOut_buttonActionPerformed(java.awt.event.ActionEvent evt)

zoomIn_buttonActionPerformed

private void zoomIn_buttonActionPerformed(java.awt.event.ActionEvent evt)

incYear_buttonActionPerformed

private void incYear_buttonActionPerformed(java.awt.event.ActionEvent evt)

decYear_buttonActionPerformed

private void decYear_buttonActionPerformed(java.awt.event.ActionEvent evt)

incMonth_buttonActionPerformed

private void incMonth_buttonActionPerformed(java.awt.event.ActionEvent evt)

decMonth_buttonActionPerformed

private void decMonth_buttonActionPerformed(java.awt.event.ActionEvent evt)

incDay_buttonActionPerformed

private void incDay_buttonActionPerformed(java.awt.event.ActionEvent evt)

decDay_buttonActionPerformed

private void decDay_buttonActionPerformed(java.awt.event.ActionEvent evt)

showOptions_buttonActionPerformed

private void showOptions_buttonActionPerformed(java.awt.event.ActionEvent evt)

exitForm

private void exitForm(java.awt.event.WindowEvent evt)
Exit the Application


createMap

public void createMap(MapElement mapElement)
Creates a new map and draws it on the screen. This method calls the relevant methods for creating clickable point, line and map regions. Then the redrawMap and retrieveStatistics methods are called.

Parameters:
mapElement - the MapElement object that is drawn

redrawMap

public void redrawMap()
Redraws the map. This method first calls getMapImage to draw new lines and points on the base map image. Then the repaint method is called on the JLabel containing the map image.


stop

public void stop()

makeFilterChoices

public void makeFilterChoices(MapElement mapElement)
Fills up the filter comboboxes with the relevant choices for this map. All the lines and points on the map are checked to determine how many different types the user can choose from.


filterLines

public void filterLines()
Filter the lines according to the type chosen in the linetypes combobox.


filterPoints

public void filterPoints()

setFramesPerSecond

public void setFramesPerSecond()

makeMapRegions

private void makeMapRegions(MapElement currentMap)
Generates a list of clickable map regions.


mouseMovedOverMap

public void mouseMovedOverMap(java.awt.event.MouseEvent event)
Called when the mouse pointer moves over the map. Selects the region, line or node the mouse is pointing at.


mouseExitedMap

public void mouseExitedMap(java.awt.event.MouseEvent e)
Called when the mouse pointer moves outside the map area. Sets the currently selected items to none.


mouseClickedOnMap

public void mouseClickedOnMap(java.awt.event.MouseEvent e)
Called when the mouse is clicked while over the map. If a node or line is selected, a popup menu is shown.


updateMapRegionList

public void updateMapRegionList(javax.swing.DefaultListModel listModel)
Updates the list of map regions.

Parameters:
listModel - the DefaultListModel containing the new map regions

updateNetworkList

public void updateNetworkList(javax.swing.DefaultListModel listModel)
Updates the list of networks.


updateStatisticList

public void updateStatisticList(javax.swing.DefaultListModel listModel)
Updates the list of statistics.


handleChosenNetwork

public void handleChosenNetwork()
Selects the newly chosen network.


handleChosenMap

public void handleChosenMap()
Selects the newly chosen map.


handleStatisticComboBox

public void handleStatisticComboBox()
Selects the newly chosen statistics.


removeIntervalDescriptions

public void removeIntervalDescriptions()
Clears the statistic interval description panel.


updateIntervalDescriptions

public void updateIntervalDescriptions(StatisticElement statElement)
Updates the statistic interval panel with a new statistic.


selectMap

public void selectMap(MapElement map)
Selects a new map in the combobox.

Parameters:
map - the name of the map we want to show

selectStatistic

public void selectStatistic(StatisticElement statElement)
Selects a new statistic in the combobox.


retrieveEquipmentStatistics

public void retrieveEquipmentStatistics(PointElement pointElement)

retrievePointURL

public void retrievePointURL(PointElement pointElement)

retrieveLineURL

public void retrieveLineURL(LineElement lineElement)

addURL

public void addURL(PointElement pointElement,
                   java.lang.String pointURL,
                   java.lang.String URLInfo)

addURL

public void addURL(LineElement lineElement,
                   java.lang.String lineURL,
                   java.lang.String URLInfo)

retrieveLineValueStatistics

public void retrieveLineValueStatistics(LineElement lineElement)

selectNetwork

public void selectNetwork(NetworkElement network)
Selects a network in the network combobox.

Parameters:
network - the name of the network to be selected

viewDocumentation

public void viewDocumentation()

performStatAnimation

public void performStatAnimation()

stopAnimation

public void stopAnimation()

startAnimation

public void startAnimation()

getCurrentDate

public java.util.Date getCurrentDate()

setStepSize

public void setStepSize(int step)

showMissingStatistics

public void showMissingStatistics(java.util.Vector missingStats,
                                  java.lang.String stepString)

createTimeAxis

public void createTimeAxis()

setAutoUpdate

public void setAutoUpdate(boolean newState)

handleToolbarClick

public void handleToolbarClick(java.awt.event.ActionEvent evt)

updateTimeLabels

public void updateTimeLabels()