talx x1.0.5

talx.util
Class ShallowSettings

java.lang.Object
  extended bytalx.util.ShallowSettings
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Settings, ShallowSettings.MutableSettings

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

This class reads in a given XML file and parses it for a variety of values which it will store in its private variables. It then provides methods for retrieving the values. This class is shallow in the sense that it only contains getters and setters for the information contained in a settings file. It can be viewed as the API for the file itself. A model.Settings object, on the other hand, has references to the actual People objects in the model, and the location of the application in the system's file space.

See Also:
Serialized Form

Nested Class Summary
static class ShallowSettings.MutableSettings
          This extension to settings allows the values to be changed and the file written out.
static class ShallowSettings.ShallowPerson
           
 
Field Summary
static int DRAG_DOWN
          The drag mode constant meaning dragging is not allowed and the cursor will be placed according to the location of the mouse when the button is depressed.
static int DRAG_SELECT
          The drag mode constant meaning selection dragging is allowed.
static int DRAG_UP
          The drag mode constant meaning dragging is not allowed and the cursor will be placed according to the location of the mouse when the button is released.
 
Constructor Summary
ShallowSettings(java.io.InputStream source)
          Constructs a ShallowSettings from the given inputStream.
ShallowSettings(java.lang.String filename)
          Constructs a ShallowSettings from the file at the given location.
 
Method Summary
 java.lang.String getAddress()
          Returns the user's return address for outgoing email.
 java.lang.String getAnsweredCaption()
          Returns the caption text indicating the displayed message has been answered.
 java.lang.String getArchiveCaption()
          Returns the caption text indicating the message history is being displayed.
 java.lang.String getArchiveSubject()
          Returns the subject text for message histories.
 boolean getAutoDelete()
          Returns true if messages should be automatically deleted when they are answered.
 java.lang.String getBlankText()
          Returns the message text for incoming messages with no text.
 double getBuddyHeight()
          Returns the height of the buddy pictures in percent of main window height.
 double getBuddyWidth()
          Returns the width of the buddy pictures in percent of main window width.
protected  javax.xml.parsers.DocumentBuilder getBuilder()
          This obtains a document builder suitable for settings.
 java.awt.Color getButtonColor()
          Returns the color to paint all buttons except the mailboxes.
 int getCaretBlink()
          Returns number of milliseconds between showing and hiding the composer caret rectangle.
 java.awt.Color getCaretColor()
          Returns the color of the composer caret rectangle.
 int getCaretWidth()
          Returns the number of pixels in the width of the composer caret rectangle.
 java.lang.String getComposerClass()
          Returns the class name of the composer class.
 java.lang.String getComposerClassParameter()
          Returns the string parameter (if any) for the composer constructor.
 java.awt.Color getComposerColor()
          Returns the background color for the composer's text.
 boolean getComposerIBar()
          Returns true if the composer cursor should be an IBar.
 java.lang.String getDateFormat()
          Returns format string to use for the caption date information.
 boolean getDecorated()
          Returns true if the window should be framed with icons to minimize, maximise, etc.
 java.lang.String getDefaultCaption()
          Returns the caption text indicating the displayed was generated by the system.
 java.lang.String getDefaultSubject()
          Returns the subject text for system-generated messages.
 java.lang.String getDefaultText()
          Returns the message text for system-generated messages.
 java.lang.String getDialogsClassParameter()
          Returns the string parameter (if any) for the dialog manager constructor.
 int getDragMode()
          Returns the constant indicating the behavior to exhibit when the mouse is dragged through the message text.
 java.lang.String getEmptyArchiveText()
          Returns the message text for message histories with no messages.
 java.lang.String getEmptyCaption()
          Returns the caption text indicating no message is being displayed.
 FeatureDescriptor[] getFeatures()
          Returns the list of feature classes and parameters.
 java.lang.String getFont()
          Returns the font face to use for all components.
 int getFontSize()
          Returns the font size
 java.lang.String getInboxClass()
          Returns the class name of the inbox class.
 java.lang.String getInboxClassParameter()
          Returns the string parameter (if any) for the inbox constructor.
 java.awt.Color getInboxColor()
          Returns the color to be used for unselected mailboxes.
 java.awt.Color getInboxHighlightColor()
          Returns the color to be used for selected mailboxes.
 boolean getInboxOnRight()
          Returns true if the inbox should be displayed to the right of the reader and composer.
 double getInboxWidth()
          Returns width of the inbox in percent of main window width.
 FeatureDescriptor[] getInFilters()
          Returns the list of incoming filter classes and parameters.
 java.lang.String getInitialHandlerClass()
          Returns the class name of the handler that represents a controller "start" state.
 java.lang.String getInitiateCaption()
          Returns the text color for the caption indicating the composed message is not a response to a buddy message.
 java.lang.String getLoggerClass()
          Returns the class name of the logger to give to LoggerProxy.
 java.lang.String getLoggerParam()
          Returns the class name of the handler that represents a controller "start" state.
 FeatureDescriptor[] getOutFilters()
          Returns the list of outgoing filter classes and parameters.
 ShallowSettings.ShallowPerson[] getPeopleData()
          Returns the list of email buddies.
 double getPercentOfScreen()
          Returns percent of the physical screen that the main window should occupy
 ShallowSettings.ShallowPerson[] getPlayerData()
          Returns the list of game buddies.
 java.lang.String getReadCaption()
          Returns the caption text indicating the displayed message has been read.
 java.lang.String getReaderClass()
          Returns the class name of the reader class.
 java.lang.String getReaderClassParameter()
          Returns the string parameter (if any) for the reader constructor.
 java.awt.Color getReaderColor()
          Returns the background color for the reader's text.
 java.lang.String getRealname()
          Returns "human readable" name for the user on outgoing email.
 java.lang.String getResponseCaption()
          Returns the caption text colorindicating the composed message is a response to a buddy message.
 java.lang.String getScrollDownText()
          Returns text to place in the lower scroll button.
 int getScrollSpeed()
          Returns number of pixels to scroll at each scroll interval while a scroll button is held down.
 java.lang.String getScrollUpText()
          Returns text to place in the upper scroll button.
 boolean getSubjectField()
          Returns true if the composer should contain a control for editing the message subject.
 java.lang.String getTALLoggerClass()
          Returns the subclass of TALLogger to use for controller logging.
