Package Pmv :: Module displayCommands :: Class DisplayCommand
[hide private]
[frames] | no frames]

Class DisplayCommand

source code

 ViewerFramework.VFCommand.Command --+    
                                     |    
                   mvCommand.MVCommand --+
                                         |
ViewerFramework.VFCommand.ICOM --+       |
                                 |       |
                  mvCommand.MVICOM --+   |
                                     |   |
                  mvCommand.MVAtomICOM --+
                                         |
                                        DisplayCommand
Known Subclasses:
traceCommands.DisplayTraceCommand, DisplaySticksAndBalls, DisplayBoundGeom, DisplayCPK, DisplayCPKByProperty, DisplayLines, UndisplayBackboneTrace, UndisplayCPK, UndisplayLines, UndisplaySticksAndBalls, sdCommands.DisplayMolIndexedPolygons, msmsCommands.DisplayBuriedTriangles, msmsCommands.DisplayIntermolecularBuriedTriangles, msmsCommands.DisplayMSMS, msmsCommands.UndisplayMSMS, secondaryStructureCommands.DisplayExtrudedSSCommand, secondaryStructureCommands.UndisplayExtrudedSSCommand, splineCommands.DisplayExtrudedSplineCommand, splineCommands.DisplaySplineAsLineCommand, splineCommands.UndisplayExtrudedSplineCommand, splineCommands.UndisplaySplineAsLineCommand

The DisplayCommand class is the base class from which all the display commands implemented for PMV will derive.It implements the general functionalities to display/undisplay parts of a geometry representing a molecule.

Package : Pmv

Module : displayCommands

Class : DisplayCommand

Instance Methods [hide private]
  __init__(self, func=None)
  setLastUsedValues(self, formName=None, **kw)
Special handling of display widget based on values of only and negate in self.lastUsedValues
  handleNegateOnly(self)
return the values to be used for the display widget based on the negate and only values in self.lastUsedValues
  getLastUsedValues(self, formName='default', **kw)
Return dictionary of last used values
  handleDisplayValue(self, val)
  onAddCmdToViewer(self)
method called when an instance of this command is added to the viewer.
  updateGeom(self, event)
Function to update geometry objects created by this command upon Modification events.
  getNodes(self, nodes)
expand nodes argument into a list of atoms sets and a list of molecules.
  buildFormDescr(self, formName='default', title=None)
descr <- buildFormDescr(self, formName): this virtual method is implemented in the classes derived from Command.
  getFormValues(self)
  guiCallback(self)
Default callback function called by the gui

Inherited from mvCommand.MVCommand: strArg

Inherited from mvCommand.MVCommand (private): _strArg

Inherited from ViewerFramework.VFCommand.Command: __call__, __repr__, addCallbackAfter, addCallbackBefore, addUndoCall, afterDoit, beforeDoit, buildLogArgList, checkDependencies, cleanup, customizeGUI, doit, doitWrapper, getArguments, getHelp, getLogArgs, getValNamedArgs, log, logString, onAddNewCmd, onCmdRun, setupUndoAfter, setupUndoBefore, showForm, tkCb, warningMsg

Inherited from mvCommand.MVAtomICOM: getObjects

Inherited from ViewerFramework.VFCommand.ICOM: initICOM, startICOM, stopICOM


Class Variables [hide private]

Inherited from ViewerFramework.VFCommand.Command: negateKw, objArgOnly


Method Details [hide private]

__init__(self, func=None)
(Constructor)

source code 
None
Overrides: mvCommand.MVCommand.__init__

setLastUsedValues(self, formName=None, **kw)

source code 
Special handling of display widget based on values of only and negate in self.lastUsedValues
Overrides: ViewerFramework.VFCommand.Command.setLastUsedValues

handleNegateOnly(self)

source code 
return the values to be used for the display widget based on the negate and only values in self.lastUsedValues

getLastUsedValues(self, formName='default', **kw)

source code 
Return dictionary of last used values
Overrides: ViewerFramework.VFCommand.Command.getLastUsedValues

handleDisplayValue(self, val)

source code 
None

onAddCmdToViewer(self)

source code 
method called when an instance of this command is added to the viewer. This enable viewer-addition time initializations
Overrides: ViewerFramework.VFCommand.Command.onAddCmdToViewer
(inherited documentation)

updateGeom(self, event)

source code 

Function to update geometry objects created by this command upon Modification events. This function is called by the the ViewerFramework.dispatchEvent command. The function will compute the a set of atoms by combining the atoms currently used to display the geometry (i.e. adding or substracting event.objects for action =='add' or 'delete', then execute this command for the set of atoms.

event --- instance of a VFEvent object
Overrides: ViewerFramework.VFCommand.Command.updateGeom

getNodes(self, nodes)

source code 

expand nodes argument into a list of atoms sets and a list of molecules.

This function is used to prevent the expansion operation to be done in both doit and setupUndoBefore The nodes.findType( Atom ) is the operation that is potentially expensive.

buildFormDescr(self, formName='default', title=None)

source code 
descr <- buildFormDescr(self, formName): this virtual method is implemented in the classes derived from Command. This is where the inputFormDescr is created and the description of the widgets appended. If a command has several inputForm buildFormDescr should build all the inputFormDescr and you do a if / elif check to know which one to create. formName : string name of the form corresponding to this descr.
Overrides: ViewerFramework.VFCommand.Command.buildFormDescr
(inherited documentation)

getFormValues(self)

source code 
None

guiCallback(self)

source code 
Default callback function called by the gui
Overrides: mvCommand.MVCommand.guiCallback