001: /*
002: * Gruntspud
003: *
004: * Copyright (C) 2002 Brett Smith.
005: *
006: * Written by: Brett Smith <t_magicthize@users.sourceforge.net>
007: *
008: * This program is free software; you can redistribute it and/or
009: * modify it under the terms of the GNU Library General Public License
010: * as published by the Free Software Foundation; either version 2 of
011: * the License, or (at your option) any later version.
012: * This program is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
015: * GNU Library General Public License for more details.
016: *
017: * You should have received a copy of the GNU Library General Public
018: * License along with this program; if not, write to the Free Software
019: * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
020: */
021:
022: package gruntspud.project;
023:
024: import java.io.File;
025: import java.io.IOException;
026:
027: /**
028: * Description of the Class
029: *
030: *@author magicthize
031: *@created 26 May 2002
032: */
033: public class Project {
034:
035: private String name;
036: private File home;
037: private String description;
038: private File canonicalHome;
039: private String defaultFilter;
040: private boolean flatMode;
041:
042: public Project(String name) {
043: this .name = name;
044: }
045:
046: public String getName() {
047: return name;
048: }
049:
050: public String getDescription() {
051: return description;
052: }
053:
054: public File getHome() {
055: return home;
056: }
057:
058: public File getCanonicalHome() {
059: return canonicalHome;
060: }
061:
062: public void setName(String name) {
063: this .name = name;
064: }
065:
066: public void setDescription(String description) {
067: this .description = description;
068: }
069:
070: public void setHome(File home) {
071: this .home = home;
072: if (home == null)
073: canonicalHome = null;
074: else {
075: try {
076: canonicalHome = home.getCanonicalFile();
077: } catch (IOException ioe) {
078:
079: }
080: }
081: }
082:
083: public void setDefaultFilter(String defaultFilter) {
084: this .defaultFilter = defaultFilter;
085: }
086:
087: public String getDefaultFilter() {
088: return defaultFilter;
089: }
090:
091: public boolean isFlatMode() {
092: return flatMode;
093: }
094:
095: public void setFlatMode(boolean flatMode) {
096: this .flatMode = flatMode;
097: }
098:
099: public String toString() {
100: return getName();
101: }
102: }
|