org.apache.log4j.chainsaw
Class LogPanelPreferenceModel

java.lang.Object
  extended by org.apache.log4j.chainsaw.LogPanelPreferenceModel
All Implemented Interfaces:
java.io.Serializable

public class LogPanelPreferenceModel
extends java.lang.Object
implements java.io.Serializable

Used to encapsulate all the preferences for a given LogPanel

Author:
Paul Smith
See Also:
Serialized Form

Field Summary
static java.util.Collection DATE_FORMATS
           
static java.lang.String ISO8601
           
 
Constructor Summary
LogPanelPreferenceModel()
           
 
Method Summary
 boolean addColumn(javax.swing.table.TableColumn column)
           
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 void apply(LogPanelPreferenceModel model)
          Applies all the properties of another model to this model
 void clearColumns()
           
 java.util.List getColumns()
          Returns an unmodifiable list of the columns.
 java.lang.String getDateFormatPattern()
          Returns the Date Pattern string for the alternate date formatter.
 java.util.Collection getHiddenLoggers()
           
 java.lang.String getLoggerPrecision()
          Returns the Logger precision.
 java.util.List getVisibleColumnOrder()
           
 java.util.List getVisibleColumns()
          Returns an unmodifiable list of the visible columns.
 boolean isColumnVisible(javax.swing.table.TableColumn column)
          Returns true if the named column should be made visible otherwise false.
 boolean isCustomDateFormat()
           
 boolean isDetailPaneVisible()
           
 boolean isLevelIcons()
           
 boolean isLogTreePanelVisible()
           
 boolean isScrollToBottom()
           
 boolean isToolTips()
           
 boolean isUseISO8601Format()
          Returns true if this the fast ISO8601DateFormat object should be used instead of SimpleDateFormat
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 void setColumnVisible(java.lang.String columnName, boolean isVisible)
           
 void setDateFormatPattern(java.lang.String dateFormatPattern)
           
 void setDefaultDatePatternFormat()
           
 void setDetailPaneVisible(boolean detailPaneVisible)
           
 void setHiddenLoggers(java.util.Collection hiddenSet)
           
 void setLevelIcons(boolean levelIcons)
           
 void setLoggerPrecision(java.lang.String loggerPrecision)
           
 void setLogTreePanelVisible(boolean logTreePanelVisible)
           
 void setScrollToBottom(boolean scrollToBottom)
           
 void setToolTips(boolean toolTips)
           
 void setVisibleColumnOrder(java.util.List visibleColumnOrder)
           
 void toggleColumn(javax.swing.table.TableColumn column)
          Toggles the state between visible, non-visible for a particular Column name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ISO8601

public static final java.lang.String ISO8601
See Also:
Constant Field Values

DATE_FORMATS

public static final java.util.Collection DATE_FORMATS
Constructor Detail

LogPanelPreferenceModel

public LogPanelPreferenceModel()
Method Detail

getColumns

public java.util.List getColumns()
Returns an unmodifiable list of the columns. The reason it is unmodifiable is to enforce the requirement that the List is actually unique columns. IT _could_ be a set, but we need to maintain the order of insertion.

Returns:

getVisibleColumns

public java.util.List getVisibleColumns()
Returns an unmodifiable list of the visible columns. The reason it is unmodifiable is to enforce the requirement that the List is actually unique columns. IT _could_ be a set, but we need to maintain the order of insertion.

Returns:

clearColumns

public void clearColumns()

setVisibleColumnOrder

public void setVisibleColumnOrder(java.util.List visibleColumnOrder)

getVisibleColumnOrder

public java.util.List getVisibleColumnOrder()

addColumn

public boolean addColumn(javax.swing.table.TableColumn column)

getDateFormatPattern

public final java.lang.String getDateFormatPattern()
Returns the Date Pattern string for the alternate date formatter.

Returns:
date pattern

setDefaultDatePatternFormat

public final void setDefaultDatePatternFormat()

setDateFormatPattern

public final void setDateFormatPattern(java.lang.String dateFormatPattern)
Parameters:
dateFormatPattern -

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Parameters:
listener -

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)
Parameters:
propertyName -
listener -

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Parameters:
listener -

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)
Parameters:
propertyName -
listener -

apply

public void apply(LogPanelPreferenceModel model)
Applies all the properties of another model to this model

Parameters:
model - the model to copy all the properties from

isUseISO8601Format

public boolean isUseISO8601Format()
Returns true if this the fast ISO8601DateFormat object should be used instead of SimpleDateFormat

Returns:
use ISO8601 format flag

isLevelIcons

public boolean isLevelIcons()
Returns:
level icons flag

setLevelIcons

public void setLevelIcons(boolean levelIcons)
Parameters:
levelIcons -

setLoggerPrecision

public void setLoggerPrecision(java.lang.String loggerPrecision)
Parameters:
loggerPrecision - - an integer representing the number of packages to display, or an empty string representing 'display all packages'

getLoggerPrecision

public final java.lang.String getLoggerPrecision()
Returns the Logger precision.

Returns:
logger precision

isColumnVisible

public boolean isColumnVisible(javax.swing.table.TableColumn column)
Returns true if the named column should be made visible otherwise false.

Parameters:
columnName -
Returns:
column visible flag

setColumnVisible

public void setColumnVisible(java.lang.String columnName,
                             boolean isVisible)

toggleColumn

public void toggleColumn(javax.swing.table.TableColumn column)
Toggles the state between visible, non-visible for a particular Column name

Parameters:
column -

isDetailPaneVisible

public final boolean isDetailPaneVisible()
Returns:
detail pane visible flag

setDetailPaneVisible

public final void setDetailPaneVisible(boolean detailPaneVisible)
Parameters:
detailPaneVisible -

isScrollToBottom

public final boolean isScrollToBottom()
Returns:
scroll to bottom flag

setScrollToBottom

public final void setScrollToBottom(boolean scrollToBottom)
Parameters:
scrollToBottom -

isToolTips

public final boolean isToolTips()
Returns:
tool tips enabled flag

setToolTips

public final void setToolTips(boolean toolTips)
Parameters:
toolTips -

isLogTreePanelVisible

public final boolean isLogTreePanelVisible()
Returns:
log tree panel visible flag

setLogTreePanelVisible

public final void setLogTreePanelVisible(boolean logTreePanelVisible)
Parameters:
logTreePanelVisible -

isCustomDateFormat

public boolean isCustomDateFormat()
Returns:
custom date format flag

setHiddenLoggers

public void setHiddenLoggers(java.util.Collection hiddenSet)

getHiddenLoggers

public java.util.Collection getHiddenLoggers()


Copyright © 2007 Apache Software Foundation. All Rights Reserved.