public class LogView extends View
Modifier and Type | Class and Description |
---|---|
class |
LogView.CallbackHandler |
View.ViewEvents
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
VIEW_ID |
eventSource
Constructor and Description |
---|
LogView() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Tells this
View to release all its resources and
return ownership of the JComponent it was provided with
on the initial call to #init(JComponent) . |
de.ims.icarus.util.id.Identity |
getIdentity() |
static javax.swing.Icon |
getLogIcon(java.util.logging.LogRecord record)
Fetches the
Icon that should be used to present the
given LogRecord . |
protected de.ims.icarus.util.mpi.ResultMessage |
handleRequest(de.ims.icarus.util.mpi.Message message)
Accepted commands:
Commands.CLEAR
|
void |
init(javax.swing.JComponent container)
Tells the
view to layout its visible parts. |
protected void |
refreshInfoPanel(InfoPanel infoPanel)
Called when the
View gets the input focus. |
void |
reset() |
addBroadcastListener, addListener, buildToolBar, defaultLoadActions, fireBroadcastEvent, focusView, getContainer, getDefaultActionManager, getExtension, getFrame, getInfoPanel, getPerspective, isClosable, reloadViewTab, removeBroadcastListener, removeBroadcastListener, removeListener, removeListener, selectViewTab, sendRequest, sendRequest, showError, toggleContainer, toString
public static final java.lang.String VIEW_ID
public static javax.swing.Icon getLogIcon(java.util.logging.LogRecord record)
Icon
that should be used to present the
given LogRecord
. There are four basic icons stored
for displaying entries of type error
, warning
,
info
and debug
. When the provided record contains
a Throwable
object accessible via LogRecord.getThrown()
then the returned icon will be decorated with an 'error icon' at the
lower right corner.public de.ims.icarus.util.id.Identity getIdentity()
getIdentity
in interface de.ims.icarus.util.id.Identifiable
getIdentity
in class View
Identifiable.getIdentity()
public void init(javax.swing.JComponent container)
View
view
to layout its visible parts. From the moment
of this call until #close()
is called this View
is allowed
to take complete ownership if the provided container
. Due to the
nature of Swing's component hierarchy it is possible for a View
object
to access components outside its root
container but this is not
recommended! The basic job to be done within this method is to add components
to the container
and to resize it if needed.
This method will always be called on the EventDispatchThread
!
init
in class View
View.init(javax.swing.JComponent)
protected void refreshInfoPanel(InfoPanel infoPanel)
View
View
gets the input focus.
Hook for subclasses to initialize displayed fields on the info panel.
The default implementation just calls InfoPanel.clear()
on
the supplied argument.refreshInfoPanel
in class View
public void close()
View
View
to release all its resources and
return ownership of the JComponent
it was provided with
on the initial call to #init(JComponent)
. After this
method is called the View
object is considered unusable
and will no longer be accessible from its previous Perspective
context! If an implementation encounters an error that renders it
unable to release some of its resources (e.g. threads still running
in the background) then it should throw a CorruptedStateException
so the enclosing Perspective
can handle this by presenting
the user some kind of feedback that suggests him to exit the program
or that at least informs him about the unusual state and the possible
problems that may result from it. The default implementation only
clears the container component of all its child components to fasten
the release of ui-resources.close
in class View
View.close()
public void reset()
reset
in class View
View.reset()
protected de.ims.icarus.util.mpi.ResultMessage handleRequest(de.ims.icarus.util.mpi.Message message) throws java.lang.Exception
Commands.CLEAR
handleRequest
in class View
java.lang.Exception
View.handleRequest(de.ims.icarus.util.mpi.Message)