CMS 3D CMS Logo

List of all members | Public Member Functions
progressbar.BouncingBar Class Reference
Inheritance diagram for progressbar.BouncingBar:
progressbar.Bar progressbar.WidgetHFill progressbar.Widget

Public Member Functions

def update (self, pbar, width)
 
- Public Member Functions inherited from progressbar.Bar
def __init__ (self, marker='#', left='|', right='|', fill=' ', fill_left=True)
 
def update (self, pbar, width)
 
- Public Member Functions inherited from progressbar.WidgetHFill
def update (self, pbar, width)
 
- Public Member Functions inherited from progressbar.Widget
def update (self, pbar)
 

Additional Inherited Members

- Public Attributes inherited from progressbar.Bar
 fill
 
 fill_left
 
 left
 
 marker
 
 right
 
- Static Public Attributes inherited from progressbar.Widget
 TIME_SENSITIVE
 

Detailed Description

Definition at line 111 of file progressbar.py.

Member Function Documentation

def progressbar.BouncingBar.update (   self,
  pbar,
  width 
)

Definition at line 112 of file progressbar.py.

References progressbar.Bar.fill, progressbar.Bar.fill_left, progressbar.format_updatable(), createfilelist.int, ShallowClustersProducer::NearDigis.left, JME::bimap< T, U >.left, KDTreeNodeT< DATA, DIM >.left, BinaryOP.left, progressbar.Bar.left, progressbar.Bar.marker, HCAL_HLX::LUMI_RAW_HEADER.marker, ShallowClustersProducer::NearDigis.right, KDTreeNodes< DATA >.right, JME::bimap< T, U >.right, KDTreeNodeT< DATA, DIM >.right, BinaryOP.right, progressbar.Bar.right, svgfig.Curve.Sample.right, and svgfig.Curve.Samples.right.

Referenced by progressbar.ProgressBar.__next__(), MatrixUtil.Matrix.__setitem__(), MatrixUtil.Steps.__setitem__(), Vispa.Gui.VispaWidget.VispaWidget.autosize(), Vispa.Views.LineDecayView.LineDecayContainer.createObject(), Vispa.Views.LineDecayView.LineDecayContainer.deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget.enableAutosizing(), progressbar.ProgressBar.finish(), Vispa.Gui.MenuWidget.MenuWidget.leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget.mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer.mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer.objectMoved(), MatrixUtil.Steps.overwrite(), Vispa.Views.LineDecayView.LineDecayContainer.removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget.removePorts(), Vispa.Gui.FindDialog.FindDialog.reset(), Vispa.Gui.PortConnection.PointToPointConnection.select(), Vispa.Gui.VispaWidget.VispaWidget.select(), Vispa.Views.LineDecayView.LineDecayContainer.select(), Vispa.Gui.VispaWidget.VispaWidget.setText(), Vispa.Gui.VispaWidget.VispaWidget.setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget.setZoom(), Vispa.Views.LineDecayView.LineDecayContainer.setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection.updateConnection().

112  def update(self, pbar, width):
113  'Updates the progress bar and its subcomponents'
114 
115  left, marker, right = (format_updatable(i, pbar) for i in
116  (self.left, self.marker, self.right))
117 
118  width -= len(left) + len(right)
119 
120  if pbar.finished: return '%s%s%s' % (left, width * marker, right)
121 
122  position = int(pbar.currval % (width * 2 - 1))
123  if position > width: position = width * 2 - position
124  lpad = self.fill * (position - 1)
125  rpad = self.fill * (width - len(marker) - len(lpad))
126 
127  # Swap if we want to bounce the other way
128  if not self.fill_left: rpad, lpad = lpad, rpad
129 
130  return '%s%s%s%s%s' % (left, lpad, marker, rpad, right)
131 
def update(self, pbar, width)
Definition: progressbar.py:112
def format_updatable(updatable, pbar)
Definition: progressbar.py:411