org.gudy.azureus2.ui.swt.progress
Class ProgressReporterPanel

java.lang.Object
  extended by org.eclipse.swt.widgets.Widget
      extended by org.eclipse.swt.widgets.Control
          extended by org.eclipse.swt.widgets.Scrollable
              extended by org.eclipse.swt.widgets.Composite
                  extended by org.gudy.azureus2.ui.swt.progress.ProgressReporterPanel
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable, IProgressReportConstants, IProgressReporterListener

public class ProgressReporterPanel
extends org.eclipse.swt.widgets.Composite
implements IProgressReportConstants, IProgressReporterListener

Author:
knguyen

Field Summary
 IProgressReporter pReporter
           
 
Fields inherited from class org.eclipse.swt.widgets.Control
view
 
Fields inherited from interface org.gudy.azureus2.ui.swt.progress.IProgressReportConstants
AUTO_CLOSE, BORDER, MANAGER_EVENT_ADDED, MANAGER_EVENT_REMOVED, MANAGER_EVENT_UPDATED, MODAL, MSG_TYPE_ERROR, MSG_TYPE_INFO, MSG_TYPE_LOG, NONE, REPORT_TYPE_CANCEL, REPORT_TYPE_DISPOSED, REPORT_TYPE_DONE, REPORT_TYPE_ERROR, REPORT_TYPE_INIT, REPORT_TYPE_MODE_CHANGE, REPORT_TYPE_PROPERTY_CHANGED, REPORT_TYPE_RETRY, REPORTER_TYPE_DEFAULT, REPORTER_VISIBILITY_SYSTEM, REPORTER_VISIBILITY_USER, RETVAL_OK, RETVAL_OK_TO_DISPOSE, SHOW_TOOLBAR, STANDALONE
 
Constructor Summary
ProgressReporterPanel(org.eclipse.swt.widgets.Composite parent, IProgressReporter reporter, int style)
          Create a panel for the given reporter.
 
Method Summary
 void addTwistieListener(ITwistieListener listener)
           
 org.eclipse.swt.graphics.Point computeSize(int hint, int hint2, boolean changed)
           
 IProgressReporter getProgressReporter()
          Returns the attached reporter
 int getStyle()
           
 void removeTwistieListener(ITwistieListener listener)
           
 int report(IProgressReport pReport)
          Call-back method from IProgressReporterListener; this method is called when ever the reporter dispatches an event
 void resizeContent()
          Resizes the content of this panel to fit within the shell and to layout children control appropriately
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pReporter

public IProgressReporter pReporter
Constructor Detail

ProgressReporterPanel

public ProgressReporterPanel(org.eclipse.swt.widgets.Composite parent,
                             IProgressReporter reporter,
                             int style)
Create a panel for the given reporter. style could be one or more of these:

Parameters:
parent - the Composite hosting the panel
reporter - the IProgressReporter to host
style - one of the style bits listed above
Method Detail

report

public int report(IProgressReport pReport)
Call-back method from IProgressReporterListener; this method is called when ever the reporter dispatches an event

Specified by:
report in interface IProgressReporterListener
Returns:

computeSize

public org.eclipse.swt.graphics.Point computeSize(int hint,
                                                  int hint2,
                                                  boolean changed)
Overrides:
computeSize in class org.eclipse.swt.widgets.Composite

resizeContent

public void resizeContent()
Resizes the content of this panel to fit within the shell and to layout children control appropriately


addTwistieListener

public void addTwistieListener(ITwistieListener listener)

removeTwistieListener

public void removeTwistieListener(ITwistieListener listener)

getProgressReporter

public IProgressReporter getProgressReporter()
Returns the attached reporter

Returns:

getStyle

public int getStyle()
Overrides:
getStyle in class org.eclipse.swt.widgets.Widget