com.mindtree.techworks.insight.gui
Class EventDetailsPresentation

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.mindtree.techworks.insight.gui.EventDetailsPresentation
All Implemented Interfaces:
Presentation, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class EventDetailsPresentation
extends javax.swing.JPanel
implements Presentation

The EventDetailsPresentation class is a Presentation implementation that displays details of one LoggingEvent at a time. Uses a JEditorPane to display the results.

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

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
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, PROPERTIES, SOMEBITS
 
Constructor Summary
EventDetailsPresentation(Controller controller)
          Constructor for this class
 
Method Summary
 void displayPage(IPage page, long eventSequenceNumber)
          Interface method implementation
 boolean doesProcessRealTimeUpdates()
          Presentation interface method implementation.
 Controller getController()
           
 LogEvent getEvent()
           
 java.lang.String getUID()
          Presentation interface method implementation.
 javax.swing.JComponent getViewComponent()
          Presentation interface method implementation.
 boolean highlightText(java.lang.String searchText, int searchType)
          Highlights text in the event details display that match the specified search text specified limited to the specified log event attributes
 void notifyWidgetStateChange(Presentation presentation, int identifier, java.lang.Object data)
          Presentation interface method implementation.
 void processRealTimeUpdate(LogEvent logEvent)
          Presentation interface method implementation.
 void resetWidgets()
          Interface method implementation
 void setScrollLock(boolean status)
          Presentation Interface method implementation
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, 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
 

Constructor Detail

EventDetailsPresentation

public EventDetailsPresentation(Controller controller)
Constructor for this class

Parameters:
controller - the Controller 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. Renders the display with the specified data. Type-casts the Object data as a org.apache.log4j.spi.LoggingEvent and renders its details.

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 this Presentation.

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 false.

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 logEvent)
Presentation interface method implementation. Does nothing.

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

resetWidgets

public void resetWidgets()
Interface method implementation

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

highlightText

public boolean highlightText(java.lang.String searchText,
                             int searchType)
Highlights text in the event details display that match the specified search text specified limited to the specified log event attributes

Parameters:
searchText - the text to search for
searchType - the search type. See SearchCriteria for type definitions
Returns:
true if atleast one macth is found, false otherwise
See Also:
SearchCriteria

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)

getController

public Controller getController()
Returns:
Returns the controller.

getEvent

public LogEvent getEvent()
Returns:
Returns the event.

setScrollLock

public void setScrollLock(boolean status)
Presentation Interface method implementation

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


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