org.globus.cog.gridface.impl.gftpanel
Class GridFTPPanelImpl

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byorg.globus.cog.gridface.impl.gftpanel.GridFTPPanelImpl
All Implemented Interfaces:
Accessible, ActionListener, EventListener, GridFace, GridFTPPanel, ImageObserver, MenuContainer, MouseListener, Serializable

public class GridFTPPanelImpl
extends JPanel
implements ActionListener, MouseListener, GridFTPPanel

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  float avgRate
           
protected  JTextField avgRateField
           
protected  JMenuItem cancelMI
           
protected  JButton clearButton
           
protected  JTextField destinationField
           
protected  JTextField destinationFilenameField
           
protected  JTextField destinationPortField
           
protected  JLabel destLabel
           
protected  String label
           
protected  Date lastUpdateTime
           
 TransferTableModel model
           
protected  String name
           
protected  int numTransfers
           
protected  JTextField numTransfersField
           
protected  JPanel panel
           
protected  JPopupMenu popupMenu
           
protected  JMenuItem removeMI
           
protected  JTextField repeatField
           
protected  JTextField sleepField
           
protected  JTextField sourceField
           
protected  JTextField sourceFilenameField
           
protected  JLabel sourceLabel
           
protected  JTextField sourcePortField
           
protected  JButton startButton
           
protected  JCheckBox statsCheckBox
           
 JTable table
           
protected  long totalBytes
           
protected  JTextField totalBytesField
           
 String transferFile
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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
GridFTPPanelImpl()
           
GridFTPPanelImpl(String sourceName, String sourcePort, String sourceFile, String destinationName, String destinationPort, String destinationFile)
           
 
Method Summary
 void actionPerformed(ActionEvent ae)
           
 void error(String description, String error)
           
 Date lastUpdateTime()
          Records the last time the GridFace was updated.
 void loadTransfers()
           
static void main(String[] args)
           
 void mouseClicked(MouseEvent me)
           
 void mouseEntered(MouseEvent me)
           
 void mouseExited(MouseEvent me)
           
 void mousePressed(MouseEvent me)
           
 void mouseReleased(MouseEvent me)
           
 void register(GridFace connection)
          Registers another GridFace to this GridFace.
 void saveTransfers()
           
 void setLabel(String label)
          sets a label for a GridFace.
 void setName(String name)
          sets the name for a GridFace.
protected  void setupButtonPanel()
           
protected  void setupDestinationPanel()
           
protected  void setupMenus()
           
protected  void setupNumberPanel()
           
protected  void setupSourcePanel()
           
protected  void setupTable()
           
 void transferFinished(long size, float rate)
           
 void update()
          updates the displaed gridface.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

table

public JTable table

model

public TransferTableModel model

transferFile

public String transferFile

totalBytesField

protected JTextField totalBytesField

avgRateField

protected JTextField avgRateField

numTransfersField

protected JTextField numTransfersField

avgRate

protected float avgRate

totalBytes

protected long totalBytes

numTransfers

protected int numTransfers

clearButton

protected JButton clearButton

startButton

protected JButton startButton

statsCheckBox

protected JCheckBox statsCheckBox

destLabel

protected JLabel destLabel

sourceLabel

protected JLabel sourceLabel

cancelMI

protected JMenuItem cancelMI

removeMI

protected JMenuItem removeMI

panel

protected JPanel panel

popupMenu

protected JPopupMenu popupMenu

destinationField

protected JTextField destinationField

destinationFilenameField

protected JTextField destinationFilenameField

destinationPortField

protected JTextField destinationPortField

repeatField

protected JTextField repeatField

sleepField

protected JTextField sleepField

sourceField

protected JTextField sourceField

sourceFilenameField

protected JTextField sourceFilenameField

sourcePortField

protected JTextField sourcePortField

lastUpdateTime

protected Date lastUpdateTime

name

protected String name

label

protected String label
Constructor Detail

GridFTPPanelImpl

public GridFTPPanelImpl(String sourceName,
                        String sourcePort,
                        String sourceFile,
                        String destinationName,
                        String destinationPort,
                        String destinationFile)

GridFTPPanelImpl

public GridFTPPanelImpl()
Method Detail

main

public static void main(String[] args)

transferFinished

public void transferFinished(long size,
                             float rate)
Specified by:
transferFinished in interface GridFTPPanel

setupTable

protected void setupTable()

setupMenus

protected void setupMenus()

setupNumberPanel

protected void setupNumberPanel()

setupButtonPanel

protected void setupButtonPanel()

setupSourcePanel

protected void setupSourcePanel()

setupDestinationPanel

protected void setupDestinationPanel()

actionPerformed

public void actionPerformed(ActionEvent ae)
Specified by:
actionPerformed in interface ActionListener

error

public void error(String description,
                  String error)
Specified by:
error in interface GridFTPPanel

mouseClicked

public void mouseClicked(MouseEvent me)
Specified by:
mouseClicked in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent me)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent me)
Specified by:
mouseExited in interface MouseListener

mousePressed

public void mousePressed(MouseEvent me)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent me)
Specified by:
mouseReleased in interface MouseListener

loadTransfers

public void loadTransfers()
Specified by:
loadTransfers in interface GridFTPPanel

saveTransfers

public void saveTransfers()
Specified by:
saveTransfers in interface GridFTPPanel

update

public void update()
Description copied from interface: GridFace
updates the displaed gridface.

Specified by:
update in interface GridFace

lastUpdateTime

public Date lastUpdateTime()
Description copied from interface: GridFace
Records the last time the GridFace was updated. The default value is the time of creation.

Specified by:
lastUpdateTime in interface GridFace
Returns:
Date, the last time when the GridFace was updated.

setName

public void setName(String name)
Description copied from interface: GridFace
sets the name for a GridFace. Names are useful to distinguish gridfaces from each other. A Name is supposed to be unique. Default is null.

Specified by:
setName in interface GridFace

setLabel

public void setLabel(String label)
Description copied from interface: GridFace
sets a label for a GridFace. Label are useful to create abbreviations for a GridFace for a graphical display. Labels are ofthe used as a title if applicable. Defaukt is null.

Specified by:
setLabel in interface GridFace
Parameters:
label - a String that returns the assigned label.

register

public void register(GridFace connection)
Description copied from interface: GridFace
Registers another GridFace to this GridFace. This will prevent that gridfaces are unnecesarily killed.

Specified by:
register in interface GridFace
Parameters:
connection - a GridFace value