net.japanesechess.psn
Class PsnFileProcessor
java.lang.Object
net.japanesechess.psn.PsnFileProcessor
public class PsnFileProcessor
- extends java.lang.Object
Handles loading, modifying, saving and processing PSN files.
- Author:
- T. Gene Davis
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
psn
private PsnFile psn
sr
private ShogiRecord sr
workingPly
private ShogiPly workingPly
parsingPly
private boolean parsingPly
parsingComment
private boolean parsingComment
notation
private java.lang.StringBuffer notation
comment
private java.lang.StringBuffer comment
nestedMoves
private int nestedMoves
fd
java.awt.FileDialog fd
fdSave
private java.awt.FileDialog fdSave
PsnFileProcessor
public PsnFileProcessor()
loadPsn
public PsnFile loadPsn()
parsePlies
private void parsePlies(java.lang.String line)
- Extracts comments and notation from each line and creates plies from it.
- numbering moves or plies with a number followed by a number and a decimal point is optional, and ignored completely during parsing
- '{}' is a general purpose comment
- '()' is a special use comment for showing the results of alternate move choices Nesting is allowed
- Parameters:
line -
addAttribute
private void addAttribute(java.lang.String line)
selectFile
private java.io.File selectFile()
savePsn
public void savePsn(java.awt.Frame frm,
ShogiRecord sr)
savePsn
public void savePsn(ShogiRecord sr)
saveOrAppend
private void saveOrAppend(java.awt.Frame frm,
java.lang.String text)