verinec.importer.analysis
Class AnalysisConfigPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by verinec.importer.analysis.AnalysisConfigPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class AnalysisConfigPanel
extends JPanel

Dialog to configure and start network analysis. Allows to control sniffing, traceroute and portscan parts. A config file will be created wich will be read by StartSniffer upon clicking the run button. * Is this still true? *

Author:
Patrick Aebischer
See Also:
Serialized Form

Nested Class Summary
(package private)  class AnalysisConfigPanel.AnalysingDialog
          Create a wait dialog for analysing network.
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
private  JTabbedPane configElements
           
private static String configfile
           
static boolean DEBUG
          If true, generated logfiles will not be deleted and the found hosts will be output to an xml in java.io.tmpdir
private  JButton ExitButton
           
private  JPanel firstPanel
           
private  JButton LoadCFButton
           
(package private)  JDialog parent
           
private  JButton RunButton
           
private  JButton SaveCFButton
           
 StartScan.ConfigPanel scanPanel
          The scan configuration panel, holding settings for portscans.
(package private)  AnalysisConfigPanel.AnalysingDialog sd
           
private  JPanel secondPanel
           
private  boolean simulate
          Wheter we are in simulation mode.
 StartSniffer.ConfigPanel sniffPanel
          The sniff configuration panel, holding sniffer settings.
(package private)  VerinecStudio studio
           
private  JPanel thirdPanel
           
 StartTraceRoute.ConfigPanel trPanel
          The traceroute configuration panel, holding settings for traceroutes.
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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
private AnalysisConfigPanel(JDialog parent, VerinecStudio analyser)
          This constructor just creates a Panel in an existing JFrame.
 
Method Summary
private  void addWidgets()
          This method adds the widgets to the JPanel
static JDialog createDialog(VerinecStudio analyser)
          Factory method to create a config panel inside a modal dialog.
 void finishedSniffing()
          Tell the panel that sniffing finished.
 boolean isConfigValid()
          Checks if all the necessary fields are filled in.
private  void loadConfiguration()
          Load stored configuration for analysis.
private  void saveConfiguration()
          Save configuration for analysis to config file.
 void setSimulation(boolean b)
          Tell the panel whether network sniffing is simulated.
 void setStatus(String message)
          Set the current state of the panel.
 void showErrorMessage(String title, String message)
          Standard error pane.
 void startSniffing()
          Tell the panel that we start with the analysis.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

configfile

private static final String configfile
See Also:
Constant Field Values

configElements

private JTabbedPane configElements

sniffPanel

public StartSniffer.ConfigPanel sniffPanel
The sniff configuration panel, holding sniffer settings.


scanPanel

public StartScan.ConfigPanel scanPanel
The scan configuration panel, holding settings for portscans.


trPanel

public StartTraceRoute.ConfigPanel trPanel
The traceroute configuration panel, holding settings for traceroutes.


parent

JDialog parent

firstPanel

private JPanel firstPanel

secondPanel

private JPanel secondPanel

thirdPanel

private JPanel thirdPanel

LoadCFButton

private JButton LoadCFButton

SaveCFButton

private JButton SaveCFButton

RunButton

private JButton RunButton

ExitButton

private JButton ExitButton

studio

VerinecStudio studio

sd

AnalysisConfigPanel.AnalysingDialog sd

simulate

private boolean simulate
Wheter we are in simulation mode.


DEBUG

public static final boolean DEBUG
If true, generated logfiles will not be deleted and the found hosts will be output to an xml in java.io.tmpdir

See Also:
Constant Field Values
Constructor Detail

AnalysisConfigPanel

private AnalysisConfigPanel(JDialog parent,
                            VerinecStudio analyser)
                     throws VerinecException
This constructor just creates a Panel in an existing JFrame.

Parameters:
parent - Parent frame.
analyser - The main application.
Throws:
VerinecException
Method Detail

createDialog

public static JDialog createDialog(VerinecStudio analyser)
                            throws VerinecException
Factory method to create a config panel inside a modal dialog.

Parameters:
analyser - The main application.
Returns:
A dialog containing an instance of AnalysisConfigPanel as first and only child.
Throws:
VerinecException

addWidgets

private void addWidgets()
                 throws VerinecException
This method adds the widgets to the JPanel

Throws:
VerinecException - if icons can not be loaded.

startSniffing

public void startSniffing()
Tell the panel that we start with the analysis. It will display the please wait dialog.


finishedSniffing

public void finishedSniffing()
Tell the panel that sniffing finished.


setStatus

public void setStatus(String message)
Set the current state of the panel.

Parameters:
message - A status message

setSimulation

public void setSimulation(boolean b)
Tell the panel whether network sniffing is simulated. If it is, traceroute and scan are disabled.

Parameters:
b - If true, traceroute and scan panels are disabled.

loadConfiguration

private void loadConfiguration()
Load stored configuration for analysis.


saveConfiguration

private void saveConfiguration()
Save configuration for analysis to config file.


isConfigValid

public boolean isConfigValid()
Checks if all the necessary fields are filled in. It is called before starting the network analysis, which is aborted if the configuration is not consistent. If there is an error, it focuses the ConfigPanel to that value.

Returns:
True if consistent, false otherwise

showErrorMessage

public void showErrorMessage(String title,
                             String message)
Standard error pane.

Parameters:
title - The title for the pane.
message - Message for the pane.

Copyright © 2005 Verinec, DIUF