org.prorefactor.treeparser
Class FieldContainer

java.lang.Object
  extended by org.prorefactor.treeparser.Symbol
      extended by org.prorefactor.treeparser.Widget
          extended by org.prorefactor.treeparser.FieldContainer
All Implemented Interfaces:
Xferable, SymbolI, WidgetI
Direct Known Subclasses:
Browse, Frame

public abstract class FieldContainer
extends Widget

Frame and Browse widgets are FieldContainers. This class provides the services for looking up fields/variables in a Frame or Browse.


Field Summary
 
Fields inherited from interface org.prorefactor.treeparser.SymbolI
NAME_ORDER
 
Constructor Summary
protected FieldContainer()
          Only to be used for persistence/serialization.
  FieldContainer(java.lang.String name, SymbolScope scope)
           
 
Method Summary
 void addStatement(JPNode node)
          Add a statement node to the list of statements which operate on this FieldContainer.
 void addSymbol(Symbol symbol, boolean statementIsEnabler)
          Add a FieldBuffer or Variable to this Frame or Browse object.
 java.util.ArrayList<Symbol> getAllFields()
          Get the fields and variables in the frame.
 java.util.ArrayList<Symbol> getAllFieldsAndWidgets()
          Combines getAllFields() with all other widgets in the FieldContainer.
 java.util.ArrayList<Symbol> getEnabledFields()
          Get the enabled fields and variables in the frame.
 java.util.ArrayList<JPNode> getStatementList()
          Get the list of nodes for the statements which operate on this FieldContainer.
 Symbol lookupFieldOrVar(Field.Name name)
          Check to see if a name matches a Variable or a FieldBuffer in this FieldContainer.
 void writeXferBytes(DataXferStream out)
          Implement Xferable.
 void writeXferSchema(DataXferStream out)
          Implement Xferable.
 
Methods inherited from class org.prorefactor.treeparser.Widget
fullName
 
Methods inherited from class org.prorefactor.treeparser.Symbol
copyBare, getAllRefsCount, getAsNode, getDefineNode, getIndirectDefineIdNode, getLikeNode, getName, getNumReads, getNumWrites, getProgressType, getScope, isExported, isImported, noteReference, setAsNode, setDefOrIdNode, setLikeNode, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.prorefactor.treeparser.SymbolI
getAllRefsCount, getAsNode, getDefineNode, getIndirectDefineIdNode, getLikeNode, getName, getNumReads, getNumWrites, getProgressType, getScope, isExported, isImported, noteReference, setAsNode, setDefOrIdNode, setLikeNode, setName
 

Constructor Detail

FieldContainer

protected FieldContainer()
Only to be used for persistence/serialization.


FieldContainer

public FieldContainer(java.lang.String name,
                      SymbolScope scope)
Method Detail

addStatement

public void addStatement(JPNode node)
Add a statement node to the list of statements which operate on this FieldContainer. Intended to be used by the tree parser only.


addSymbol

public void addSymbol(Symbol symbol,
                      boolean statementIsEnabler)
Add a FieldBuffer or Variable to this Frame or Browse object. Intended to be used by the tree parser only. The tree parser passes 'true' for ENABLE|UPDATE|PROMPT-FOR.


getAllFields

public java.util.ArrayList<Symbol> getAllFields()
Get the fields and variables in the frame. The entries in the return list are of type Variable and/or FieldBuffer.


getAllFieldsAndWidgets

public java.util.ArrayList<Symbol> getAllFieldsAndWidgets()
Combines getAllFields() with all other widgets in the FieldContainer.


getEnabledFields

public java.util.ArrayList<Symbol> getEnabledFields()
Get the enabled fields and variables in the frame. The entries in the return list are of type Variable and/or FieldBuffer.


getStatementList

public java.util.ArrayList<JPNode> getStatementList()
Get the list of nodes for the statements which operate on this FieldContainer.


lookupFieldOrVar

public Symbol lookupFieldOrVar(Field.Name name)
Check to see if a name matches a Variable or a FieldBuffer in this FieldContainer. Used by the tree parser at the INPUT function for resolving the name reference.


writeXferBytes

public void writeXferBytes(DataXferStream out)
                    throws java.io.IOException
Implement Xferable.

Specified by:
writeXferBytes in interface Xferable
Overrides:
writeXferBytes in class Symbol
Throws:
java.io.IOException

writeXferSchema

public void writeXferSchema(DataXferStream out)
                     throws java.io.IOException
Implement Xferable.

Specified by:
writeXferSchema in interface Xferable
Overrides:
writeXferSchema in class Symbol
Throws:
java.io.IOException


Copyright © 2008 Joanju Software. All Rights Reserved.