Class LoggerNameTreePanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, LoggerNameListener

final class LoggerNameTreePanel extends JPanel implements LoggerNameListener
A panel that encapsulates the Logger Name tree, with associated actions and implements the Rule interface so that it can filter in/out events that do not match the users request for refining the view based on Loggers.
  • Field Details

    • WARN_DEPTH

      private static final int WARN_DEPTH
      See Also:
    • cellRenderer

    • clearIgnoreListAction

      private final Action clearIgnoreListAction
    • closeAction

      private final Action closeAction
    • closeButton

      private final JButton closeButton
    • collapseAction

      private final Action collapseAction
    • collapseButton

      private final JButton collapseButton
    • editLoggerAction

      private final Action editLoggerAction
    • editLoggerButton

      private final JButton editLoggerButton
    • expandAction

      private final Action expandAction
    • findAction

      private final Action findAction
    • clearFindNextAction

      private final Action clearFindNextAction
    • defineColorRuleForLoggerAction

      private final Action defineColorRuleForLoggerAction
    • setRefineFocusAction

      private final Action setRefineFocusAction
    • updateRefineFocusAction

      private final Action updateRefineFocusAction
    • updateFindAction

      private final Action updateFindAction
    • expandButton

      private final JButton expandButton
    • focusOnAction

      private final Action focusOnAction
    • clearRefineFocusAction

      private final Action clearRefineFocusAction
    • focusOnLoggerButton

      private final SmallToggleButton focusOnLoggerButton
    • hiddenSet

      private final Set hiddenSet
    • hideAction

      private final Action hideAction
    • hideSubLoggersAction

      private final Action hideSubLoggersAction
    • preferenceModel

      private final LogPanelPreferenceModel preferenceModel
    • ignoreList

      private final JList ignoreList
    • ignoreExpressionEntryField

      private final JEditorPane ignoreExpressionEntryField
    • alwaysDisplayExpressionEntryField

      private final JEditorPane alwaysDisplayExpressionEntryField
    • ignoreListScroll

      private final JScrollPane ignoreListScroll
    • ignoreDialog

      private final JDialog ignoreDialog
    • ignoreExpressionDialog

      private final JDialog ignoreExpressionDialog
    • alwaysDisplayExpressionDialog

      private final JDialog alwaysDisplayExpressionDialog
    • ignoreSummary

      private final JLabel ignoreSummary
    • ignoreExpressionSummary

      private final JLabel ignoreExpressionSummary
    • alwaysDisplayExpressionSummary

      private final JLabel alwaysDisplayExpressionSummary
    • ignoreLoggerButton

      private final SmallToggleButton ignoreLoggerButton
    • listenerList

      private final EventListenerList listenerList
    • logTree

      private final JTree logTree
    • logger

      private final org.apache.log4j.Logger logger
    • logTreeModel

      private final LogPanelLoggerTreeModel logTreeModel
    • popupListener

      private final PopupListener popupListener
    • popupMenu

      private final LoggerNameTreePanel.LoggerTreePopupMenu popupMenu
    • visibilityRuleDelegate

      private final LoggerNameTreePanel.VisibilityRuleDelegate visibilityRuleDelegate
    • colorRuleDelegate

      private org.apache.log4j.rule.Rule colorRuleDelegate
    • scrollTree

      private final JScrollPane scrollTree
    • toolbar

      private final JToolBar toolbar
    • logPanel

      private final LogPanel logPanel
    • colorizer

      private final RuleColorizer colorizer
    • ignoreExpressionRule

      private org.apache.log4j.rule.Rule ignoreExpressionRule
    • alwaysDisplayExpressionRule

      private org.apache.log4j.rule.Rule alwaysDisplayExpressionRule
    • expandRootLatch

      private boolean expandRootLatch
    • currentlySelectedLoggerName

      private String currentlySelectedLoggerName
  • Constructor Details

  • Method Details

    • updateIgnoreExpression

      private boolean updateIgnoreExpression(String ignoreText)
    • updateAlwaysDisplayExpression

      private boolean updateAlwaysDisplayExpression(String alwaysDisplayText)
    • addChangeListener

      public void addChangeListener(ChangeListener l)
      Adds a change Listener to this LoggerNameTreePanel to be notfied when the State of the Focus or Hidden details have changed.
      Parameters:
      l -
    • getLoggerColorRule

      public org.apache.log4j.rule.Rule getLoggerColorRule()
    • getLoggerVisibilityRule

      public org.apache.log4j.rule.Rule getLoggerVisibilityRule()
    • removeChangeListener

      public void removeChangeListener(ChangeListener l)
      DOCUMENT ME!
      Parameters:
      l - DOCUMENT ME!
    • setFocusOn

      public void setFocusOn(String newLogger)
      Ensures the Focus is set to a specific logger name
    • isHiddenLogger

      private boolean isHiddenLogger(String loggerName)
    • toggleHiddenLogger

      protected void toggleHiddenLogger(String logger)
      DOCUMENT ME!
      Parameters:
      logger -
    • getCurrentlySelectedLoggerName

      String getCurrentlySelectedLoggerName()
      Returns the full name of the Logger that is represented by the currently selected Logger node in the tree.

      This is the dotted name, of the current node including all it's parents.

      If multiple Nodes are selected, the first path is used

      Returns:
      Logger Name or null if nothing selected
    • getLoggerName

      String getLoggerName(TreePath path)
      Returns the full
      Parameters:
      path - DOCUMENT ME!
      Returns:
    • ignore

      void ignore(Collection fqnLoggersToIgnore)
      adds a Collection of Strings to the ignore List and notifise all listeners of both the "hiddenSet" property and those expecting the Rule to change via the ChangeListener interface
      Parameters:
      fqnLoggersToIgnore -
    • isFocusOnSelected

      boolean isFocusOnSelected()
      Returns true if the FocusOn element has been selected
      Returns:
      true if the FocusOn action/lement has been selected
    • setFocusOnSelected

      void setFocusOnSelected(boolean selected)
    • collapseCurrentlySelectedNode

      private void collapseCurrentlySelectedNode()
      Given the currently selected nodes collapses all the children of those nodes.
    • configureToolbarPanel

      private void configureToolbarPanel()
      configures all the components that are used in the mini-toolbar of this component
    • createClearIgnoreListAction

      private Action createClearIgnoreListAction()
      DOCUMENT ME!
      Returns:
    • createCloseAction

      private Action createCloseAction()
      An action that closes (hides) this panel
      Returns:
    • createCollapseAction

      private Action createCollapseAction()
      DOCUMENT ME!
      Returns:
    • createEditLoggerAction

      private Action createEditLoggerAction()
    • createExpandAction

      private Action createExpandAction()
      Creates an action that is used to expand the selected node and all children
      Returns:
      an Action
    • createFindNextAction

      private Action createFindNextAction()
      Creates an action that is used to find the next match of the selected node (similar to default selection behavior except the search field is populated and the next match is selected.
      Returns:
      an Action
    • createSetRefineFocusAction

      private Action createSetRefineFocusAction()
    • createUpdateRefineFocusAction

      private Action createUpdateRefineFocusAction()
    • createUpdateFindAction

      private Action createUpdateFindAction()
    • updateFindUsingCurrentlySelectedNode

      private void updateFindUsingCurrentlySelectedNode()
    • updateRefineFocusUsingCurrentlySelectedNode

      private void updateRefineFocusUsingCurrentlySelectedNode()
    • setRefineFocusUsingCurrentlySelectedNode

      private void setRefineFocusUsingCurrentlySelectedNode()
    • createDefineColorRuleForLoggerAction

      private Action createDefineColorRuleForLoggerAction()
    • createClearFindNextAction

      private Action createClearFindNextAction()
      Creates an action that is used to find the next match of the selected node (similar to default selection behavior except the search field is populated and the next match is selected.
      Returns:
      an Action
    • createClearRefineFocusAction

      private Action createClearRefineFocusAction()
    • createFocusOnAction

      private Action createFocusOnAction()
      DOCUMENT ME!
      Returns:
    • createIgnoreAllAction

      private Action createIgnoreAllAction()
      DOCUMENT ME!
      Returns:
    • createIgnoreAction

      private Action createIgnoreAction()
      DOCUMENT ME!
      Returns:
    • ensureRootExpanded

      private void ensureRootExpanded()
    • findNextUsingCurrentlySelectedNode

      private void findNextUsingCurrentlySelectedNode()
    • clearFindNext

      private void clearFindNext()
    • clearRefineFocus

      private void clearRefineFocus()
    • expandCurrentlySelectedNode

      private void expandCurrentlySelectedNode()
      Expands the currently selected node (if any) including all the children.
    • fireChangeEvent

      private void fireChangeEvent()
    • reconfigureMenuText

      private void reconfigureMenuText()
    • setupListeners

      private void setupListeners()
      Configures varoius listeners etc for the components within this Class.
    • updateDisplay

      private void updateDisplay()
    • updateHiddenSetModels

      private void updateHiddenSetModels()
    • updateIgnoreSummary

      private void updateIgnoreSummary()
    • updateIgnoreExpressionSummary

      private void updateIgnoreExpressionSummary()
    • updateAlwaysDisplayExpressionSummary

      private void updateAlwaysDisplayExpressionSummary()
    • toggleFocusOnState

      private void toggleFocusOnState()
    • getHiddenSet

      public Collection getHiddenSet()
    • getHiddenExpression

      public String getHiddenExpression()
    • setHiddenExpression

      public void setHiddenExpression(String hiddenExpression)
    • getAlwaysDisplayExpression

      public String getAlwaysDisplayExpression()
    • setAlwaysDisplayExpression

      public void setAlwaysDisplayExpression(String alwaysDisplayExpression)
    • loggerNameAdded

      public void loggerNameAdded(String loggerName)
      Description copied from interface: LoggerNameListener
      Called by LoggerNameModel instances when a new unique Logger name string has been introduced into the model
      Specified by:
      loggerNameAdded in interface LoggerNameListener
      Parameters:
      loggerName - the new, unique loggerName
    • reset

      public void reset()
      Description copied from interface: LoggerNameListener
      Logger names were reset (used to clear the tree model)
      Specified by:
      reset in interface LoggerNameListener