com.mindtree.techworks.insight.gui
Interface Presentation

All Known Implementing Classes:
EventDetailsPresentation, EventListPresentation

public interface Presentation

The Presentation interface defines the behavior common to all GUI component blocks that exist in the log viewer. The methods defined in this interface are typically call back methods invoked by the Controller at appropriate instance of time. Implementations of this interface neednot necessarily be GUI components themselves and can actually be wrappers if need be.

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

Method Summary
 void displayPage(IPage page, long eventSequenceNumber)
          Informs this Presentation ot display the specified page and highlight the LogEvent with the specified sequence number.
 boolean doesProcessRealTimeUpdates()
          Determines if this Presentation updates its GUI representation when new events occur.
 java.lang.String getUID()
          Gets the UID for this Presentation.
 javax.swing.JComponent getViewComponent()
          Gets the component that represents the GUI of this Presentation
 void notifyWidgetStateChange(Presentation presentation, int identifier, java.lang.Object data)
          Notifies this Presentation that a widget has changed in the specified Presentation for which this Presentation had registered for widget change updates.
 void processRealTimeUpdate(LogEvent event)
          Informs this Presentation that a new real time event has occurred.
 void resetWidgets()
          Informs this Presentation to reset all display widgets
 void setScrollLock(boolean status)
          Sets the status of the scroll lock for this Presentation.
 

Method Detail

getUID

java.lang.String getUID()
Gets the UID for this Presentation. May be the fully qualified class name of the implementation class.

Returns:
the UID that identifies this Presentation among other instances of the same type

notifyWidgetStateChange

void notifyWidgetStateChange(Presentation presentation,
                             int identifier,
                             java.lang.Object data)
Notifies this Presentation that a widget has changed in the specified Presentation for which this Presentation had registered for widget change updates.

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

getViewComponent

javax.swing.JComponent getViewComponent()
Gets the component that represents the GUI of this Presentation

Returns:
the JComponent instance that denotes the view of this Presentation

doesProcessRealTimeUpdates

boolean doesProcessRealTimeUpdates()
Determines if this Presentation updates its GUI representation when new events occur. Primarily of use to implementations that can update their display when new events occur

Returns:
true if this Presentation supports real time updates, false otherwise

processRealTimeUpdate

void processRealTimeUpdate(LogEvent event)
Informs this Presentation that a new real time event has occurred. This method is called only when #doesProcessRealTimeUpdates() returns true.

Parameters:
event - the real time event that was received

resetWidgets

void resetWidgets()
Informs this Presentation to reset all display widgets


displayPage

void displayPage(IPage page,
                 long eventSequenceNumber)
Informs this Presentation ot display the specified page and highlight the LogEvent with the specified sequence number.

Parameters:
page - the IPage to display
eventSequenceNumber - -1 or the valid sequence number of the LogEvent to be highlighted

setScrollLock

void setScrollLock(boolean status)
Sets the status of the scroll lock for this Presentation.

Parameters:
lock - boolean true for scroll lock, false otherwise


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