import java.io.*;


class SwArchive
{
	/** nazwa pliku */
	String m_sFileName = null;
	/** plik */
	File m_cFile=null;
	/** tryb archiwizacji */
	int m_nMode = SwConst.FILE_OPEN;
	/** czy otwierac okno wyboru*/
	boolean m_bShowDialog=true;
  /** znacznik, ze zostal wybrany plik*/
	File m_cCurrDir = null;
  boolean m_bSelected=false;
	
	public SwArchive() {};
		
	public SwArchive(String sFileName)
	{
	   m_sFileName = sFileName;	
	}
      public SwArchive(String sFileName, int nMode)
	{
	   m_sFileName = sFileName;	
	   m_nMode=nMode; 
	}
  public SwArchive(int nMode)
	{
         m_nMode=nMode; 
	}

	
  public SwArchive(String sFileName, int nMode, boolean bShowDialog )
	{
	   m_sFileName = sFileName;	
	   m_nMode=nMode; 
         m_bShowDialog = bShowDialog;	   
	}
	
	/** czy tryb zapisywania*/
	public boolean IsStoring()
	{
		return m_nMode==SwConst.FILE_SAVE;
	}
	/** czy tryb otwierania */
	public boolean IsOpening()
	{
		return m_nMode==SwConst.FILE_OPEN;
	}
	
	
	public void SetSelected(boolean bSelected)
	{
		m_bSelected = bSelected;
	}
	public boolean IsSelected()
	{
	  return m_bSelected;	
	}
	public void SetFile(File cFile)
	{
		m_cFile = cFile;
	}
	public File GetFile()
	{
	   return m_cFile;	
	}
	public String GetPath()
	{
	    if (m_cFile!=null)
	        return m_cFile.getPath();
		else
			return null;
	}
	/** ustalenie roboczego katalog  */
	public void SetDir(File cCurrDir)
	{
		m_cCurrDir = cCurrDir;
	}
	public File GetDir()
	{
	  return m_cCurrDir;	
	}
}