edu.stanford.smi.protegex.owl.ui.code
Class OWLTextFormatter

java.lang.Object
  extended byedu.stanford.smi.protegex.owl.ui.code.OWLTextFormatter

public class OWLTextFormatter
extends Object

A static utility class for JTextComponents with specific features to edit OWL expressions in the compact syntax.

Author:
Holger Knublauch

Nested Class Summary
private static class OWLTextFormatter.InsertAction
           
 
Field Summary
private static String[][] charMap
           
private static OWLClassDisplay display
           
private static Hashtable symbolMap
           
 
Constructor Summary
OWLTextFormatter()
           
 
Method Summary
static String getDisplayString(String str)
           
static String getParseableString(String str)
          Deprecated. Moved to CompactParserUtil - this method is no longer needed as it will be called by the parser on the fly
static void initKeymap(JTextComponent textComponent)
           
static void updateSyntax(JTextComponent textComponent)
          Replaces all occurences of special symbols with the corresponding unicode symbols.
static void updateSyntax(JTextComponent textComponent, OWLModel owlModel)
          Replaces all occurences of special symbols with the corresponding unicode symbols.
static void updateSyntax(JTextComponent textComponent, OWLModel owlModel, Map smap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

display

private static OWLClassDisplay display

charMap

private static final String[][] charMap

symbolMap

private static final Hashtable symbolMap
Constructor Detail

OWLTextFormatter

public OWLTextFormatter()
Method Detail

getDisplayString

public static String getDisplayString(String str)

getParseableString

public static String getParseableString(String str)
Deprecated. Moved to CompactParserUtil - this method is no longer needed as it will be called by the parser on the fly


initKeymap

public static void initKeymap(JTextComponent textComponent)

updateSyntax

public static void updateSyntax(JTextComponent textComponent)
Replaces all occurences of special symbols with the corresponding unicode symbols.


updateSyntax

public static void updateSyntax(JTextComponent textComponent,
                                OWLModel owlModel)
Replaces all occurences of special symbols with the corresponding unicode symbols.


updateSyntax

public static void updateSyntax(JTextComponent textComponent,
                                OWLModel owlModel,
                                Map smap)