SearchResultsFileNodeUserObject.java :  » IDE » Schmortopf » Schmortopf » SearchResults » Java Open Source

Java Open Source » IDE » Schmortopf 
Schmortopf » Schmortopf » SearchResults » SearchResultsFileNodeUserObject.java
package Schmortopf.SearchResults;


  /**                
   *   DataContainer used for the file nodes of the SearchResultsTree.
   *
   *   The filePathName identifies the node, but for having shorter
   *   texts, only the filename is displayed as node name.
   *
   */


import Schmortopf.FileComponents.Model.EditableLeafObject;


public class SearchResultsFileNodeUserObject
{
                       
  private EditableLeafObject editableLeafObject; // can be from projects or libraries tree
  private String filePathName;
  private String fileName;
  private boolean isProjectFileNode;
       


  public SearchResultsFileNodeUserObject( EditableLeafObject editableLeafObject,
                                          final String filePathName,
                                          final String fileName,
                                          final boolean isProjectFileNode )
  {
    this.editableLeafObject = editableLeafObject;
    this.filePathName = filePathName;
    this.fileName = fileName;
    this.isProjectFileNode = isProjectFileNode;
  }



  public EditableLeafObject getEditableLeafObject()
  {
     return this.editableLeafObject;
  }


  public String getFilePathName()
  {
    return this.filePathName;
  }

  public String getFileName()
  {
    return this.fileName;
  }


 /**
  *  Tells you, whether the associated file is a project file,
  *  or a library file.
  */
  public boolean getBelongsToProject()
  {
    return this.isProjectFileNode;
  }
   
   
 /**
  *  GC assistance
  */
  public void freeMemory()
  {               
    this.editableLeafObject = null;
    this.filePathName = null;
    this.fileName = null;
  }
        


}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.