com.jFormTK
Class JMessageTopic

java.lang.Object
  extended by com.jFormTK.JMessageTopic
All Implemented Interfaces:
JConstants

public class JMessageTopic
extends java.lang.Object
implements JConstants

        This class is designed to hold a collection of JMessage Strings based on
        a Specific Application Topic. Each String is called an 'item' and each item 
        consist of an item name and the item Message String.
  
        In the 'jFormTK' Kernel there is one instance of 'JMessageTopic'
        hosted by the 'jFormTK.AppDB' Class instance.
 
        For the "Professional Compuer Solutions [PCS] "Survivors List Plus" Application
        the "Topic" is SLPlus Definitions. Throughout the SLPlus processing various
        "Definitions" are added to the AppDB hosted JMessageTopic instance.
 
        When a 'jFormTK' 'JFormForm' subclass [Form] is required to provide the
        End User with the current "Definition" set, a 'JFormField' Class with a _CField
        type has it's items loaded from the AppDB.JMessageText instance.
 
        The selected item, e.g. a Definition, is displayed when the Application End User 
        double clicks an item...
        

Version:
1.00, 30 Jul 2003
Author:
Jim Crowell
Professional Computer Solutions [PCS]
URL: http://jFormTK.com/
E-Mail: JimCrowell@EMail.com

Copyright (c) 2005 by Professional Computer Solutions [PCS]
All Rights Reserved

Field Summary
 
Fields inherited from interface com.jFormTK.JConstants
__, _AB, _AB_, _AField, _B, _BField, _CField, _CIField, _DField, _EU_, _H, _HEIGHT, _HEIGHT_INV, _HField, _I, _IField, _LField, _MField, _NField, _NotRequired, _PField, _PIField, _QField, _Required, _RField, _TAField, _TField, _WIDTH, _WIDTH_INV, _XField, AB, APP_TRACE_FOCUS, APP_TRACE_GET, APP_TRACE_SET, B_, BAR, BAR_, BB, BH, BI, BREAKPOINT_FOCUS, BREAKPOINT_GET, BREAKPOINT_SET, BVB, C_QUOTE, CLOSE, CLOSE_BRACKET, COLORS_DELIMITER, COMMA, COMMA_, D_ELEMENT, D_ELEMENT_N, D_ELEMENT_N1, D_ELEMENT_N2, D_ELEMENT_N3, D_FIELDS, D_FIELDS_N, D_FIELDS_N1, D_FIELDS_N2, D_FIELDS_N3, D_ITEMS, DASH, DOT, EOL, EOP, EOS, FIELD_TRACE_FOCUS, FIELD_TRACE_GET, FIELD_TRACE_SET, FONT_DELIMITER, H_, HB, HH, HI, I_, IB, IH, II, JLAF_DELIMITER, LF, LISTBRACKET, NO, OPEN, OPEN_BRACKET, pCheckboxGroup, QUOTE, SPACE_, TAB, YES
 
Constructor Summary
JMessageTopic()
           Constructor.
 
Method Summary
 void addItem(java.lang.String itemIn, java.lang.String message)
          Add an item to the 'items' Vector.
 java.lang.String getItemsText()
          Construct and return a String of the current 'items' Vector Item Names delimited with the // * 'JFormTK.itemsDelimiter'...
 java.lang.String getMessage(java.lang.String itemNameIn)
          Get the message String associated with the given Item Name [itemNameIn]...
 java.lang.String getTitle()
          Return the Title String...
 void load(java.lang.String savedJMessageTopic)
          Reset the 'appDB.JMessageTopic' instance from the "Saved JMessageTopic' Control String...
 void setOrdered(boolean orderedFlag)
          Reset the Ordered Boolean Flag...
 void setTitle(java.lang.String titleIn)
          Reset the Title Parameter...
 void showJMessageTopic(java.lang.String from)
          Construct a Display String to present each item name / item text order pair's in a 'JFormFrame.message' Display.
 java.lang.String toString()
           Construct a 'JFormTKDB.itemsDelimiter' delimited String that may be used to re-load the current 'JMessageTopic' instance...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JMessageTopic

public JMessageTopic()
 Constructor. To initialize the following Class variables:
       - title String
       - ordered boolean flag.
       - items Vector designed to host each "Topic" String...
 

Method Detail

load

public void load(java.lang.String savedJMessageTopic)
Reset the 'appDB.JMessageTopic' instance from the "Saved JMessageTopic' Control String...

Parameters:
savedJMessageTopic - - String created by the *this*.toString Method when the 'jFormTK' Application is saved...

addItem

public void addItem(java.lang.String itemIn,
                    java.lang.String message)
Add an item to the 'items' Vector.

Parameters:
itemIn - - the items name, e.g. a SLPlus Definition name
message - - the Item annotation, e.g. a SLPlus Definition Text

getItemsText

public java.lang.String getItemsText()
Construct and return a String of the current 'items' Vector Item Names delimited with the // * 'JFormTK.itemsDelimiter'...

Returns:
the constructed String with item names delimited by the 'JFormTKDB.itemsDelimiter.

getTitle

public java.lang.String getTitle()
Return the Title String...

Returns:
the 'title' parameter for *this* JMessageTopic instance...

setTitle

public void setTitle(java.lang.String titleIn)
Reset the Title Parameter...

Parameters:
titleIn - - the new Title String

setOrdered

public void setOrdered(boolean orderedFlag)
Reset the Ordered Boolean Flag...

Parameters:
orderedFlag - - the new 'ordered' booloean value...

getMessage

public java.lang.String getMessage(java.lang.String itemNameIn)
Get the message String associated with the given Item Name [itemNameIn]...

Parameters:
itemNameIn - the item name to be fetched from *this* JMessageTopic instance...
Returns:
Message String for given Name...

toString

public java.lang.String toString()
 Construct a 'JFormTKDB.itemsDelimiter' delimited String that may be used
 to re-load the current 'JMessageTopic' instance...

 The 'savedJMessageTopic' format is as follows...
 field[0] - Title
 field[1] - ordered Flag [='t' OR 'f']
 field[2] - item name element at index = 0
 field[3] - items element at index = 1
 field[4] - items name element at index = 2
 field[5] - items element at index = 3
 etc...
 

Overrides:
toString in class java.lang.Object

showJMessageTopic

public void showJMessageTopic(java.lang.String from)
Construct a Display String to present each item name / item text order pair's in a 'JFormFrame.message' Display.

Parameters:
from - annotation as to what method envoked *this*.showJMessageTopic method...