|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
vanetsim.gui.controlpanels.ReportingControlPanel
public final class ReportingControlPanel
This class contains the control elements for display of statistics and mix zone information
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.BaselineResizeBehavior |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| 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 | |
|---|---|
ReportingControlPanel()
Constructor for this control panel. |
|
| Method Summary | |
|---|---|
void |
accumulateDetailedLogFiles()
Opens log files and calculates data for diagram. |
float[] |
accumulateDetailFiles(java.util.ArrayList<java.io.File> files)
Accumulates different versions of a scenario for a detailed analysis |
void |
accumulateSimpleLogFiles(java.lang.String mode)
Opens log files and calculates data for diagram. |
float[] |
accumulateSimpleMixFiles(java.util.ArrayList<java.io.File> files)
Accumulates different versions of a scenario for a simple mix-zone analysis |
float[] |
accumulateSimpleSilentPeriodFiles(java.util.ArrayList<java.io.File> files)
Accumulates different versions of a scenario for a simple silent-period analysis |
void |
actionPerformed(java.awt.event.ActionEvent e)
An implemented ActionListener which performs all needed actions when a JButton
is clicked. |
void |
addBeacon(RSU rsu,
long ID,
long x,
long y,
boolean isEncrypted)
Receive a beacon from a RSU in the monitored zone. |
void |
addBeacon(Vehicle vehicle,
long ID,
long x,
long y,
double speed,
boolean isEncrypted)
Receive a beacon from a vehicle in the monitored zone. |
void |
addBeacon(Vehicle vehicle,
long ID,
long x,
long y,
double speed,
boolean isEncrypted,
boolean isForwared)
Receive a beacon from a vehicle in the monitored zone. |
void |
calculateStreetLength()
Sums up the length of all the streets on the loaded map |
void |
checkUpdates(int timePerStep)
This function should be called after each simulation step to determine if an update of statistics/beacon information is necessary |
void |
cleanLogFile()
Exchanges the coordinates of a mix-zone-log with port numbers. |
int |
compare(java.lang.String[] string1,
java.lang.String[] string2)
Yes it is a own compareTo method, because java is annoying!!! |
void |
editDetailLogFiles()
Reads detailed log files and calculates advanced information for diagrams |
java.util.ArrayList<java.io.File> |
getFileList(java.io.File file)
Gets the different versions of a szenario log (searches for _version1..., _version2...) |
boolean |
isActive()
Sets if this panel is currently active. |
boolean |
isInMonitoredMixZoneEditMode()
Returns if editing of the monitored mix zone is enabled. |
void |
itemStateChanged(java.awt.event.ItemEvent e)
Invoked when an item changes. |
void |
receiveMouseEvent(int x,
int y)
Receives a mouse event for changing the monitored mix zone. |
void |
setActive(boolean active)
Sets if this panel is currently active |
void |
showAdvancedLocationInformation()
Show the attack results on the map |
void |
updateBeaconInfo()
Updates the statistics. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ReportingControlPanel()
| Method Detail |
|---|
public void checkUpdates(int timePerStep)
timePerStep - the time of one simulation step in millisecondspublic void updateBeaconInfo()
public void addBeacon(Vehicle vehicle,
long ID,
long x,
long y,
double speed,
boolean isEncrypted)
vehicle - the vehicleID - the ID of the vehiclex - the x coordinate of the vehicley - the y coordinate of the vehiclespeed - the speed of the vehicleisEncrypted - if the beacon is encrypted
public void addBeacon(Vehicle vehicle,
long ID,
long x,
long y,
double speed,
boolean isEncrypted,
boolean isForwared)
vehicle - the vehicleID - the ID of the vehiclex - the x coordinate of the vehicley - the y coordinate of the vehiclespeed - the speed of the vehicleisEncrypted - if the beacon is encryptedisForwared - if a beacon is forwared by an RSU
public void addBeacon(RSU rsu,
long ID,
long x,
long y,
boolean isEncrypted)
rsu - the RSUID - the ID of the vehiclex - the x coordinate of the vehicley - the y coordinate of the vehicleisEncrypted - if Beacon was encrypted
public void receiveMouseEvent(int x,
int y)
x - the x coordinatey - the y coordinatepublic void actionPerformed(java.awt.event.ActionEvent e)
ActionListener which performs all needed actions when a JButton
is clicked.
actionPerformed in interface java.awt.event.ActionListenere - an ActionEventpublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListenere - the change eventItemListener.itemStateChanged(java.awt.event.ItemEvent)public boolean isActive()
true if it is active, else falsepublic boolean isInMonitoredMixZoneEditMode()
true if it is enabled, else falsepublic void setActive(boolean active)
active - true if it is active, else false
public void cleanLogFile()
throws java.io.IOException
java.io.IOExceptionpublic void calculateStreetLength()
public void showAdvancedLocationInformation()
public float[] accumulateSimpleMixFiles(java.util.ArrayList<java.io.File> files)
files - the different versions of a scenario analysis
public float[] accumulateSimpleSilentPeriodFiles(java.util.ArrayList<java.io.File> files)
files - the different versions of a scenario analysis
public float[] accumulateDetailFiles(java.util.ArrayList<java.io.File> files)
files - the different versions of a scenario analysis
public java.util.ArrayList<java.io.File> getFileList(java.io.File file)
file -
public void editDetailLogFiles()
public void accumulateDetailedLogFiles()
public void accumulateSimpleLogFiles(java.lang.String mode)
public int compare(java.lang.String[] string1,
java.lang.String[] string2)
string1 - the first stringstring2 - the string to compare to the first one
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||