org.txt2xml.gui
Class GuiModel

java.lang.Object
  |
  +--org.scopemvc.model.basic.BasicModel
        |
        +--org.txt2xml.gui.GuiModel
All Implemented Interfaces:
org.scopemvc.core.ModelChangeEventSource, org.scopemvc.core.ModelChangeListener, org.scopemvc.core.ModelChangeTypes

public class GuiModel
extends org.scopemvc.model.basic.BasicModel

Author:
Steve Meyfroidt

Field Summary
static org.scopemvc.core.Selector CONFIG_TEXT
           
static org.scopemvc.core.Selector DEST_TEXT
           
static org.scopemvc.core.Selector ERROR_MESSAGE
           
static org.scopemvc.core.Selector SOURCE_TEXT
           
 
Fields inherited from interface org.scopemvc.core.ModelChangeTypes
ACCESS_CHANGED, VALUE_ADDED, VALUE_CHANGED, VALUE_REMOVED
 
Constructor Summary
GuiModel()
           
 
Method Summary
 java.lang.String getConfigText()
           
 java.lang.String getDestText()
           
 java.lang.String getErrorMessage()
           
 java.lang.String getSourceText()
           
 void loadConfigFromFile(java.io.File file)
           
 void loadSourceFromFile(java.io.File file)
           
 void process()
          Create a Processor from the current config text and apply it to the current source text, putting the result into the dest text.
 void saveConfigToFile()
           
 void saveSourceToFile()
           
 void setConfigText(java.lang.String configText)
          Set a new config text and then process().
protected  void setDestText(java.lang.String destText)
           
protected  void setErrorMessage(java.lang.String errorMessage)
           
 void setSourceText(java.lang.String sourceText)
          Set a new source text and then process().
 
Methods inherited from class org.scopemvc.model.basic.BasicModel
addModelChangeListener, fireModelChange, listenNewSubmodel, makeActive, modelChanged, removeModelChangeListener, unlistenOldSubmodel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCE_TEXT

public static final org.scopemvc.core.Selector SOURCE_TEXT

CONFIG_TEXT

public static final org.scopemvc.core.Selector CONFIG_TEXT

DEST_TEXT

public static final org.scopemvc.core.Selector DEST_TEXT

ERROR_MESSAGE

public static final org.scopemvc.core.Selector ERROR_MESSAGE
Constructor Detail

GuiModel

public GuiModel()
Method Detail

getSourceText

public java.lang.String getSourceText()

setSourceText

public void setSourceText(java.lang.String sourceText)
Set a new source text and then process().


getConfigText

public java.lang.String getConfigText()

setConfigText

public void setConfigText(java.lang.String configText)
Set a new config text and then process().


getDestText

public java.lang.String getDestText()

setDestText

protected void setDestText(java.lang.String destText)

setErrorMessage

protected void setErrorMessage(java.lang.String errorMessage)

getErrorMessage

public java.lang.String getErrorMessage()

process

public void process()
Create a Processor from the current config text and apply it to the current source text, putting the result into the dest text. On any error, put the error message in errorMessage text.


loadSourceFromFile

public void loadSourceFromFile(java.io.File file)

loadConfigFromFile

public void loadConfigFromFile(java.io.File file)

saveSourceToFile

public void saveSourceToFile()

saveConfigToFile

public void saveConfigToFile()


Copyright 2002 Steve Meyfroidt. All Rights Reserved.