project35.tabletDeployment
Class FileSpaceRegistry

java.lang.Object
  extended by project35.tabletDeployment.FileSpaceRegistry

public class FileSpaceRegistry
extends java.lang.Object

Keeps track of which files are currently open. FileSpaceRegistry keeps track of fileSpace name - dialog associations, and helps determine the name of new fileSpaces that haven't been populated with a file.


Copyright (c) 2008 Kevin Garwood for Project35. The original code was developed by Kevin Garwood for the University of Manchester. Revisions have been made for Project35, a project that is independent of that institution. This code is licensed under the Academic Free License version 3.0. The code attribution for the original code is included here:

Copyright (c) Kevin Garwood and University of Manchester 2007. All rights reserved. Licensed under the Academic Free License version 3.0. For more information on the terms and conditions, please see the file "LICENSE" that is included in this distribution.


Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)

Constructor Summary
FileSpaceRegistry()
           
 
Method Summary
 void clearList()
           
 void deregisterFileSpace(FileSpace fileSpace)
           
 boolean fileAlreadyOpen(java.io.File targetFile)
          determines whether the file is already open.
 FileSpace getCurrentFileSpace()
           
 FileSpace getFileSpace(java.lang.String targetFileName)
           
 java.util.ArrayList getFileSpaceList()
           
 boolean isFirstFileSpace()
          determines whether the first file space has been used.
 void registerFileSpaceWithExistingFile(FileSpace fileSpace)
           
 void registerFileSpaceWithNewFile(RecordModel currentRecordModel)
          creates a name of the format: "Untitled + n" where n is the nth dialog created during the session.
 void setCurrentFileName(java.lang.String fileName)
           
 void setCurrentFileSpace(FileSpace currentFileSpace)
           
 void setFirstFileSpace(boolean isFirstFileSpace)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSpaceRegistry

public FileSpaceRegistry()
Method Detail

getCurrentFileSpace

public FileSpace getCurrentFileSpace()

isFirstFileSpace

public boolean isFirstFileSpace()
determines whether the first file space has been used. This is used in TPD's openFile policy. The first file a user opens will replace the Untitled1.pdz file. All other files that are opened will be listed in the windows menu


getFileSpaceList

public java.util.ArrayList getFileSpaceList()

fileAlreadyOpen

public boolean fileAlreadyOpen(java.io.File targetFile)
determines whether the file is already open. This is used to prevent TPD from opening more than one instance of the same file


getFileSpace

public FileSpace getFileSpace(java.lang.String targetFileName)

setCurrentFileName

public void setCurrentFileName(java.lang.String fileName)

setFirstFileSpace

public void setFirstFileSpace(boolean isFirstFileSpace)

setCurrentFileSpace

public void setCurrentFileSpace(FileSpace currentFileSpace)

registerFileSpaceWithExistingFile

public void registerFileSpaceWithExistingFile(FileSpace fileSpace)

registerFileSpaceWithNewFile

public void registerFileSpaceWithNewFile(RecordModel currentRecordModel)
creates a name of the format: "Untitled + n" where n is the nth dialog created during the session. All other open fileSpaces are updated to reflect the creation of the new dialog showing the file


deregisterFileSpace

public void deregisterFileSpace(FileSpace fileSpace)

clearList

public void clearList()