net.sourceforge.nite.gui.util
Class ConcreteDisplayElement

java.lang.Object
  extended by net.sourceforge.nite.gui.util.ConcreteDisplayElement
All Implemented Interfaces:
AbstractDisplayElement

public class ConcreteDisplayElement
extends java.lang.Object
implements AbstractDisplayElement

See also AbstractDisplayElement, AbstractCallableToolConfig and NXTConfig class. It's common for elements in tools to have a specific element they are displaying or creating and a type which is either an enumerated attribute or a pointer into a type ontology. This is the simplest possible implementation of the AbstractDisplayElement interface.

Author:
Jonathan Kilgour, UEdin

Constructor Summary
ConcreteDisplayElement(java.lang.String elname, java.lang.String attr, java.lang.String deft, java.lang.String root, java.lang.String role, java.lang.String gloss, java.lang.String longname, java.lang.String shortname)
          Convenience class for displays of specific elements.
 
Method Summary
 java.lang.String getElementName()
          Return the name of the element this display is predominantly designed for displaying or creating.
 java.lang.String getElementNameLong()
          Return the full name of the element this display is predominantly designed for displaying or creating: can be multiple words e.g.
 java.lang.String getElementNameShort()
          Return the short name of the element this display is predominantly designed for displaying or creating: e.g.
 java.lang.String getEnumeratedTypeAttribute()
          Return the name of the enumerated attribute that is used for the type (only required to be set if typeIsEnumeratedVariable() is true).
 java.lang.String getTypeDefault()
          If the type is an enumerated attribute, this is the String value of the default; if the type is an ontology this is the ID of the default type element.
 java.lang.String getTypeGloss()
          Return the name of the attribute on elements of the type ontology that give a 'gloss' of their meaning
 java.lang.String getTypeOntologyRoot()
          Return the name of the root element of the type ontology
 java.lang.String getTypeRole()
          Return the role of the pointer from the base element into the type ontology
 boolean typeIsEnumeratedVariable()
          true if the type is an enumerated attribute; false if the type is a pointer to an ontology.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcreteDisplayElement

public ConcreteDisplayElement(java.lang.String elname,
                              java.lang.String attr,
                              java.lang.String deft,
                              java.lang.String root,
                              java.lang.String role,
                              java.lang.String gloss,
                              java.lang.String longname,
                              java.lang.String shortname)
Convenience class for displays of specific elements. Simply holds incormation about an element with a type that's either an enumerated attribute or a pointer into a type ontology.

Method Detail

getElementName

public java.lang.String getElementName()
Return the name of the element this display is predominantly designed for displaying or creating.

Specified by:
getElementName in interface AbstractDisplayElement

getElementNameLong

public java.lang.String getElementNameLong()
Return the full name of the element this display is predominantly designed for displaying or creating: can be multiple words e.g. "Dialogue Act".

Specified by:
getElementNameLong in interface AbstractDisplayElement

getElementNameShort

public java.lang.String getElementNameShort()
Return the short name of the element this display is predominantly designed for displaying or creating: e.g. "DA"

Specified by:
getElementNameShort in interface AbstractDisplayElement

typeIsEnumeratedVariable

public boolean typeIsEnumeratedVariable()
true if the type is an enumerated attribute; false if the type is a pointer to an ontology.

Specified by:
typeIsEnumeratedVariable in interface AbstractDisplayElement

getEnumeratedTypeAttribute

public java.lang.String getEnumeratedTypeAttribute()
Return the name of the enumerated attribute that is used for the type (only required to be set if typeIsEnumeratedVariable() is true).

Specified by:
getEnumeratedTypeAttribute in interface AbstractDisplayElement

getTypeRole

public java.lang.String getTypeRole()
Return the role of the pointer from the base element into the type ontology

Specified by:
getTypeRole in interface AbstractDisplayElement

getTypeOntologyRoot

public java.lang.String getTypeOntologyRoot()
Return the name of the root element of the type ontology

Specified by:
getTypeOntologyRoot in interface AbstractDisplayElement

getTypeGloss

public java.lang.String getTypeGloss()
Return the name of the attribute on elements of the type ontology that give a 'gloss' of their meaning

Specified by:
getTypeGloss in interface AbstractDisplayElement

getTypeDefault

public java.lang.String getTypeDefault()
If the type is an enumerated attribute, this is the String value of the default; if the type is an ontology this is the ID of the default type element.

Specified by:
getTypeDefault in interface AbstractDisplayElement