Package com.biglybt.ui.swt.views
Class LoggerView
- java.lang.Object
-
- com.biglybt.ui.swt.views.LoggerView
-
- All Implemented Interfaces:
ParameterListener
,ILogEventListener
,UISWTViewEventListener
,UISWTViewCoreEventListener
public class LoggerView extends java.lang.Object implements ILogEventListener, ParameterListener, UISWTViewCoreEventListener
- Since:
- 2.3.0.5
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
bAutoScroll
private boolean
bEnabled
private boolean
bPaused
private boolean
bRealtime
private java.util.LinkedList<LogEvent>
buffer
private org.eclipse.swt.widgets.Button
buttonAutoScroll
private static int
COLOR_ERR
private static int
COLOR_INFO
private static int
COLOR_WARN
private static org.eclipse.swt.graphics.Color[]
colors
private org.eclipse.swt.custom.StyledText
consoleText
private static java.text.SimpleDateFormat
dateFormatter
private org.eclipse.swt.widgets.Display
display
private java.util.regex.Pattern
exclusionFilter
private java.lang.Object[]
filter
private static java.text.FieldPosition
formatPos
private java.util.ArrayList[]
ignoredComponents
private java.util.regex.Pattern
inclusionFilter
private static int
MAX_LINES
static java.lang.String
MSGID_PREFIX
private org.eclipse.swt.widgets.Composite
panel
private static int
PREFERRED_LINES
private boolean
stopOnNull
private UISWTView
swtView
static java.lang.String
VIEW_ID
-
Constructor Summary
Constructors Modifier Constructor Description LoggerView()
LoggerView(boolean stopOnNull)
private
LoggerView(LoggerView other)
LoggerView(java.util.List<? extends LogEvent> initialList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
clearConsole()
private void
dataSourceChanged(java.lang.Object newDataSource)
private void
delete()
boolean
eventOccurred(UISWTViewEvent event)
Triggers when an even listed in UISWTViewEvent occursprivate org.eclipse.swt.widgets.Composite
getComposite()
private java.lang.String
getFullTitle()
java.lang.String
getPluginViewName()
private void
initialize(org.eclipse.swt.widgets.Composite composite)
void
log(LogEvent event)
A LogEvent has been generated.private int
logTypeToIndex(int entryType)
void
parameterChanged(java.lang.String parameterName)
Called, when a parameter has changed.private void
refresh()
void
setEnabled(boolean on)
void
setFilter(java.lang.Object[] _filter)
-
-
-
Field Detail
-
VIEW_ID
public static final java.lang.String VIEW_ID
- See Also:
- Constant Field Values
-
COLOR_INFO
private static final int COLOR_INFO
- See Also:
- Constant Field Values
-
COLOR_WARN
private static final int COLOR_WARN
- See Also:
- Constant Field Values
-
COLOR_ERR
private static final int COLOR_ERR
- See Also:
- Constant Field Values
-
colors
private static org.eclipse.swt.graphics.Color[] colors
-
PREFERRED_LINES
private static final int PREFERRED_LINES
- See Also:
- Constant Field Values
-
MAX_LINES
private static final int MAX_LINES
- See Also:
- Constant Field Values
-
dateFormatter
private static final java.text.SimpleDateFormat dateFormatter
-
formatPos
private static final java.text.FieldPosition formatPos
-
MSGID_PREFIX
public static final java.lang.String MSGID_PREFIX
- See Also:
- Constant Field Values
-
display
private org.eclipse.swt.widgets.Display display
-
panel
private org.eclipse.swt.widgets.Composite panel
-
consoleText
private org.eclipse.swt.custom.StyledText consoleText
-
buttonAutoScroll
private org.eclipse.swt.widgets.Button buttonAutoScroll
-
filter
private java.lang.Object[] filter
-
buffer
private java.util.LinkedList<LogEvent> buffer
-
bPaused
private boolean bPaused
-
bRealtime
private boolean bRealtime
-
bEnabled
private boolean bEnabled
-
bAutoScroll
private boolean bAutoScroll
-
inclusionFilter
private java.util.regex.Pattern inclusionFilter
-
exclusionFilter
private java.util.regex.Pattern exclusionFilter
-
ignoredComponents
private java.util.ArrayList[] ignoredComponents
-
stopOnNull
private boolean stopOnNull
-
swtView
private UISWTView swtView
-
-
Constructor Detail
-
LoggerView
public LoggerView()
-
LoggerView
public LoggerView(boolean stopOnNull)
-
LoggerView
public LoggerView(java.util.List<? extends LogEvent> initialList)
-
LoggerView
private LoggerView(LoggerView other)
-
-
Method Detail
-
initialize
private void initialize(org.eclipse.swt.widgets.Composite composite)
-
getComposite
private org.eclipse.swt.widgets.Composite getComposite()
-
refresh
private void refresh()
-
delete
private void delete()
-
getFullTitle
private java.lang.String getFullTitle()
-
log
public void log(LogEvent event)
Description copied from interface:ILogEventListener
A LogEvent has been generated.- Specified by:
log
in interfaceILogEventListener
- Parameters:
event
- The newly generated LogEvent
-
setFilter
public void setFilter(java.lang.Object[] _filter)
-
clearConsole
private void clearConsole()
-
setEnabled
public void setEnabled(boolean on)
-
getPluginViewName
public java.lang.String getPluginViewName()
-
dataSourceChanged
private void dataSourceChanged(java.lang.Object newDataSource)
-
logTypeToIndex
private int logTypeToIndex(int entryType)
-
parameterChanged
public void parameterChanged(java.lang.String parameterName)
Description copied from interface:ParameterListener
Called, when a parameter has changed. The listener could only react if the parameter name is relevant. Or the listener can just read all parameters again.- Specified by:
parameterChanged
in interfaceParameterListener
- Parameters:
parameterName
- the name of the parameter that has changed
-
eventOccurred
public boolean eventOccurred(UISWTViewEvent event)
Description copied from interface:UISWTViewEventListener
Triggers when an even listed in UISWTViewEvent occurs- Specified by:
eventOccurred
in interfaceUISWTViewEventListener
- Parameters:
event
- event that occurred- Returns:
- meaning dependent upon event type
-
-