static java.lang.String getText(org.w3c.dom.Element e)
          This method takes in an Element and returns the concatenation of all of its text subnodes.
 java.lang.String getUnreadCaption()
          Returns the caption text indicating the displayed message has been neither read nor answered.
 java.lang.String getUsername()
          Returns user's name on the local TAL store.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DRAG_SELECT

public static final int DRAG_SELECT
The drag mode constant meaning selection dragging is allowed.

See Also:
Constant Field Values

DRAG_UP

public static final int DRAG_UP
The drag mode constant meaning dragging is not allowed and the cursor will be placed according to the location of the mouse when the button is released.

See Also:
Constant Field Values

DRAG_DOWN

public static final int DRAG_DOWN
The drag mode constant meaning dragging is not allowed and the cursor will be placed according to the location of the mouse when the button is depressed.

See Also:
Constant Field Values
Constructor Detail

ShallowSettings

public ShallowSettings(java.lang.String filename)
Constructs a ShallowSettings from the file at the given location.


ShallowSettings

public ShallowSettings(java.io.InputStream source)
Constructs a ShallowSettings from the given inputStream.

Method Detail

getText

public static java.lang.String getText(org.w3c.dom.Element e)
This method takes in an Element and returns the concatenation of all of its text subnodes.

Parameters:
e - The Element to analize
Returns:
the text from all the direct subnodes of node

getBuilder

protected javax.xml.parsers.DocumentBuilder getBuilder()
                                                throws javax.xml.parsers.ParserConfigurationException
This obtains a document builder suitable for settings. This method uses a document builder factory configured in a particular way. Subclasses should obtain document builders from this method to maintain compatibility with those settings.

Throws:
javax.xml.parsers.ParserConfigurationException

toString

public java.lang.String toString()

getUsername

public java.lang.String getUsername()
Returns user's name on the local TAL store.


getAddress

public java.lang.String getAddress()
Returns the user's return address for outgoing email.


getRealname

public java.lang.String getRealname()
Returns "human readable" name for the user on outgoing email.


getAutoDelete

public boolean getAutoDelete()
Returns true if messages should be automatically deleted when they are answered.


getPeopleData

public ShallowSettings.ShallowPerson[] getPeopleData()
Returns the list of email buddies.


getPlayerData

public ShallowSettings.ShallowPerson[] getPlayerData()
Returns the list of game buddies.


getInFilters

public FeatureDescriptor[] getInFilters()
Returns the list of incoming filter classes and parameters.


getOutFilters

public FeatureDescriptor[] getOutFilters()
Returns the list of outgoing filter classes and parameters.


getFeatures

public FeatureDescriptor[] getFeatures()
Returns the list of feature classes and parameters.


getDialogsClassParameter

public java.lang.String getDialogsClassParameter()
Returns the string parameter (if any) for the dialog manager constructor.


getFont

public java.lang.String getFont()
Returns the font face to use for all components.


getFontSize

public int getFontSize()
Returns the font size


getDecorated

public boolean getDecorated()
Returns true if the window should be framed with icons to minimize, maximise, etc.


getButtonColor

public java.awt.Color getButtonColor()
Returns the color to paint all buttons except the mailboxes.


getScrollUpText

public java.lang.String getScrollUpText()
Returns text to place in the upper scroll button.


