Back to index

wims  3.65+svn20090927
Public Member Functions | Package Attributes | Private Member Functions | Private Attributes
WIMSchem.ds.DataSheetCache Class Reference
Collaboration diagram for WIMSchem.ds.DataSheetCache:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DataSheetCache ()
boolean CanUndo ()
boolean CanRedo ()
void CacheUndo (DataSheet DS)
DataSheet PerformUndo (DataSheet Cur)
DataSheet PerformRedo (DataSheet Cur)

Package Attributes

Stack< String > redo = new Stack<String>()

Private Member Functions

String ToString (DataSheet DS)
DataSheet FromString (String StrDS)

Private Attributes

final int MAX_UNDO = 10
Stack< String > undo = new Stack<String>()

Detailed Description

Definition at line 25 of file DataSheetCache.java.


Constructor & Destructor Documentation

Definition at line 30 of file DataSheetCache.java.

    {
    }

Member Function Documentation

Definition at line 41 of file DataSheetCache.java.

    {
       String str=ToString(DS);
       undo.push(str);
       while (undo.size()>MAX_UNDO) undo.remove(0);
       redo.clear();
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 35 of file DataSheetCache.java.

{return !redo.empty();}

Here is the caller graph for this function:

Definition at line 34 of file DataSheetCache.java.

{return !undo.empty();}

Here is the caller graph for this function:

DataSheet WIMSchem.ds.DataSheetCache.FromString ( String  StrDS) [inline, private]

Definition at line 71 of file DataSheetCache.java.

    {
       DataSheet ds=null;
       try
       {
           if (DataSheetStream.ExamineIsXMLDS(new BufferedReader(new StringReader(StrDS))))
              ds=DataSheetStream.ReadXML(new BufferedReader(new StringReader(StrDS)));
       }
       catch (IOException e) {e.printStackTrace();}
       return ds;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 56 of file DataSheetCache.java.

    {
       if (redo.empty()) return null;
       undo.push(ToString(Cur));
       return FromString(redo.pop());
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 49 of file DataSheetCache.java.

    {
       if (undo.empty()) return null;
       redo.push(ToString(Cur));
       return FromString(undo.pop());
    }

Here is the call graph for this function:

Here is the caller graph for this function:

String WIMSchem.ds.DataSheetCache.ToString ( DataSheet  DS) [inline, private]

Definition at line 63 of file DataSheetCache.java.

    {
       StringWriter sw=new StringWriter();
       try {DataSheetStream.WriteXML(new BufferedWriter(sw),DS);}
       catch (IOException e) {return null;}
       return sw.toString();
    }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

final int WIMSchem.ds.DataSheetCache.MAX_UNDO = 10 [private]

Definition at line 27 of file DataSheetCache.java.

Stack<String> WIMSchem.ds.DataSheetCache.redo = new Stack<String>() [package]

Definition at line 28 of file DataSheetCache.java.

Stack<String> WIMSchem.ds.DataSheetCache.undo = new Stack<String>() [private]

Definition at line 28 of file DataSheetCache.java.


The documentation for this class was generated from the following file: