Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.eireneh.swing
Class Status  view Status download Status.java

java.lang.Object
  extended bycom.eireneh.swing.Status
All Implemented Interfaces:
com.eireneh.util.event.CaptureListener, java.util.EventListener

public class Status
extends java.lang.Object
implements com.eireneh.util.event.CaptureListener

We implement CaptureListener so that we can catch exceptions and print them out to the Log.
Distribution Licence:
Project B is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
The License is available on the internet here, by writing to Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, Or locally at the Licence link below.
The copyright to this program is held by it's authors.


Nested Class Summary
(package private) static class Status.CellRendererAdvice
          A description of how to render a cell
(package private) static class Status.CustomListCellRenderer
          Renders an item in a list.
(package private) static class Status.CustomListModel
          Where we store the messages
(package private) static class Status.LogLine
          The information we store about a single message
 
Field Summary
private static Status.CellRendererAdvice[] advice
          The instructions for the Renderer
private  javax.swing.JPanel bar
          The button bar
private static boolean capture_shelf
          Do we capture to the shelf
private  javax.swing.JButton close
          The exit button
private  com.eireneh.config.Config config
          The options
private  ExceptionShelf except
          Where we can report problems
private  javax.swing.JFrame frame
          The window we are displayed in
private static boolean just_starting
          A tag to allow the default window status to be open
private static Status.CustomListModel logpile
          Where we store the messages
private  javax.swing.JList logs
          The reported text messages
private  javax.swing.JButton options
          The options button
private  javax.swing.JButton shutdown
          The exit button
private static java.util.Hashtable sliders
          The sliders
private  javax.swing.JPanel status
          The status area
private static java.util.Hashtable streams
          The index of log streams
private  java.net.URL url
          How we save the status
private static java.util.Vector visible
          The index of log streams
private static Status window
          The Status window
 
Constructor Summary
private Status(com.eireneh.config.Config config, java.net.URL url)
           
 
Method Summary
static void addCounter(java.lang.String name, int max, int maj_tick, int min_tick)
          Log(package, priority, format, params)
 void captureException(com.eireneh.util.event.CaptureEvent ev)
          Log(package, priority, format, params)
 void captureMessage(com.eireneh.util.event.CaptureEvent ev)
          Log(package, priority, format, params)
static java.lang.String getLogStyle(int index)
          The style associated with a log stream
static boolean getWindowVisible()
          Is the status window visible
private  void options()
          Show the options dialog box
static void setCounter(java.lang.String name, int value)
          The number on a named slider
static void setLogStyle(int index, java.lang.String value)
          The style associated with a log stream
static void setLogStyle(int index, java.lang.String match, java.awt.Font font, java.awt.Color foreground, java.awt.Color background, javax.swing.Icon icon)
          The style associated with a log stream
static void setWindowVisible(boolean open, com.eireneh.config.Config config, java.net.URL url)
          Is the status window visible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

status

private javax.swing.JPanel status
The status area


logs

private javax.swing.JList logs
The reported text messages


options

private javax.swing.JButton options
The options button


close

private javax.swing.JButton close
The exit button


shutdown

private javax.swing.JButton shutdown
The exit button


bar

private javax.swing.JPanel bar
The button bar


frame

private javax.swing.JFrame frame
The window we are displayed in


except

private ExceptionShelf except
Where we can report problems


config

private com.eireneh.config.Config config
The options


url

private java.net.URL url
How we save the status


sliders

private static java.util.Hashtable sliders
The sliders


logpile

private static Status.CustomListModel logpile
Where we store the messages


window

private static Status window
The Status window


capture_shelf

private static boolean capture_shelf
Do we capture to the shelf


just_starting

private static boolean just_starting
A tag to allow the default window status to be open


streams

private static java.util.Hashtable streams
The index of log streams


visible

private static java.util.Vector visible
The index of log streams


advice

private static Status.CellRendererAdvice[] advice
The instructions for the Renderer

Constructor Detail

Status

private Status(com.eireneh.config.Config config,
               java.net.URL url)
Method Detail

captureMessage

public void captureMessage(com.eireneh.util.event.CaptureEvent ev)
Log(package, priority, format, params)

Specified by:
captureMessage in interface com.eireneh.util.event.CaptureListener

captureException

public void captureException(com.eireneh.util.event.CaptureEvent ev)
Log(package, priority, format, params)

Specified by:
captureException in interface com.eireneh.util.event.CaptureListener

options

private void options()
Show the options dialog box


getWindowVisible

public static boolean getWindowVisible()
Is the status window visible


setWindowVisible

public static void setWindowVisible(boolean open,
                                    com.eireneh.config.Config config,
                                    java.net.URL url)
Is the status window visible


addCounter

public static void addCounter(java.lang.String name,
                              int max,
                              int maj_tick,
                              int min_tick)
Log(package, priority, format, params)


setCounter

public static void setCounter(java.lang.String name,
                              int value)
The number on a named slider


setLogStyle

public static void setLogStyle(int index,
                               java.lang.String value)
The style associated with a log stream


getLogStyle

public static java.lang.String getLogStyle(int index)
The style associated with a log stream


setLogStyle

public static void setLogStyle(int index,
                               java.lang.String match,
                               java.awt.Font font,
                               java.awt.Color foreground,
                               java.awt.Color background,
                               javax.swing.Icon icon)
The style associated with a log stream