|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.iface.domain.DomainWriter
public abstract class DomainWriter
An object that writes a domain description in textual form.
Nested Class Summary | |
---|---|
protected static class |
DomainWriter.DomainWriterWrapper
Class used to wrap a FileSyntax as a DomainWriter. |
Constructor Summary | |
---|---|
DomainWriter()
|
Method Summary | |
---|---|
protected static DomainWriter |
makeWriter(java.io.File file)
Factory method that returns an appropriate writer for the indicated file, based on the file's type or extension. |
static java.io.File |
saveDomain(java.awt.Component parentComponent,
Domain domain)
Writes a description of a domain to a file selected by the user, conducting all necessary dialogs along the way. |
static java.io.File |
saveDomain(java.awt.Component frame,
Domain domain,
java.io.File domainName)
Writes a description of the domain to the specified file. |
abstract void |
writeDomain(Domain domain)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DomainWriter()
Method Detail |
---|
public abstract void writeDomain(Domain domain) throws java.io.IOException
java.io.IOException
protected static DomainWriter makeWriter(java.io.File file) throws java.io.IOException
DomainParser.getLibraryDirectory()
is used. Here's how it might be used:
File domainName = ...; Domain domain = ...; ... try { DomainWriter.makeWriter(domainName).writeDomain(domain); } catch (IOException e) { ... }
java.io.IOException
public static java.io.File saveDomain(java.awt.Component parentComponent, Domain domain)
null
.
The output syntax is a function of the file's type as
understood by makeWriter(File)
.
parentComponent
- determines the Frame in which dialogs
are displayed.domain
- the Domain to save
null
makeWriter(File)
public static java.io.File saveDomain(java.awt.Component frame, Domain domain, java.io.File domainName)
saveDomain(Component, Domain)
but without
allowing the user to select the file.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |