public class UserInterface
extends javax.swing.JFrame
implements java.awt.event.ActionListener
![]() |
![]() |
![]() |
![]() |
Modifier and Type | Class and Description |
---|---|
(package private) class |
UserInterface.ApActionListener |
(package private) class |
UserInterface.IfActionListener |
(package private) class |
UserInterface.WifActionListener |
javax.swing.JFrame.AccessibleJFrame
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
activeDevice
Variables that show which device and which interface of this device are active at the gui.
|
private java.lang.String |
activeIf
Variables that show which device and which interface of this device are active at the gui.
|
private java.util.Map<java.lang.String,javax.swing.JPanel> |
apTable
Map that store the buttons of the representing access points.
|
private javax.swing.JPanel |
cc |
private javax.swing.JPanel |
center |
private javax.swing.JPanel |
cn |
private java.util.Map<java.lang.String,javax.swing.JButton> |
deviceTable
Map that store the buttons of the representing devices.
|
private java.util.Map<java.lang.String,javax.swing.JButton> |
ifTable
Map that store the buttons of the representing interfaces.
|
private javax.swing.JPanel |
nc |
private javax.swing.JPanel |
nn |
private javax.swing.JPanel |
north |
private javax.swing.JPanel |
panel |
private javax.swing.JPanel |
wc |
private javax.swing.JPanel |
west |
private javax.swing.JPanel |
wn |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
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
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
UserInterface()
Constructor of the user interface that creates and sets up the frame.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
void |
addAccessPoint(java.lang.String mac,
java.lang.String[] values)
Adds a new access point to the results of the scanned access points shown on the gui.
|
void |
addDevice(java.lang.String device)
Adds a new device to the user interface.
|
void |
addInterface(java.lang.String name)
Adds a new interface to the user interface.
|
void |
addInterfaceData(java.lang.String name)
Adds the interface data to the user interface.
|
private void |
addScanner(java.lang.String name)
Adds the Scanned APs to the user interface.
|
void |
addWireless(java.lang.String name)
Adds a new wireless interface to the user interface.
|
private void |
createDataLabel() |
private void |
createInterfacesLabel() |
private void |
createPanels() |
private void |
createPCLabel() |
java.lang.String |
getActiveDevice()
Getter for the active device.
|
java.lang.String |
getActiveIf()
Getter for the active interface.
|
void |
refresh()
Refreshes the data that are currently shown.
|
void |
removeAccessPoint(java.lang.String device,
java.lang.String mac)
Removes an access point from the results of the scanned access points shown on the gui.
|
void |
removeDevice(java.lang.String device)
Removes a device from the user interface.
|
void |
removeInterface(java.lang.String device,
java.lang.String ifname)
Removes an interface from the user interface.
|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
private volatile javax.swing.JPanel panel
private volatile javax.swing.JPanel north
private volatile javax.swing.JPanel nn
private volatile javax.swing.JPanel nc
private volatile javax.swing.JPanel west
private volatile javax.swing.JPanel wn
private volatile javax.swing.JPanel wc
private volatile javax.swing.JPanel center
private volatile javax.swing.JPanel cn
private volatile javax.swing.JPanel cc
private volatile java.lang.String activeDevice
private volatile java.lang.String activeIf
private volatile java.util.Map<java.lang.String,javax.swing.JButton> deviceTable
private volatile java.util.Map<java.lang.String,javax.swing.JButton> ifTable
private volatile java.util.Map<java.lang.String,javax.swing.JPanel> apTable
public UserInterface()
public java.lang.String getActiveDevice()
public java.lang.String getActiveIf()
private void createPanels()
private void createPCLabel()
private void createInterfacesLabel()
private void createDataLabel()
public void addDevice(java.lang.String device)
device
- The name of the device to be added to the guipublic void removeDevice(java.lang.String device)
device
- The name of the device to be removed from the guipublic void addInterface(java.lang.String name)
name
- The name of the interface to be added to the guipublic void addWireless(java.lang.String name)
name
- The name of the wireless interface to be added to the guipublic void removeInterface(java.lang.String device, java.lang.String ifname)
device
- The name of the device that the interface belongsifname
- The name of the interface to be deletedprivate void addScanner(java.lang.String name)
name
- The name of the scanner to be added to the guipublic void addAccessPoint(java.lang.String mac, java.lang.String[] values)
mac
- The mac address of the access pointvalues
- Array with the data to be addedpublic void removeAccessPoint(java.lang.String device, java.lang.String mac)
device
- The name of the devicemac
- The mac address of the access pointpublic void addInterfaceData(java.lang.String name)
name
- The name of the data to be addedpublic void refresh()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener