com.mindtree.techworks.insight.gui
Class EventListPresentation

java.lang.Object
  extended by com.mindtree.techworks.insight.gui.EventListPresentation
All Implemented Interfaces:
IAction, Presentation, PreferenceChangeListener, java.util.EventListener, javax.swing.event.ListSelectionListener

public class EventListPresentation
extends java.lang.Object
implements Presentation, javax.swing.event.ListSelectionListener, IAction, PreferenceChangeListener

The EventListPresentation class is a Presentation implementation that displays summary information of LoggingEvent instances received by this Presentation. This Presentation contains a JTable that displays the summary - one row per event.

Version:
1.0, 04/10/25
Author:
Regunath B
See Also:
Presentation, LoggingEvent

Field Summary
 
Fields inherited from interface com.mindtree.techworks.insight.gui.action.IAction
ALL, MUTATION, MUTUAL_EXCLUSION_TYPES, NO_CONSTRAINTS, NONE, STARTUP, TAIL, VIEW
 
Constructor Summary
EventListPresentation(Controller controller)
          Constructor for this class
 
Method Summary
 void displayPage(IPage page, long eventSequenceNumber)
          Interface method implementation
 boolean doesProcessRealTimeUpdates()
          Presentation interface method implementation.
 int getType()
          IAction interface method implementation
 java.lang.String getUID()
          Presentation interface method implementation.
 javax.swing.JComponent getViewComponent()
          Presentation interface method implementation.
 void notifyWidgetStateChange(Presentation presentation, int identifier, java.lang.Object data)
          Presentation interface method implementation.
 void preferenceChanged(java.lang.String preferenceId)
          PreferenceChangeListener interface method implementation
 void processRealTimeUpdate(LogEvent event)
          Presentation interface method implementation.Adds the event to the AbstractTableModel instance that backs the JTable instance contained in this Presentation.
 void resetWidgets()
          Interface methid implementation
 void setEnabled(boolean enable)
          IAction interface method implementation
 void setScrollLock(boolean scrollLock)
          Presentation Interface method implementation
 void valueChanged(javax.swing.event.ListSelectionEvent event)
          ListSelectionListener interface method implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventListPresentation

public EventListPresentation(Controller controller)
Constructor for this class

Parameters:
controller - the Controller instance for this Presentation
Method Detail

getUID

public java.lang.String getUID()
Presentation interface method implementation. Returns the fully qualified class name of this Presentation

Specified by:
getUID in interface Presentation
Returns:
the UID that identifies this Presentation among other instances of the same type
See Also:
Presentation.getUID()

notifyWidgetStateChange

public void notifyWidgetStateChange(Presentation presentation,
                                    int identifier,
                                    java.lang.Object data)
Presentation interface method implementation. Does nothing

Specified by:
notifyWidgetStateChange in interface Presentation
Parameters:
presentation - the Presentation containing the widget
identifier - unique identifier of the widget in the Presentation
data - null or the information returned by the source Presentation containing data in the context of the widget change
See Also:
Presentation.notifyWidgetStateChange(com.mindtree.techworks.insight.gui.Presentation, int, java.lang.Object)

getViewComponent

public javax.swing.JComponent getViewComponent()
Presentation interface method implementation. Returns the contained JScrollPane instance

Specified by:
getViewComponent in interface Presentation
Returns:
the JComponent instance that denotes the view of this Presentation
See Also:
Presentation.getViewComponent()

doesProcessRealTimeUpdates

public boolean doesProcessRealTimeUpdates()
Presentation interface method implementation. Returns true.

Specified by:
doesProcessRealTimeUpdates in interface Presentation
Returns:
true if this Presentation supports real time updates, false otherwise
See Also:
Presentation.doesProcessRealTimeUpdates()

processRealTimeUpdate

public void processRealTimeUpdate(LogEvent event)
Presentation interface method implementation.Adds the event to the AbstractTableModel instance that backs the JTable instance contained in this Presentation.

Specified by:
processRealTimeUpdate in interface Presentation
Parameters:
event - the real time event that was received
See Also:
Presentation.processRealTimeUpdate(com.mindtree.techworks.insight.spi.LogEvent)

resetWidgets

public void resetWidgets()
Interface methid implementation

Specified by:
resetWidgets in interface Presentation
See Also:
Presentation.resetWidgets()

valueChanged

public void valueChanged(javax.swing.event.ListSelectionEvent event)
ListSelectionListener interface method implementation. Gets the selected LoggingEvent and informs the Controller of a widget change. Note that the data Object passed by this Presentation is of type org.apache.log4j.spi.LoggingEvent

Specified by:
valueChanged in interface javax.swing.event.ListSelectionListener
See Also:
ListSelectionListener.valueChanged(javax.swing.event.ListSelectionEvent), LoggingEvent

displayPage

public void displayPage(IPage page,
                        long eventSequenceNumber)
Interface method implementation

Specified by:
displayPage in interface Presentation
Parameters:
page - the IPage to display
eventSequenceNumber - -1 or the valid sequence number of the LogEvent to be highlighted
See Also:
Presentation.displayPage(IPage, long)

getType

public int getType()
IAction interface method implementation

Specified by:
getType in interface IAction
Returns:
valid type defined in this interface
See Also:
IAction.getType()

setEnabled

public void setEnabled(boolean enable)
IAction interface method implementation

Specified by:
setEnabled in interface IAction
See Also:
IAction.setEnabled(boolean)

preferenceChanged

public void preferenceChanged(java.lang.String preferenceId)
PreferenceChangeListener interface method implementation

Specified by:
preferenceChanged in interface PreferenceChangeListener
See Also:
PreferenceChangeListener.preferenceChanged(java.lang.String)

setScrollLock

public void setScrollLock(boolean scrollLock)
Presentation Interface method implementation

Specified by:
setScrollLock in interface Presentation
See Also:
Presentation.setScrollLock(boolean)


Copyright © 2003-2008 MindTree Consulting Ltd.. All Rights Reserved.