|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindtree.techworks.insight.Controller
public class Controller
The Controller
class is the Mediator between the various Presentation
instances in the GUI. It also acts as the bridge between the GUI components
and the control and model components such as the Appender implementation(s).
All Presentation instances must register with this Controller using
#regsiterPresentation(Presentation presentation)
Presentation
Constructor Summary | |
---|---|
Controller(Insight insight)
Constructor for this class |
Method Summary | |
---|---|
void |
actionPerformed(int actionType)
Informs this Controller that an action of the specified type has been performed. |
void |
clearCurrentModel()
Clears the current event model. |
void |
endMutating(int infoFlag)
Call back method using which the controller will be notifed by any LogEventModelMutators ends mutating the LogEventModel |
void |
firePageChanged()
Informs this Controller that the current page has changed. |
void |
firePageChanged(long selectedEventIndex)
Informs this Controller that the current page has changed. |
void |
fireWidgetChanged(Presentation sourcePresentation,
int widgetId,
java.lang.Object data)
Called by registered Presentation instances when widgets in them undergo a change |
LogEventModel |
getCurrentLogEventModel()
|
Insight |
getInsight()
|
int |
getMutatorType()
Returns the type of the active mutator, if any |
Presentation |
getPresentation(java.lang.String className)
Gets the Presentation identified by the specified cllass name |
LogEventModel |
getRootLogEventModel()
|
boolean |
isScrollLock()
Returns the status of the scroll lock |
void |
notifyLogEventOccurred(LogEvent event)
Notifies this Controller that an event was processed by the Appender. |
void |
registerAction(IAction action)
Regsiters the specified IAction with this Controller |
void |
registerPresentation(Presentation presentation)
Regsiters the specified Presentation with this Controller |
void |
registerWidgetChangeListener(Presentation sourcePresentation,
Presentation listener)
Registers the specified listener Presentation for call back when widgets on the source Presentation change. |
void |
resetPresentations()
Notifies this Controller to reset the displays of all registered Presentation implementations. |
void |
setCurrentLogEventModel(LogEventModel logEventModel)
Sets the specified LogEventModel as the current model |
void |
setCurrentLogEventModel(LogEventModel logEventModel,
long pageNumber,
long selectedEventIndex)
Sets the specified LogEventModel as the current model |
void |
setRootLogEventModel(LogEventModel rootLogEventModel)
|
void |
setScrollLock(boolean lock)
Sets the status of the scroll lock. |
void |
setSelectedEvent(long pageNumber,
long selectedEventIndex)
Sets the selection to the indicated log event |
void |
setStatus()
Sets the status display for Insight |
void |
startMutating(int mutatorType)
Call back method using which the controller will be notifed by any LogEventModelMutators starts mutating the LogEventModel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Controller(Insight insight)
insight
- the Insight instance that created this ControllerMethod Detail |
---|
public void registerPresentation(Presentation presentation)
presentation
- the Presentation instance to be registered with this Controllerpublic void registerAction(IAction action)
action
- the IAction instance to be registered with this Controllerpublic Presentation getPresentation(java.lang.String className)
className
- the Class name of the Presentation required
java.lang.RuntimeException
- in case the Presentation is not found or has not been registered yetpublic void registerWidgetChangeListener(Presentation sourcePresentation, Presentation listener)
sourcePresentation
- the source Presentation where the widget change would occurlistener
- the listener Presentation that is interested in widget changes on the sourcepublic void fireWidgetChanged(Presentation sourcePresentation, int widgetId, java.lang.Object data)
sourcePresentation
- the Presentation where the change occurredwidgetId
- unique id that identifies the widget in the Presentationdata
- optional data returned by the Presentation in the context of the widget changepublic void notifyLogEventOccurred(LogEvent event)
event
- data describing the event that was processed by the Appenderpublic void resetPresentations()
public Insight getInsight()
public LogEventModel getCurrentLogEventModel()
public void setCurrentLogEventModel(LogEventModel logEventModel, long pageNumber, long selectedEventIndex)
logEventModel
- The currentLogEventModel to set.pageNumber
- the page number to be loaded as the current pageselectedEventIndex
- the index of the selected LogEventpublic void setSelectedEvent(long pageNumber, long selectedEventIndex)
pageNumber
- the page number to be loaded as the current pageselectedEventIndex
- the index of the selected LogEventpublic void setCurrentLogEventModel(LogEventModel logEventModel)
logEventModel
- The currentLogEventModel to set.public void clearCurrentModel()
public LogEventModel getRootLogEventModel()
public void setRootLogEventModel(LogEventModel rootLogEventModel)
rootLogEventModel
- The rootLogEventModel to set.public void firePageChanged()
public void firePageChanged(long selectedEventIndex)
selectedEventIndex
- the index of the selected LogEventpublic void setStatus()
public void startMutating(int mutatorType)
startMutating
in interface IMutatorListener
mutatorType
- specifies if the mutator this listener is registered with is tailingIMutatorListener#startMutating()
public void endMutating(int infoFlag)
endMutating
in interface IMutatorListener
infoFlag
- flag identifier that denotes the status of the mutate operationIMutatorListener.endMutating(int)
public void actionPerformed(int actionType)
actionType
- the valid action type as defined in IActionIAction
public int getMutatorType()
public void setScrollLock(boolean lock)
lock
- boolean true for scroll lock, false otherwisepublic boolean isScrollLock()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |