public class LogConsole extends CayenneController
| Modifier and Type | Field and Description |
|---|---|
static MutableAttributeSet |
DEBUG_STYLE
Style for debug messages
|
static String |
DOCKED_PROPERTY
Property to store 'is-docked' preference
|
static MutableAttributeSet |
ERROR_STYLE
Red color style for severe messages
|
static MutableAttributeSet |
FATAL_STYLE
Red bold color style for fatal messages
|
static MutableAttributeSet |
INFO_STYLE
Blue color style for info messages
|
static String |
SHOW_CONSOLE_PROPERTY
Property to store user preference
|
static MutableAttributeSet |
WARN_STYLE
Dark red color style for warn messages
|
application, parent, propertyChangeSupport| Constructor and Description |
|---|
LogConsole() |
| Modifier and Type | Method and Description |
|---|---|
void |
appendMessage(String level,
String message,
AttributeSet style)
Appends a message to the console.
|
void |
appendMessage(String level,
String message,
Throwable ex,
AttributeSet style)
Appends a message and (or) an exception
|
void |
clear()
Clears the console
|
void |
copy()
Copies selected text from the console to system buffer
|
boolean |
getConsoleProperty(String prop) |
static LogConsole |
getInstance() |
Component |
getView()
Returns the vie wassociated with this Controller.
|
protected void |
initBindings() |
void |
setConsoleProperty(String prop,
boolean b)
Sets the property, depending on last user's choice
|
void |
showConsoleIfNeeded()
Shows the console if the preference 'SHOW_CONSOLE_PROPERTY' is set to true
|
void |
stopLogging()
Stop logging and don't print any more messages to text area
|
void |
toggle()
Shows or hides the console window
|
addPropertyChangeListener, bindingUpdated, centerView, firePropertyChange, getApplication, getFrame, getLastDirectory, getParent, getViewPreferences, getWindow, makeCloseableOnEscape, reportErrorpublic static final String SHOW_CONSOLE_PROPERTY
public static final String DOCKED_PROPERTY
public static final MutableAttributeSet ERROR_STYLE
public static final MutableAttributeSet FATAL_STYLE
public static final MutableAttributeSet WARN_STYLE
public static final MutableAttributeSet INFO_STYLE
public static final MutableAttributeSet DEBUG_STYLE
protected void initBindings()
public void clear()
public void copy()
public void toggle()
public void showConsoleIfNeeded()
public void setConsoleProperty(String prop, boolean b)
public boolean getConsoleProperty(String prop)
public void appendMessage(String level, String message, AttributeSet style)
style - Message font, color etc.public void appendMessage(String level, String message, Throwable ex, AttributeSet style)
style - Message font, color etc.public Component getView()
CayenneControllergetView in interface BoundComponentgetView in class CayenneControllerpublic void stopLogging()
public static LogConsole getInstance()
Copyright © 2001–2015 Apache Cayenne. All rights reserved.