Class OutcomeStructure

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
DataRecord, Dimension, Field

public abstract class OutcomeStructure extends JPanel
See Also:
  • Field Details

    • helpIconSmall

      public static ImageIcon helpIconSmall
  • Constructor Details

    • OutcomeStructure

      public OutcomeStructure(org.exolab.castor.xml.schema.ElementDecl model, boolean readOnly, HashMap<String,Class<?>> specialControls)
  • Method Details

    • getReadOnly

      public boolean getReadOnly()
    • createStructure

      public OutcomeStructure createStructure(org.exolab.castor.xml.schema.ElementDecl model, boolean readOnly) throws OutcomeException
      Contains the rules for deciding which OutcomeStructure will represent a chosen Element Declaration. In this order
      1. if maxOccurs>1 then Dimension
      2. SimpleTypes are Fields
      3. No element children is a Field
      4. Everything else is a DataRecord
      Throws:
      OutcomeException
    • enumerateElements

      public void enumerateElements(org.exolab.castor.xml.schema.ContentModelGroup group) throws OutcomeException
      Extracts child Element declarations from a content group and recursively from any group (not Element) of that group. calls createStructure() to find the corresponding OutcomeStructure then adds it to this structure.
      Throws:
      OutcomeException
    • addStructure

      public void addStructure(OutcomeStructure newElement) throws OutcomeException
      Adds a generated OutcomeStructure as a child of this one. A separate structure as is often overridden.
      Throws:
      OutcomeException
    • addInstance

      public abstract void addInstance(Element myElement, Document parentDoc) throws OutcomeException
      After schema processing, addInstance() propogates the XML instance document down the layout. Most OutcomeStructures will throw an exception if called more than once, except Dimension, which is the only Outcome Structure to support maxOccurs>1
      Throws:
      OutcomeException
    • getElement

      public Element getElement()
    • getName

      public String getName()
      Overrides:
      getName in class Component
    • getModel

      public org.exolab.castor.xml.schema.ElementDecl getModel()
    • getHelp

      public String getHelp()
    • makeLabel

      public static JLabel makeLabel(String name, String helpText)
    • validateStructure

      public String validateStructure()
    • initNew

      public abstract Element initNew(Document parent)
    • extractHelp

      public static String extractHelp(org.exolab.castor.xml.schema.Annotated model)
    • grabFocus

      public abstract void grabFocus()
      Overrides:
      grabFocus in class JComponent
    • getJavaClass

      public static Class<?> getJavaClass(int typeCode)
    • getTypedValue

      public static Object getTypedValue(String value, Class<?> type)
    • isEmpty

      public static boolean isEmpty(Object value)