|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.geotools.gui.swing.LoggingPanel
A panel displaying logging messages. The windows displaying Geotools's logging messages can be constructed with the following code:
new LoggingPanel("org.geotools").show(null);
This panel is initially set to listen to messages of level Level.CONFIG or higher.
This level can be changed with getHandler().setLevel(aLevel).
| Nested Class Summary | |
static class |
LoggingPanel.Column
Enumeration class for columns to be shown in a LoggingPanel.
|
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
static LoggingPanel.Column |
CLASS
Constant for setColumnVisible(org.geotools.gui.swing.LoggingPanel.Column, boolean). |
static LoggingPanel.Column |
LEVEL
Constant for setColumnVisible(org.geotools.gui.swing.LoggingPanel.Column, boolean). |
static LoggingPanel.Column |
LOGGER
Constant for setColumnVisible(org.geotools.gui.swing.LoggingPanel.Column, boolean). |
static LoggingPanel.Column |
MESSAGE
Constant for setColumnVisible(org.geotools.gui.swing.LoggingPanel.Column, boolean). |
static LoggingPanel.Column |
METHOD
Constant for setColumnVisible(org.geotools.gui.swing.LoggingPanel.Column, boolean). |
static LoggingPanel.Column |
TIME_OF_DAY
Constant for setColumnVisible(org.geotools.gui.swing.LoggingPanel.Column, boolean). |
| 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, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
LoggingPanel()
Constructs a new logging panel. |
|
LoggingPanel(java.util.logging.Logger logger)
Constructs a new logging panel and register it to the specified logger. |
|
LoggingPanel(java.lang.String logger)
Construct a logging panel and register it to the specified logger. |
|
| Method Summary | |
void |
dispose()
Free any resources used by this . |
void |
doLayout()
Layout this component. |
java.awt.Color |
getBackground(java.util.logging.LogRecord record)
Returns the background color for the specified log record. |
int |
getCapacity()
Returns the capacity. |
java.awt.Color |
getForeground(java.util.logging.LogRecord record)
Returns the foreground color for the specified log record. |
java.util.logging.Handler |
getHandler()
Returns the logging handler. |
boolean |
isColumnVisible(LoggingPanel.Column column)
Returns if the given column is visible. |
void |
setCapacity(int capacity)
Set the capacity. |
void |
setColumnVisible(LoggingPanel.Column column,
boolean visible)
Show or hide the given column. |
void |
setLevelColor(java.util.logging.Level level,
java.awt.Color foreground,
java.awt.Color background)
Set the foreground and background colors for messages of the specified level. |
java.awt.Component |
show(java.awt.Component owner)
Convenience method showing this logging panel into a frame. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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 |
| Field Detail |
public static final LoggingPanel.Column LOGGER
setColumnVisible(org.geotools.gui.swing.LoggingPanel.Column, boolean).
public static final LoggingPanel.Column CLASS
setColumnVisible(org.geotools.gui.swing.LoggingPanel.Column, boolean).
public static final LoggingPanel.Column METHOD
setColumnVisible(org.geotools.gui.swing.LoggingPanel.Column, boolean).
public static final LoggingPanel.Column TIME_OF_DAY
setColumnVisible(org.geotools.gui.swing.LoggingPanel.Column, boolean).
public static final LoggingPanel.Column LEVEL
setColumnVisible(org.geotools.gui.swing.LoggingPanel.Column, boolean).
public static final LoggingPanel.Column MESSAGE
setColumnVisible(org.geotools.gui.swing.LoggingPanel.Column, boolean).
| Constructor Detail |
public LoggingPanel()
logger.addHandler(getHandler());
public LoggingPanel(java.util.logging.Logger logger)
logger - The logger to listen to, or for the root logger.public LoggingPanel(java.lang.String logger)
logger - The logger name to listen to, or for the root logger.| Method Detail |
public java.util.logging.Handler getHandler()
public boolean isColumnVisible(LoggingPanel.Column column)
column - The column to show or hide. May be one of LOGGER, CLASS,
METHOD, TIME_OF_DAY, LEVEL or MESSAGE.
public void setColumnVisible(LoggingPanel.Column column,
boolean visible)
column - The column to show or hide. May be one of LOGGER, CLASS,
METHOD, TIME_OF_DAY, LEVEL or MESSAGE.visible - The visible state for the specified column.public int getCapacity()
LogRecords the handler
can memorize. If more messages are logged, then the earliest messages will be discarted.
public void setCapacity(int capacity)
LogRecords the handler can
memorize. If more messages are logged, then the earliest messages will be discarted.
public java.awt.Color getForeground(java.util.logging.LogRecord record)
setLevelColor(java.util.logging.Level, java.awt.Color, java.awt.Color).
record - The record to get the foreground color.
public java.awt.Color getBackground(java.util.logging.LogRecord record)
setLevelColor(java.util.logging.Level, java.awt.Color, java.awt.Color).
record - The record to get the background color.
public void setLevelColor(java.util.logging.Level level,
java.awt.Color foreground,
java.awt.Color background)
level - The minimal level to set color for.foreground - The foreground color, or for the default color.background - The background color, or for the default color.public void doLayout()
public java.awt.Component show(java.awt.Component owner)
JDesktopPane,
then is added into a JInternalFrame.Frame or a Dialog,
then is added into a JDialog.JFrame.
owner - The owner, or to show
this logging panel in a top-level window.
JInternalFrame,
a JDialog or a JFrame.public void dispose()
Logger was
specified at construction time, then this method unregister the 's
handler from the specified logger. Next, Handler.close() is invoked.
show(Component). If this is displayed
by some other ways (for example if it has been added into a JPanel),
then this should be invoked explicitely when the container
is being discarted.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||