anl.aida.client.gui
Class DocOpsWidget

java.lang.Object
  extended by anl.aida.client.gui.DocOpsWidget

public class DocOpsWidget
extends java.lang.Object

A widget for graphically representing operations on a selected set of MIFS documents. Each operation is represented as button. This class will manage the buttons as well as tracking the set of selected documents. The added DocSetOperations will operate on the set of selected documents.


Nested Class Summary
private  class DocOpsWidget.OpAction
           
 
Field Summary
private  java.util.List<javax.swing.JButton> buttons
           
private  java.util.List<anl.aida.core.DocumentID> docs
           
 
Constructor Summary
DocOpsWidget()
           
 
Method Summary
 void addDocument(anl.aida.core.DocumentID doc)
          Adds the specified document to the set of selected documents.
 javax.swing.JButton addOp(DocSetOperation op, java.lang.String iconFile)
          Adds a DocSetOperation.
private  void buttonsEnabled(boolean enabled)
           
 void clearDocuments()
          Clears the set of the selected documents.
 java.lang.Iterable<javax.swing.JButton> getButtons()
          Gets an iterable over the set of buttons managed by this DocOpsWidget.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buttons

private java.util.List<javax.swing.JButton> buttons

docs

private java.util.List<anl.aida.core.DocumentID> docs
Constructor Detail

DocOpsWidget

public DocOpsWidget()
Method Detail

addOp

public javax.swing.JButton addOp(DocSetOperation op,
                                 java.lang.String iconFile)
Adds a DocSetOperation.

Parameters:
op - the operation to add
iconFile - the icon to represent the operation with
Returns:
the created button that will trigger the operation

clearDocuments

public void clearDocuments()
Clears the set of the selected documents.


buttonsEnabled

private void buttonsEnabled(boolean enabled)

getButtons

public java.lang.Iterable<javax.swing.JButton> getButtons()
Gets an iterable over the set of buttons managed by this DocOpsWidget.

Returns:
an iterable over the set of buttons managed by this DocOpsWidget.

addDocument

public void addDocument(anl.aida.core.DocumentID doc)
Adds the specified document to the set of selected documents. Any added DocSetOperations will operate on this document.

Parameters:
doc - the document to add