objects.gui.displayer.applicationEntityDisplayer.applicationEntityDisplayer Class Reference

The applicationEntityDisplayer is a specialized class which knows how to set additional drawing attributes for a given entity. More...

Inherits objects::gui::displayer::entityDisplayer::entityDisplayer.

List of all members.

Public Member Functions

def setDisplayConfigurator
 Sets the display Configurator object.
def getAttrFromEntity
 Returns a Dictionary of attributes given a networkEntity object.
def getAttrFromList
 Returns a hash of attributes given a list of networkEntity objects This is necessary because sometimes Endpoints can share the same geographical locations.

Public Attributes

 processColorDict
 processDefaultColor


Detailed Description

The applicationEntityDisplayer is a specialized class which knows how to set additional drawing attributes for a given entity.

In particular, this class knows how to assign a color to an Endpoint based on which process is communicating with it The idea was that EyeSpy would have different perspectives, (i.e. a link layer perspective, a security perspective, etc.) which would color Endpoints in different ways. That features, does not currently exist in EyeSpy.

Definition at line 22 of file applicationEntityDisplayer.py.


Member Function Documentation

def objects.gui.displayer.applicationEntityDisplayer.applicationEntityDisplayer.getAttrFromEntity (   self,
  networkEntity 
)

Returns a Dictionary of attributes given a networkEntity object.

Parameters:
networkEntity networkEntity object (object representing an Endpoint)
Returns:
Dictionary of attributes

Definition at line 36 of file applicationEntityDisplayer.py.

00036                                               :
00037         displayAttributes = entityDisplayer.getAttributesFromEntity(self,networkEntity)
00038         
00039         netEntProcName = networkEntity.processName.lower()
00040         
00041         if self.processColorDict.has_key(netEntProcName):
00042             displayAttributes['markerColor'] = self.processColorDict[netEntProcName]
00043         else:
00044             displayAttributes['markerColor'] = self.processDefaultColor
00045         
00046         return displayAttributes
00047         
00048         # now deal with color coding
00049 
00050 
    ## Returns a hash of attributes given a list of networkEntity objects

def objects.gui.displayer.applicationEntityDisplayer.applicationEntityDisplayer.getAttrFromList (   self,
  entityList 
)

Returns a hash of attributes given a list of networkEntity objects This is necessary because sometimes Endpoints can share the same geographical locations.

Parameters:
entityList list of networkEntity objects (object representing an Endpoint)
Returns:
Dictionary of attributes

Definition at line 55 of file applicationEntityDisplayer.py.

00055                                          :
00056         displayAttributes = entityDisplayer.getAttributesFromList(self,entityList)
00057         
00058         displayAttributes['markerColor'] = "#000000"
00059         
00060         return displayAttributes
00061         
00062         # applications specific attributes
        # applications specific attributes

def objects.gui.displayer.applicationEntityDisplayer.applicationEntityDisplayer.setDisplayConfigurator (   self,
  dispConfigurator 
)

Sets the display Configurator object.

Parameters:
dispConfigurator Configurator object used to determine how to set attributes.

Reimplemented from objects.gui.displayer.entityDisplayer.entityDisplayer.

Definition at line 26 of file applicationEntityDisplayer.py.

00026                                                       :
00027         entityDisplayer.setDisplayConfigurator(self, dispConfigurator)
00028         
00029         self.processColorDict     = self.dispConfig.app_getProcessColorCodesDict()
00030         self.processDefaultColor  = self.dispConfig.app_getProcessDefaultColor()
00031     
00032     
    ## Returns a Dictionary of attributes given a networkEntity object


Member Data Documentation

Definition at line 29 of file applicationEntityDisplayer.py.

Definition at line 30 of file applicationEntityDisplayer.py.


The documentation for this class was generated from the following file:

Generated on Mon Mar 30 00:26:15 2009 for EyeSpy by  doxygen 1.5.8