getScrollDownText

public java.lang.String getScrollDownText()
Returns text to place in the lower scroll button.


getScrollSpeed

public int getScrollSpeed()
Returns number of pixels to scroll at each scroll interval while a scroll button is held down.


getPercentOfScreen

public double getPercentOfScreen()
Returns percent of the physical screen that the main window should occupy


getInboxClass

public java.lang.String getInboxClass()
Returns the class name of the inbox class.


getInboxClassParameter

public java.lang.String getInboxClassParameter()
Returns the string parameter (if any) for the inbox constructor.


getInboxWidth

public double getInboxWidth()
Returns width of the inbox in percent of main window width.


getInboxOnRight

public boolean getInboxOnRight()
Returns true if the inbox should be displayed to the right of the reader and composer.


getInboxColor

public java.awt.Color getInboxColor()
Returns the color to be used for unselected mailboxes.


getInboxHighlightColor

public java.awt.Color getInboxHighlightColor()
Returns the color to be used for selected mailboxes.


getBuddyWidth

public double getBuddyWidth()
Returns the width of the buddy pictures in percent of main window width.


getBuddyHeight

public double getBuddyHeight()
Returns the height of the buddy pictures in percent of main window height.


getReaderClass

public java.lang.String getReaderClass()
Returns the class name of the reader class.


getReaderClassParameter

public java.lang.String getReaderClassParameter()
Returns the string parameter (if any) for the reader constructor.


getReaderColor

public java.awt.Color getReaderColor()
Returns the background color for the reader's text.


getDateFormat

public java.lang.String getDateFormat()
Returns format string to use for the caption date information.


getEmptyCaption

public java.lang.String getEmptyCaption()
Returns the caption text indicating no message is being displayed.


getAnsweredCaption

public java.lang.String getAnsweredCaption()
Returns the caption text indicating the displayed message has been answered.


getReadCaption

public java.lang.String getReadCaption()
Returns the caption text indicating the displayed message has been read.


getUnreadCaption

public java.lang.String getUnreadCaption()
Returns the caption text indicating the displayed message has been neither read nor answered.


getDefaultSubject

public java.lang.String getDefaultSubject()
Returns the subject text for system-generated messages.


getDefaultCaption

public java.lang.String getDefaultCaption()
Returns the caption text indicating the displayed was generated by the system.


getDefaultText

public java.lang.String getDefaultText()
Returns the message text for system-generated messages.


getArchiveSubject

public java.lang.String getArchiveSubject()
Returns the subject text for message histories.


getArchiveCaption

public java.lang.String getArchiveCaption()
Returns the caption text indicating the message history is being displayed.


getEmptyArchiveText

public java.lang.String getEmptyArchiveText()
Returns the message text for message histories with no messages.


getBlankText

public java.lang.String getBlankText()
Returns the message text for incoming messages with no text.


getComposerClass

public java.lang.String getComposerClass()
Returns the class name of the composer class.


getComposerClassParameter

public java.lang.String getComposerClassParameter()
Returns the string parameter (if any) for the composer constructor.


getComposerIBar

public boolean getComposerIBar()
Returns true if the composer cursor should be an IBar. If false, the composer cursor should be the same as the desktop cursor.


getSubjectField

public boolean getSubjectField()
Returns true if the composer should contain a control for editing the message subject.


getComposerColor

public java.awt.Color getComposerColor()
Returns the background color for the composer's text.


getCaretColor

public java.awt.Color getCaretColor()
Returns the color of the composer caret rectangle.


getCaretWidth

public int getCaretWidth()
Returns the number of pixels in the width of the composer caret rectangle.


getCaretBlink

public int getCaretBlink()
Returns number of milliseconds between showing and hiding the composer caret rectangle.


getDragMode

public int getDragMode()
Returns the constant indicating the behavior to exhibit when the mouse is dragged through the message text. One of: DRAG_SELECT, DRAG_UP or DRAG_DOWN.


getInitiateCaption

public java.lang.String getInitiateCaption()
Returns the text color for the caption indicating the composed message is not a response to a buddy message.


getResponseCaption

public java.lang.String getResponseCaption()
Returns the caption text colorindicating the composed message is a response to a buddy message.


getInitialHandlerClass

public java.lang.String getInitialHandlerClass()
Returns the class name of the handler that represents a controller "start" state.


getTALLoggerClass

public java.lang.String getTALLoggerClass()
Returns the subclass of TALLogger to use for controller logging.


getLoggerClass

public java.lang.String getLoggerClass()
Returns the class name of the logger to give to LoggerProxy.


getLoggerParam

public java.lang.String getLoggerParam()
Returns the class name of the handler that represents a controller "start" state.


talx x1.0.5

© 2001-2005 University of Oregon.
Eugene OR 97403, U.S.A. All Rights Reserved.