de.fhkl.zw.mkup.rattrap
Class Gui

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by thinlet.Thinlet
              extended by de.fhkl.zw.mkup.rattrap.Gui
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.lang.Runnable

public class Gui
extends thinlet.Thinlet

This class is responsible for parsing, assembling and finally showing the Thinlet code as a GUI.

Author:
Martin Schultz
See Also:
Serialized Form

Field Summary
 
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
Gui(XMLClient client, java.lang.String country)
          The Constructor parses the XML file that describes the GUI and initiates downloading the data from the server.
 
Method Summary
 void exit()
          Quits the application
 void getAll()
          The method gets the data from the Results class.
 void showAll(thinlet.Thinlet thinlet, java.lang.Object worldMap)
          This method handles a button, which is responsible for showing connections between spammers and harvesters on the worldmap.
 void showHarvesterCountries(thinlet.Thinlet thinlet, java.lang.Object pieChart)
          This method handles a button, which is responsible for showing pie charts on the worldmap.
 void showHarvesters(thinlet.Thinlet thinlet, java.lang.Object worldMap)
          This method handles a button, which is responsible for showing harvesters on the worldmap.
 void showIntelligence(thinlet.Thinlet thinlet, java.lang.Object pieChart)
          This method handles a button, which is responsible for showing pie charts on the worldmap.
 void showSpamCountries(thinlet.Thinlet thinlet, java.lang.Object pieChart)
          This method handles a button, which is responsible for showing pie charts on the worldmap.
 void showSpammers(thinlet.Thinlet thinlet, java.lang.Object worldMap)
          This method handles a button, which is responsible for showing spammers on the worldmap.
 void showUseragent(thinlet.Thinlet thinlet, java.lang.Object pieChart)
          This method handles a button, which is responsible for showing pie charts on the worldmap.
 void startBean()
          This method sets the user's country for later visualization.
 
Methods inherited from class thinlet.Thinlet
add, add, add, create, destroy, find, find, getBoolean, getChoice, getClass, getColor, getComponent, getCount, getDesktop, getFont, getIcon, getIcon, getIcon, getInteger, getItem, getItems, getParent, getPreferredSize, getProperty, getSelectedIndex, getSelectedItem, getSelectedItems, getString, getWidget, isFocusTraversable, paint, parse, parse, parse, parse, putProperty, remove, removeAll, repaint, requestFocus, run, setBoolean, setChoice, setColor, setColors, setComponent, setFont, setFont, setFont, setIcon, setInteger, setKeystroke, setMethod, setResourceBundle, setString, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, 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, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Gui

public Gui(XMLClient client,
           java.lang.String country)
The Constructor parses the XML file that describes the GUI and initiates downloading the data from the server.

Parameters:
client: - The instance of the XML-RPC client
Method Detail

getAll

public void getAll()
The method gets the data from the Results class. Furthermore, a Thinlet table is filled with the recieved data.


startBean

public void startBean()
This method sets the user's country for later visualization.


showSpammers

public void showSpammers(thinlet.Thinlet thinlet,
                         java.lang.Object worldMap)
This method handles a button, which is responsible for showing spammers on the worldmap.

Parameters:
thinlet: - The Thinlet instance.
worldMap: - The instance of the WorldMap class which is responsible for visualization.

showHarvesters

public void showHarvesters(thinlet.Thinlet thinlet,
                           java.lang.Object worldMap)
This method handles a button, which is responsible for showing harvesters on the worldmap.

Parameters:
thinlet: - The Thinlet instance.
worldMap: - The instance of the WorldMap class which is responsible for visualization.

showAll

public void showAll(thinlet.Thinlet thinlet,
                    java.lang.Object worldMap)
This method handles a button, which is responsible for showing connections between spammers and harvesters on the worldmap.

Parameters:
thinlet: - The Thinlet instance.
worldMap: - The instance of the WorldMap class which is responsible for visualization.

showSpamCountries

public void showSpamCountries(thinlet.Thinlet thinlet,
                              java.lang.Object pieChart)
This method handles a button, which is responsible for showing pie charts on the worldmap.

Parameters:
thinlet: - The Thinlet instance.
worldMap: - The instance of the PieCharts class which is responsible for visualization.

showIntelligence

public void showIntelligence(thinlet.Thinlet thinlet,
                             java.lang.Object pieChart)
This method handles a button, which is responsible for showing pie charts on the worldmap.

Parameters:
thinlet: - The Thinlet instance.
worldMap: - The instance of the PieCharts class which is responsible for visualization.

showHarvesterCountries

public void showHarvesterCountries(thinlet.Thinlet thinlet,
                                   java.lang.Object pieChart)
This method handles a button, which is responsible for showing pie charts on the worldmap.

Parameters:
thinlet: - The Thinlet instance.
worldMap: - The instance of the PieCharts class which is responsible for visualization.

showUseragent

public void showUseragent(thinlet.Thinlet thinlet,
                          java.lang.Object pieChart)
This method handles a button, which is responsible for showing pie charts on the worldmap.

Parameters:
thinlet: - The Thinlet instance.
worldMap: - The instance of the PieCharts class which is responsible for visualization.

exit

public void exit()
Quits the application