~ubuntu-branches/ubuntu/utopic/freemind/utopic

« back to all changes in this revision

Viewing changes to freemind/freemind/modes/HistoryInformation.java

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2010-01-03 14:19:19 UTC
  • mfrom: (2.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20100103141919-m5az7dkicy21hqop
Tags: 0.9.0~rc6+dfsg-1ubuntu1
* Merge from Debian unstable (LP: #182927), remaining changes:
  - debian/copyright: add license/copyright for
    freemind/freemind/main/ExampleFileFilter.java

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*FreeMind - A Program for creating and viewing Mindmaps
 
2
 *Copyright (C) 2000-2005  Joerg Mueller, Daniel Polansky, Christian Foltin and others.
 
3
 *
 
4
 *See COPYING for Details
 
5
 *
 
6
 *This program is free software; you can redistribute it and/or
 
7
 *modify it under the terms of the GNU General Public License
 
8
 *as published by the Free Software Foundation; either version 2
 
9
 *of the License, or (at your option) any later version.
 
10
 *
 
11
 *This program is distributed in the hope that it will be useful,
 
12
 *but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *GNU General Public License for more details.
 
15
 *
 
16
 *You should have received a copy of the GNU General Public License
 
17
 *along with this program; if not, write to the Free Software
 
18
 *Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
19
 *
 
20
 * Created on 05.07.2005
 
21
 */
 
22
/*$Id: HistoryInformation.java,v 1.1.2.1 2005/07/06 06:00:03 christianfoltin Exp $*/
 
23
package freemind.modes;
 
24
 
 
25
import java.util.Date;
 
26
 
 
27
/**
 
28
 * Here, the creation and modification times of objects (by now, only for
 
29
 * nodes) are stored.
 
30
 * 
 
31
 * The storage as longs is preferred as they are normally inlined by the Java
 
32
 * compiler.
 
33
 * 
 
34
 * @author foltin
 
35
 *
 
36
 */
 
37
public class HistoryInformation {
 
38
        long createdAt=0l;
 
39
        long lastModifiedAt=0l;
 
40
 
 
41
        /**
 
42
         * Initializes to today.
 
43
         */
 
44
        public HistoryInformation() {
 
45
                long now = new Date().getTime();
 
46
                createdAt = now;
 
47
                lastModifiedAt = now;
 
48
        }
 
49
        public HistoryInformation(Date createdAt, Date lastModifiedAt) {
 
50
                this.createdAt = createdAt.getTime();
 
51
                this.lastModifiedAt = lastModifiedAt.getTime();
 
52
        }
 
53
        public Date getCreatedAt() {
 
54
                return new Date(createdAt);
 
55
        }
 
56
        public Date getLastModifiedAt() {
 
57
                return new Date(lastModifiedAt);
 
58
        }
 
59
        public void setCreatedAt(Date createdAt) {
 
60
                this.createdAt = createdAt.getTime();
 
61
        }
 
62
        public void setLastModifiedAt(Date lastModifiedAt) {
 
63
                this.lastModifiedAt = lastModifiedAt.getTime();
 
64
        }
 
65
}
 
 
b'\\ No newline at end of file'