clickDetector.offlineFuncs
Class OfflineEventListPanel

java.lang.Object
  extended by clickDetector.offlineFuncs.OfflineEventListPanel

public class OfflineEventListPanel
extends java.lang.Object

List of offline events which can be included in various dialogs associated with offline event creation and management.

Author:
Doug Gillespie

Nested Class Summary
(package private)  class OfflineEventListPanel.EventTableModel
           
private  class OfflineEventListPanel.ShowSelectionChanged
           
 
Field Summary
private  ClickControl clickControl
           
private  java.lang.String[] colNames
           
private  javax.swing.JTable eventTable
           
private  OfflineEventListPanel.EventTableModel eventTableModel
           
private  javax.swing.JPanel mainPanel
           
private  OfflineEventDataBlock offlineEventDataBlock
           
private  javax.swing.JPanel selectionPanel
           
static int SHOW_ALL
          show all events
static int SHOW_SELECTION
          Show only those events which overlap the current loaded click data.
private  javax.swing.JRadioButton showAll
           
private  javax.swing.JRadioButton showCurrent
           
 
Constructor Summary
OfflineEventListPanel(ClickControl clickControl)
           
 
Method Summary
 void addListSelectionListener(javax.swing.event.ListSelectionListener listSelectionListener)
           
 void addMouseListener(java.awt.event.MouseListener mouseListener)
           
private  int findEventRow(OfflineEventDataUnit event)
          Finds the row for a specific event.
 javax.swing.JPanel getPanel()
           
 OfflineEventDataUnit getSelectedEvent()
           
 javax.swing.JPanel getSelectionPanel()
          Get a smaller panel of buttons allowing user to select a sub set of data.
 int getShowSelection()
           
private  void makeMainPanel()
           
private  void makeSelectionPanel()
           
 void selectData()
          Called when the show selection has changed.
 void setSelectedEvent(OfflineEventDataUnit selectedEvent)
           
 void setShowSelection(int showSelection)
           
 void tableDataChanged()
          Call when an event has been added or removed in order to update the table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mainPanel

private javax.swing.JPanel mainPanel

selectionPanel

private javax.swing.JPanel selectionPanel

clickControl

private ClickControl clickControl

offlineEventDataBlock

private OfflineEventDataBlock offlineEventDataBlock

colNames

private java.lang.String[] colNames

eventTable

private javax.swing.JTable eventTable

eventTableModel

private OfflineEventListPanel.EventTableModel eventTableModel

showAll

private javax.swing.JRadioButton showAll

showCurrent

private javax.swing.JRadioButton showCurrent

SHOW_ALL

public static final int SHOW_ALL
show all events

See Also:
Constant Field Values

SHOW_SELECTION

public static final int SHOW_SELECTION
Show only those events which overlap the current loaded click data.

See Also:
Constant Field Values
Constructor Detail

OfflineEventListPanel

public OfflineEventListPanel(ClickControl clickControl)
Method Detail

makeSelectionPanel

private void makeSelectionPanel()

getShowSelection

public int getShowSelection()

setShowSelection

public void setShowSelection(int showSelection)

selectData

public void selectData()
Called when the show selection has changed.


makeMainPanel

private void makeMainPanel()

tableDataChanged

public void tableDataChanged()
Call when an event has been added or removed in order to update the table.


getPanel

public javax.swing.JPanel getPanel()
Returns:
the mainPanel

getSelectionPanel

public javax.swing.JPanel getSelectionPanel()
Get a smaller panel of buttons allowing user to select a sub set of data.

Returns:
small panel.

addMouseListener

public void addMouseListener(java.awt.event.MouseListener mouseListener)

addListSelectionListener

public void addListSelectionListener(javax.swing.event.ListSelectionListener listSelectionListener)

setSelectedEvent

public void setSelectedEvent(OfflineEventDataUnit selectedEvent)

findEventRow

private int findEventRow(OfflineEventDataUnit event)
Finds the row for a specific event.

Parameters:
event - event to find
Returns:
row number, or -1 if event not found

getSelectedEvent

public OfflineEventDataUnit getSelectedEvent()
Returns:
the event for the currently selected row, or null if nothing selected