├── icons
├── hjt.icns
├── ico
│ ├── hjt.ico
│ └── jree.ico
├── jree.icns
├── png
│ ├── 16x16.png
│ ├── 24x24.hjt.png
│ ├── 24x24.jree.png
│ ├── 32x32.hjt.png
│ ├── 32x32.jree.png
│ ├── 48x48.hjt.png
│ ├── 48x48.jree.png
│ ├── 128x128.hjt.png
│ └── 128x128.jree.png
└── jreepadlogo-01.icns
├── images
├── Add16.gif
├── Back16.gif
├── Down16.gif
├── New16.gif
├── Open16.gif
├── Save16.gif
├── Up16.gif
├── Remove16.gif
├── Forward16.gif
├── InsertAfter16.gif
├── jreepad-icon.gif
├── InsertBefore16.gif
└── jreepadlogo-01-iconsize.gif
├── src
├── images
│ ├── Up16.gif
│ ├── Add16.gif
│ ├── Back16.gif
│ ├── Down16.gif
│ ├── New16.gif
│ ├── Open16.gif
│ ├── Save16.gif
│ ├── Forward16.gif
│ ├── Remove16.gif
│ ├── jreepad-icon.gif
│ ├── InsertAfter16.gif
│ ├── InsertBefore16.gif
│ └── jreepadlogo-01-iconsize.gif
└── jreepad
│ ├── jreepadmanifest
│ ├── TreePathCollection.java
│ ├── ui
│ ├── FontHelper.java
│ ├── ExtensionFileFilter.java
│ ├── SaveFileChooser.java
│ └── PasswordDialog.java
│ ├── editor
│ ├── HtmlViewer.java
│ ├── ContentChangeListener.java
│ ├── TextileViewer.java
│ ├── AbstractArticleView.java
│ ├── ArticleView.java
│ ├── EditorPaneView.java
│ ├── EditPopupHandler.java
│ ├── TableViewer.java
│ ├── TextTransferHandler.java
│ └── PlainTextEditor.java
│ ├── io
│ ├── JreepadReader.java
│ ├── JreepadWriter.java
│ ├── TreepadWriter.java
│ ├── EncryptedWriter.java
│ ├── EncryptedReader.java
│ ├── XmlWriter.java
│ ├── XmlReader.java
│ ├── TreepadReader.java
│ ├── HtmlWriter.java
│ └── AutoDetectReader.java
│ ├── JreepadTreeModel.java
│ ├── SoftLinkNode.java
│ ├── JreepadSearcher.java
│ ├── TreeView.java
│ ├── lang
│ ├── JreepadStrings_da.properties
│ └── JreepadStrings.properties
│ ├── JreepadNode.java
│ ├── find.java
│ └── SearchDialog.java
├── website
├── favicon.ico
├── jreepadlogo-01.icns
├── jreepadlogo-01.psd
├── images
│ ├── jreepadlogo-01.icns
│ ├── jreepadlogo-01.psd
│ ├── sflogo-rotated.png
│ ├── jreepad-icon-coen-32.gif
│ ├── jreepadlogo-01-iconsize.gif
│ └── jreepadlogo-01-logosize.gif
├── logo
│ ├── vote.php
│ └── index.php
├── jar
│ └── index.html
├── formats
│ └── index.htm
├── screenshots
│ └── index.html
├── developers
│ └── index.html
└── index.html
├── lib
├── JTextile-1.2.jar
├── jarbundler-1.9.jar
├── gnu-regexp-1.1.4-lib.jar
└── BrowserLauncher2-10rc4.jar
├── .project
├── .classpath
├── README.md
└── manual
└── osxreadme
└── Read me first.rtf
/icons/hjt.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/icons/hjt.icns
--------------------------------------------------------------------------------
/icons/ico/hjt.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/icons/ico/hjt.ico
--------------------------------------------------------------------------------
/icons/jree.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/icons/jree.icns
--------------------------------------------------------------------------------
/images/Add16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/images/Add16.gif
--------------------------------------------------------------------------------
/images/Back16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/images/Back16.gif
--------------------------------------------------------------------------------
/images/Down16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/images/Down16.gif
--------------------------------------------------------------------------------
/images/New16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/images/New16.gif
--------------------------------------------------------------------------------
/images/Open16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/images/Open16.gif
--------------------------------------------------------------------------------
/images/Save16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/images/Save16.gif
--------------------------------------------------------------------------------
/images/Up16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/images/Up16.gif
--------------------------------------------------------------------------------
/icons/ico/jree.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/icons/ico/jree.ico
--------------------------------------------------------------------------------
/icons/png/16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/icons/png/16x16.png
--------------------------------------------------------------------------------
/images/Remove16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/images/Remove16.gif
--------------------------------------------------------------------------------
/src/images/Up16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/src/images/Up16.gif
--------------------------------------------------------------------------------
/website/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/website/favicon.ico
--------------------------------------------------------------------------------
/images/Forward16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/images/Forward16.gif
--------------------------------------------------------------------------------
/lib/JTextile-1.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/lib/JTextile-1.2.jar
--------------------------------------------------------------------------------
/lib/jarbundler-1.9.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/lib/jarbundler-1.9.jar
--------------------------------------------------------------------------------
/src/images/Add16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/src/images/Add16.gif
--------------------------------------------------------------------------------
/src/images/Back16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/src/images/Back16.gif
--------------------------------------------------------------------------------
/src/images/Down16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/src/images/Down16.gif
--------------------------------------------------------------------------------
/src/images/New16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/src/images/New16.gif
--------------------------------------------------------------------------------
/src/images/Open16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/src/images/Open16.gif
--------------------------------------------------------------------------------
/src/images/Save16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/src/images/Save16.gif
--------------------------------------------------------------------------------
/icons/png/24x24.hjt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/icons/png/24x24.hjt.png
--------------------------------------------------------------------------------
/icons/png/24x24.jree.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/icons/png/24x24.jree.png
--------------------------------------------------------------------------------
/icons/png/32x32.hjt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/icons/png/32x32.hjt.png
--------------------------------------------------------------------------------
/icons/png/32x32.jree.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/icons/png/32x32.jree.png
--------------------------------------------------------------------------------
/icons/png/48x48.hjt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/icons/png/48x48.hjt.png
--------------------------------------------------------------------------------
/icons/png/48x48.jree.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/icons/png/48x48.jree.png
--------------------------------------------------------------------------------
/images/InsertAfter16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/images/InsertAfter16.gif
--------------------------------------------------------------------------------
/images/jreepad-icon.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/images/jreepad-icon.gif
--------------------------------------------------------------------------------
/src/images/Forward16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/src/images/Forward16.gif
--------------------------------------------------------------------------------
/src/images/Remove16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/src/images/Remove16.gif
--------------------------------------------------------------------------------
/icons/jreepadlogo-01.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/icons/jreepadlogo-01.icns
--------------------------------------------------------------------------------
/icons/png/128x128.hjt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/icons/png/128x128.hjt.png
--------------------------------------------------------------------------------
/icons/png/128x128.jree.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/icons/png/128x128.jree.png
--------------------------------------------------------------------------------
/images/InsertBefore16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/images/InsertBefore16.gif
--------------------------------------------------------------------------------
/src/images/jreepad-icon.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/src/images/jreepad-icon.gif
--------------------------------------------------------------------------------
/website/jreepadlogo-01.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/website/jreepadlogo-01.icns
--------------------------------------------------------------------------------
/website/jreepadlogo-01.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/website/jreepadlogo-01.psd
--------------------------------------------------------------------------------
/lib/gnu-regexp-1.1.4-lib.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/lib/gnu-regexp-1.1.4-lib.jar
--------------------------------------------------------------------------------
/src/images/InsertAfter16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/src/images/InsertAfter16.gif
--------------------------------------------------------------------------------
/src/images/InsertBefore16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/src/images/InsertBefore16.gif
--------------------------------------------------------------------------------
/lib/BrowserLauncher2-10rc4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/lib/BrowserLauncher2-10rc4.jar
--------------------------------------------------------------------------------
/images/jreepadlogo-01-iconsize.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/images/jreepadlogo-01-iconsize.gif
--------------------------------------------------------------------------------
/website/images/jreepadlogo-01.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/website/images/jreepadlogo-01.icns
--------------------------------------------------------------------------------
/website/images/jreepadlogo-01.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/website/images/jreepadlogo-01.psd
--------------------------------------------------------------------------------
/website/images/sflogo-rotated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/website/images/sflogo-rotated.png
--------------------------------------------------------------------------------
/src/jreepad/jreepadmanifest:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Created-By: Dan Stowell
3 | Main-Class: jreepad.JreepadViewer
4 |
5 |
--------------------------------------------------------------------------------
/src/images/jreepadlogo-01-iconsize.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/src/images/jreepadlogo-01-iconsize.gif
--------------------------------------------------------------------------------
/website/images/jreepad-icon-coen-32.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/website/images/jreepad-icon-coen-32.gif
--------------------------------------------------------------------------------
/website/images/jreepadlogo-01-iconsize.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/website/images/jreepadlogo-01-iconsize.gif
--------------------------------------------------------------------------------
/website/images/jreepadlogo-01-logosize.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danstowell/jreepad/HEAD/website/images/jreepadlogo-01-logosize.gif
--------------------------------------------------------------------------------
/src/jreepad/TreePathCollection.java:
--------------------------------------------------------------------------------
1 | package jreepad;
2 |
3 | import javax.swing.tree.TreePath;
4 |
5 | // A simple class to make it easy to serialize a list of TreePaths
6 |
7 | public class TreePathCollection implements java.io.Serializable
8 | {
9 | public TreePath[] paths;
10 | public TreePathCollection(TreePath[] coll) { paths = coll; }
11 | }
12 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
Thanks - your vote has been recorded!
42 | 43 | -------------------------------------------------------------------------------- /src/jreepad/editor/TextileViewer.java: -------------------------------------------------------------------------------- 1 | /* 2 | Jreepad - personal information manager. 3 | Copyright (C) 2004 Dan Stowell 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | The full license can be read online here: 16 | 17 | http://www.gnu.org/copyleft/gpl.html 18 | */ 19 | 20 | package jreepad.editor; 21 | 22 | import org.philwilson.JTextile; 23 | 24 | import jreepad.JreepadArticle; 25 | 26 | /** 27 | * The Textile viewer pane. 28 | */ 29 | public class TextileViewer extends HtmlViewer 30 | { 31 | public TextileViewer(JreepadArticle article) 32 | { 33 | super(article); 34 | } 35 | 36 | public void reloadArticle() 37 | { 38 | try 39 | { 40 | editorPane.setText(JTextile.textile(article.getContent())); 41 | } 42 | catch (Exception e) 43 | { 44 | // Fallback to HTML if Textile failed 45 | e.printStackTrace(); 46 | super.reloadArticle(); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Jreepad 2 | 3 | Jreepad is an excellent free "personal database" program - it's a great way to organise all your personal notes, thoughts, tasks, recipes, memories... 4 | 5 | What's more, it's open-source and programmed in Java, so that all may benefit from it! Much used on Mac OSX, Linux, Unix, and even Windows! 6 | 7 | 8 | ## Main features: 9 | 10 | * A Jreepad file consists of a nice simple tree structure, and each "node" has an associated "article" - this can be plain text, HTML or tabular data. 11 | * Nodes can be rearranged very intuitively with drag-and-drop functionality (or by keyboard), so it's easy to arrange your thoughts. 12 | * There's a very powerful and intuitive search facility to locate a piece of text in a subtree 13 | * Hyperlink support: select a link and you can follow it - whether it's HTTP, FTP, mailto:, "node://" (as used in Treepad), or even WikiStyleLinks! 14 | * Integrated Google search 15 | * Load/save Treepad (.HJT) files, compatible with Treepad Lite (so you can share files with Windows users) 16 | * ...and much more, of course. 17 | 18 | ## Background 19 | 20 | Jreepad is originally based on [Treepad Lite](http://www.treepad.com/treepadfreeware/), an excellent free program which is only available for Windows and Linux. When I moved from Windows to Mac I needed Treepad's functionality so I created it myself. Jreepad has gradually grown to provide more functionality than Treepad Lite, but its files are still compatible with the original Windows software. 21 | 22 | Please note that Jreepad is not directly affiliated with Treepad - it's an independent project. 23 | 24 | ## How to compile Jreepad 25 | 26 | Clone/download the project, then run "ant" from the root folder. You'll need to have a Java JDK installed, as well as "Ant" the build tool. 27 | -------------------------------------------------------------------------------- /src/jreepad/ui/ExtensionFileFilter.java: -------------------------------------------------------------------------------- 1 | package jreepad.ui; 2 | 3 | import java.io.File; 4 | 5 | import javax.swing.filechooser.FileFilter; 6 | 7 | /** 8 | * File filter, which accepts only files with the given extension. 9 | */ 10 | public class ExtensionFileFilter extends FileFilter 11 | { 12 | /** 13 | * Description of this filter. 14 | */ 15 | private String description; 16 | 17 | /** 18 | * Allowed extension. 19 | */ 20 | private String extension; 21 | 22 | /** 23 | * Lowercase version of the extension. 24 | */ 25 | private String lowercaseExtension; 26 | 27 | public ExtensionFileFilter(String description, String extension) 28 | { 29 | this.description = description; 30 | this.extension = extension; 31 | this.lowercaseExtension = extension.toLowerCase(); 32 | } 33 | 34 | /** 35 | * Tests whether the given file has the appropriate extension. 36 | */ 37 | public boolean accept(File f) 38 | { 39 | if (f == null) 40 | return false; 41 | if (f.isDirectory()) 42 | return true; 43 | String fileName = f.getName(); 44 | int i = fileName.lastIndexOf('.'); 45 | if (i <= 0 || i >= fileName.length() - 1) 46 | return false; 47 | String fileExtension = fileName.substring(i + 1).toLowerCase(); 48 | if (fileExtension.equals(lowercaseExtension)) 49 | return true; 50 | return false; 51 | } 52 | 53 | /** 54 | * Returns the description of this filter. 55 | */ 56 | public String getDescription() 57 | { 58 | return description; 59 | } 60 | 61 | /** 62 | * Returns the filtered file extension. 63 | */ 64 | public String getExtension() 65 | { 66 | return extension; 67 | } 68 | } -------------------------------------------------------------------------------- /src/jreepad/editor/AbstractArticleView.java: -------------------------------------------------------------------------------- 1 | /* 2 | Jreepad - personal information manager. 3 | Copyright (C) 2004 Dan Stowell 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | The full license can be read online here: 16 | 17 | http://www.gnu.org/copyleft/gpl.html 18 | */ 19 | 20 | package jreepad.editor; 21 | 22 | import jreepad.JreepadArticle; 23 | 24 | /** 25 | * Abstract implementation of ArticleView. 26 | * Several basic methods are implemented. 27 | * 28 | * @author Przemek Więch 29 | * @version $Id: AbstractArticleView.java,v 1.2 2007-02-07 21:10:43 pewu Exp $ 30 | */ 31 | public abstract class AbstractArticleView implements ArticleView 32 | { 33 | protected JreepadArticle article; 34 | 35 | // The following boolean should be TRUE while we're changing from node to 36 | // node, and false otherwise 37 | protected boolean editLocked = false; 38 | 39 | public AbstractArticleView(JreepadArticle article) 40 | { 41 | this.article = article; 42 | } 43 | 44 | public void lockEdits() 45 | { 46 | editLocked = true; 47 | } 48 | 49 | public void unlockEdits() 50 | { 51 | editLocked = false; 52 | } 53 | 54 | public void saveArticle() 55 | { 56 | article.setContent(getText()); 57 | } 58 | 59 | public void setArticle(JreepadArticle article) 60 | { 61 | this.article = article; 62 | reloadArticle(); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/jreepad/editor/ArticleView.java: -------------------------------------------------------------------------------- 1 | /* 2 | Jreepad - personal information manager. 3 | Copyright (C) 2004 Dan Stowell 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | The full license can be read online here: 16 | 17 | http://www.gnu.org/copyleft/gpl.html 18 | */ 19 | 20 | package jreepad.editor; 21 | 22 | import javax.swing.JComponent; 23 | 24 | import jreepad.JreepadArticle; 25 | 26 | /** 27 | * Interface for an article viewer or editor. 28 | * 29 | * @author Przemek Więch 30 | * @version $Id: ArticleView.java,v 1.3 2008-09-21 11:06:49 danstowell Exp $ 31 | */ 32 | public interface ArticleView 33 | { 34 | /** 35 | * Returns the GUI viewer/editor component. 36 | */ 37 | public JComponent getComponent(); 38 | 39 | /** 40 | * Returns selected text in view. 41 | */ 42 | public String getSelectedText(); 43 | 44 | /** 45 | * Reloads the article. 46 | * Transfers data from article to view. 47 | */ 48 | public void reloadArticle(); 49 | 50 | /** 51 | * Saves the current article. 52 | * Transfers data from view to article. 53 | */ 54 | public void saveArticle(); 55 | 56 | /** 57 | * Returns the content text. 58 | */ 59 | public String getText(); 60 | 61 | /** 62 | * Sets new article content. 63 | */ 64 | public void setArticle(JreepadArticle article); 65 | 66 | /** 67 | * Lock editor - no edits will be allowed. 68 | */ 69 | public void lockEdits(); 70 | 71 | /** 72 | * Unlock editor - edits will now be allowed. 73 | */ 74 | public void unlockEdits(); 75 | 76 | public void updateFont(int direction); 77 | } 78 | -------------------------------------------------------------------------------- /src/jreepad/io/TreepadWriter.java: -------------------------------------------------------------------------------- 1 | /* 2 | Jreepad - personal information manager. 3 | Copyright (C) 2004-2006 Dan Stowell 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | The full license can be read online here: 16 | 17 | http://www.gnu.org/copyleft/gpl.html 18 | */ 19 | 20 | package jreepad.io; 21 | 22 | import java.io.IOException; 23 | import java.io.OutputStream; 24 | import java.io.OutputStreamWriter; 25 | import java.io.Writer; 26 | import java.util.Enumeration; 27 | 28 | import jreepad.JreepadNode; 29 | import jreepad.JreepadTreeModel; 30 | 31 | /** 32 | * Writes the Jreepad tree as a Treepad file. 33 | * 34 | * @version $Id$ 35 | */ 36 | public class TreepadWriter 37 | implements JreepadWriter 38 | { 39 | 40 | private String encoding; 41 | 42 | public TreepadWriter(String encoding) 43 | { 44 | this.encoding = encoding; 45 | } 46 | 47 | public void write(OutputStream out, JreepadTreeModel document) 48 | throws IOException 49 | { 50 | Writer writer = new OutputStreamWriter(out, encoding); 51 | writer.write("
42 |
44 |
65 |
66 | |
67 |
68 | The Jreepad icon/logo69 |Can be downloaded here:70 |
87 | 88 | 89 | The Jreepad project was started by Dan Stowell. 90 |This page last updated 91 | 5 February, 2005. 92 |93 | |
94 |
67 |
69 |
87 |
88 | |
89 |
90 | Jreepad - Using the .JAR file91 |If you've never used a Java .JAR file before, here's what to do: 92 |
99 |
101 | java -jar Jreepad-1.0.jar100 | 102 | The "-jar" option tells Java that it's dealing with a JAR file, which is a zipped-up collection of Java classes and other resources. 103 |104 | Troubleshooting:105 |
118 | 119 | 120 | 121 | The Jreepad project was started by Dan Stowell. 122 |This page last updated 123 | 25 July, 2004. 124 |125 | |
126 |
42 |
44 |
65 |
66 | |
67 |
68 | Jreepad uses two main file formats. 69 |The first (and original) format is the .HJT format as used in Henk Hagedoorn's Windows-based "Treepad" software. I won't go into detail since I'm not responsible for maintaining the file format. 70 |The second format is an XML-based format. It's very, very simple - there's essentially just one type of element, the <node> element. Look at this simple example: 71 |<?xml version="1.0" encoding="utf-8"?> 72 | <node xmlns="http://jreepad.sourceforge.net/formats" type="text/plain" title="My notes"> 73 | These are my notes. They're very interesting. 74 | <node type="text/csv" title="Things to do">Thing to do,Day 75 | Tidy house,Sunday 76 | Wash face,Monday 77 | Go to work,Monday 78 | Eat food,Wednesday 79 | </node> 80 | <node type="text/plain" title="Web address"> 81 | http://www.flatfourradio.co.uk/ 82 | </node> 83 | </node> 84 |85 | This simple Jreepad file consists of three nodes - the root node, with two child nodes. Any node can contain text, optionally followed by further <node> elements representing that node's children. This nesting can go on indefinitely. 86 |Node attributes: 87 |
Character encodings: any character encoding should be OK in theory. Jreepad happily supports ISO-8859-1, UTF-8, UTF-16, and others. 99 |100 | 101 | 102 | The Jreepad project was started by Dan Stowell. 103 |This page last updated 104 | 13 February, 2005. 105 |106 | |
107 |
|
Jreepad screenshotsClick on any screenshot to see a nice large version.
Send us your screenshots! If you are using Jreepad on an OS that isn't displayed here, it'd be nice for potential users to be able to see screenshots on their OS! Email me at danstowell [to circumvent spam robots I'm not writing the email address normally] at users.sourceforge.net The Jreepad project was started by Dan Stowell. This page last updated 8 March, 2005. |
42 |
44 |
65 |
66 | |
67 |
68 | Developing/compiling Jreepad69 |
70 |
78 | Source code71 |Two ways to get the source code: 72 |
77 |
79 |
103 | Compiling Jreepad80 |Compiling Jreepad is easy - from the command-line I just type 81 |82 |84 | Actually, that's not quite true, because now I use Apache Ant which is an excellent tool to help you compile projects and do various other things, nice and automatically. So instead, I type 85 |86 |88 | and that does everything for me (including moving files around, packaging up the source code for release, etc). Make sure you're in the directory which contains Jreepad's "build.xml" file when you do this. (Mac developers will also need the 'extra treat' mentioned below.) 89 |Non-Mac developers90 |If you're compiling Jreepad on a non-Mac platform, you'll need to download a small JAR file from Apple and put it into your classpath: 91 |92 |94 | Why? 95 |Jreepad is platform-neutral, but if you're on Mac OSX then a couple of little adjustments occur to make Jreepad fit more neatly into the OSX environment. If you're not on Mac then these adjustments simply don't happen - they should not cause any problems. 96 |Jreepad users don't even need to have the "AppleJavaExtensions" in their systems, since if the extensions aren't found (by reflection) then Jreepad won't attempt to use them. But you do need those packages to exist if you're compiling. 97 |An extra treat for Mac developers98 |The Jarbundler ant task makes it easy to create 99 | the Mac OSX application package, directly from the ant build. It even incorporates the icon files 100 | and document associations (if you're using v1.6.1 or later). 101 |Thanks to Will Gilbert for maintaining and improving that tool. 102 |
104 |
123 |
124 | Contributors105 |Jreepad was originated by Dan Stowell, and is maintained by: 106 | 107 |
Thanks to the following other people (in no particular order) for contributing or suggesting code improvements: 113 |
125 | The Jreepad project was started by Dan Stowell. 126 |This page last updated 127 | February 2010. 128 |129 | |
130 |
69 |
71 |
92 |
93 | |
94 |
95 | Jreepad96 |Jreepad is an excellent free "personal database" program - it's a great way to organise all your personal notes, thoughts, tasks, recipes, memories... 98 |What's more, it's open-source and programmed in Java, so that all may benefit from it! Much used on Mac OSX, Linux, Unix, and even Windows! 99 |Main features:100 |
110 |
134 | Download Jreepad 1.5:111 |
System requirements: Any operating system, with Java 1.4 or later installed. 123 |Download Jreepad 1.6 rc3:124 |
This is a "release candidate" - the latest development 131 | version, published for public testing before it is confirmed as 132 | being stable for general use. 133 |Jreepad is released under the terms of the GNU General Public License. If you want more features, then please visit the Jreepad project page and submit a feature request - or even better, download the source code and improve it yourself! 135 |Background136 |Jreepad is originally based on Treepad Lite, an excellent free program which is only available for Windows and Linux. When I moved from Windows to Mac I needed Treepad's functionality so I created it myself. Jreepad has gradually grown to provide more functionality than Treepad Lite, but its files are still compatible with the original Windows software. 137 |Please note that Jreepad is not directly affiliated with Treepad - it's an independent project. 138 | 139 |140 | The Jreepad project was started by Dan Stowell. 141 |This page last updated 142 | February 2010. 143 |144 | |
145 |
You can specify your preferred date format using standard Java date formatting commands.
Here are some examples:
| Command | Example output |
|---|---|
| yyyy.MM.dd G 'at' HH:mm:ss z | 2001.07.04 AD at 12:08:56 PDT |
| EEE, MMM d, ''yy | Wed, Jul 4, '01 |
| h:mm a | 12:08 PM |
| hh 'o''clock' a, zzzz | 12 o'clock PM, Pacific Daylight Time |
| K:mm a, z | 0:08 PM, PDT |
A complete guide to the formatting is available online at: www.javadocs.org/SimpleDateFormat
Leave the box blank to use the system default formatting.
227 | HELP_LINKS_TITLE=Links in Jreepad 228 | HELP_LINKS=Select any piece of text in an article,\nthen choose "Actions > Follow link in article".\n\nTYPES OF LINK:\n\n"Normal" link - We've tested these types of link:\n Web: e.g. http://jreepad.sourceforge.net\n Email: e.g. mailto:billg@microsoft.com\n FTP: e.g. ftp://ftp.compaq.com/pub/\n File: e.g. file:///Users/harold/Documents/stripes.jpg\n\nWiki link - If the selected text is a WikiWord (i.e. if \n it LooksLikeThis with no spaces and some capital \n letters somewhere in the middle) OR begins \n with "[[" and ends with "]]" then \n Jreepad will search for a node of the same \n title, and jump directly to it. If one \n isn't found then it'll create one \n for you. Try it!\n\nTreepad link - Treepad Lite uses links which begin \n with \"node://\", and specify the exact path\n to a different node within the same file.\n e.g. \"node://TreePad manual/Using Treepad\" 229 | HELP_LICENSE= Jreepad - personal information manager.\n Copyright \u00A9 2004 Dan Stowell\n\nThis program is free software; you can redistribute it and/or\nmodify it under the terms of the GNU General Public License\nas published by the Free Software Foundation; either version 2\nof the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nThe full license can be read online here: 230 | HELP_ABOUT=Jreepad originally inspired by a\nWindows program called \"Treepad Lite\"\nwritten by Henk Hagedoorn. 231 | -------------------------------------------------------------------------------- /src/jreepad/SearchDialog.java: -------------------------------------------------------------------------------- 1 | package jreepad; 2 | 3 | import java.awt.Frame; 4 | import java.awt.event.ActionEvent; 5 | import java.awt.event.ActionListener; 6 | import java.awt.event.KeyAdapter; 7 | import java.awt.event.KeyEvent; 8 | import java.awt.event.MouseAdapter; 9 | import java.awt.event.MouseEvent; 10 | import java.awt.event.MouseListener; 11 | 12 | import javax.swing.Box; 13 | import javax.swing.JCheckBox; 14 | import javax.swing.JComboBox; 15 | import javax.swing.JDialog; 16 | import javax.swing.JLabel; 17 | import javax.swing.JScrollPane; 18 | import javax.swing.JSpinner; 19 | import javax.swing.JTable; 20 | import javax.swing.JTextField; 21 | import javax.swing.ListSelectionModel; 22 | import javax.swing.SpinnerNumberModel; 23 | import javax.swing.event.CaretEvent; 24 | import javax.swing.event.CaretListener; 25 | import javax.swing.event.ChangeEvent; 26 | import javax.swing.event.ChangeListener; 27 | import javax.swing.table.AbstractTableModel; 28 | 29 | /** 30 | * The search dialog. 31 | * 32 | * @version $Id: SearchDialog.java,v 1.1 2007-02-05 11:06:44 pewu Exp $ 33 | */ 34 | public class SearchDialog extends JDialog 35 | { 36 | private JTextField nodeSearchField; 37 | private JComboBox searchWhereSelector; 38 | private JSpinner searchMaxNumSpinner; 39 | private JCheckBox searchCaseCheckBox; 40 | private AbstractTableModel searchResultsTableModel; 41 | private JTable searchResultsTable; 42 | private JScrollPane searchResultsTableScrollPane; 43 | private JLabel searchResultsLabel; 44 | private JreepadView theJreepad; 45 | 46 | public SearchDialog(Frame owner, JreepadView theJreepad) 47 | { 48 | super(owner, JreepadViewer.lang.getString("SEARCH_WINDOWTITLE"), false); 49 | this.theJreepad = theJreepad; 50 | setVisible(false); 51 | Box vBox = Box.createVerticalBox(); 52 | // 53 | Box hBox = Box.createHorizontalBox(); 54 | nodeSearchField = new JTextField(""); 55 | vBox.add(new JLabel(JreepadViewer.lang.getString("SEARCH_SEARCHFOR"))); 56 | hBox.add(nodeSearchField); 57 | nodeSearchField.addActionListener(new ActionListener() 58 | { 59 | public void actionPerformed(ActionEvent e) 60 | { 61 | doTheSearch(); 62 | } 63 | }); 64 | nodeSearchField.addCaretListener(new CaretListener() 65 | { 66 | public void caretUpdate(CaretEvent e) 67 | { 68 | doTheSearch(); 69 | } 70 | }); 71 | vBox.add(hBox); 72 | // 73 | searchWhereSelector = new JComboBox(new String[] { 74 | JreepadViewer.lang.getString("SEARCH_SELECTEDNODE"), 75 | JreepadViewer.lang.getString("SEARCH_WHOLETREE") }); 76 | searchWhereSelector.setSelectedIndex(1); 77 | searchWhereSelector.setEditable(false); 78 | searchWhereSelector.addActionListener(new ActionListener() 79 | { 80 | public void actionPerformed(ActionEvent e) 81 | { 82 | doTheSearch(); 83 | } 84 | }); 85 | hBox = Box.createHorizontalBox(); 86 | hBox.add(Box.createGlue()); 87 | hBox.add(new JLabel(JreepadViewer.lang.getString("SEARCH_SEARCHWHERE"))); 88 | hBox.add(searchWhereSelector); 89 | hBox.add(Box.createGlue()); 90 | hBox.add(searchCaseCheckBox = new JCheckBox(JreepadViewer.lang 91 | .getString("SEARCH_CASESENSITIVE"), false)); 92 | searchCaseCheckBox.addActionListener(new ActionListener() 93 | { 94 | public void actionPerformed(ActionEvent e) 95 | { 96 | doTheSearch(); 97 | } 98 | }); 99 | hBox.add(Box.createGlue()); 100 | vBox.add(hBox); 101 | // 102 | // searchMaxNumSpinner = new DSpinner(1,1000,getPrefs().searchMaxNum); 103 | searchMaxNumSpinner = new JSpinner(new SpinnerNumberModel(getPrefs().searchMaxNum, 1, 1000, 104 | 1)); 105 | /* 106 | * searchMaxNumSpinner.addCaretListener(new CaretListener(){ public void 107 | * caretUpdate(CaretEvent e){ doTheSearch();}}); searchMaxNumSpinner.addActionListener(new 108 | * ActionListener(){ public void actionPerformed(ActionEvent e){ doTheSearch();}}); 109 | */ 110 | searchMaxNumSpinner.getModel().addChangeListener(new ChangeListener() 111 | { 112 | public void stateChanged(ChangeEvent e) 113 | { 114 | doTheSearch(); 115 | } 116 | }); 117 | hBox = Box.createHorizontalBox(); 118 | hBox.add(Box.createGlue()); 119 | hBox.add(new JLabel(JreepadViewer.lang.getString("SEARCH_MAXRESULTS"))); 120 | hBox.add(searchMaxNumSpinner); 121 | hBox.add(Box.createGlue()); 122 | vBox.add(hBox); 123 | // 124 | // NOW FOR THE SEARCH RESULTS TABLE - COULD BE TRICKY! 125 | searchResultsTableModel = new AbstractTableModel() 126 | { 127 | private final String[] columns = new String[] { 128 | JreepadViewer.lang.getString("SEARCH_TBL_COL_NODE"), 129 | JreepadViewer.lang.getString("SEARCH_TBL_COL_ARTICLETEXT"), 130 | JreepadViewer.lang.getString("SEARCH_TBL_COL_FULLPATH") }; 131 | 132 | public int getColumnCount() 133 | { 134 | return columns.length; 135 | } 136 | 137 | public String getColumnName(int index) 138 | { 139 | return columns[index]; 140 | } 141 | 142 | public int getRowCount() 143 | { 144 | JreepadSearcher.JreepadSearchResult[] results = SearchDialog.this.theJreepad 145 | .getSearchResults(); 146 | if (results == null || results.length == 0) 147 | return 1; 148 | else 149 | return results.length; 150 | } 151 | 152 | public Object getValueAt(int row, int col) 153 | { 154 | JreepadSearcher.JreepadSearchResult[] results = SearchDialog.this.theJreepad 155 | .getSearchResults(); 156 | if (results == null || results.length == 0) 157 | switch (col) 158 | { 159 | case 2: 160 | return ""; 161 | case 1: 162 | return (nodeSearchField.getText() == "" ? JreepadViewer.lang 163 | .getString("SEARCH_TBL_BEFORERESULTS") : JreepadViewer.lang 164 | .getString("SEARCH_TBL_NORESULTS")); 165 | default: 166 | return ""; 167 | } 168 | else 169 | switch (col) 170 | { 171 | case 2: 172 | return results[row].getTreePath(); 173 | case 1: 174 | return results[row].getArticleQuote(); 175 | default: 176 | return results[row].getNode().getTitle(); 177 | } 178 | } 179 | }; 180 | searchResultsTable = new JTable(searchResultsTableModel); 181 | searchResultsTable.setCellSelectionEnabled(false); 182 | searchResultsTable.setColumnSelectionAllowed(false); 183 | searchResultsTable.setRowSelectionAllowed(true); 184 | searchResultsTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 185 | searchResultsTableScrollPane = new JScrollPane(searchResultsTable); 186 | vBox.add(searchResultsLabel = new JLabel(JreepadViewer.lang.getString("SEARCH_RESULTS"))); 187 | vBox.add(searchResultsTableScrollPane); 188 | // 189 | // Add mouse listener 190 | MouseListener sml = new MouseAdapter() 191 | { 192 | public void mouseClicked(MouseEvent e) 193 | { 194 | mouseClickedOnSearchResultsTable(e); 195 | } 196 | }; 197 | searchResultsTable.addMouseListener(sml); 198 | // 199 | getContentPane().add(vBox); 200 | 201 | // Now we'll add some keyboard shortcuts 202 | KeyAdapter searchKeyListener = new KeyAdapter() 203 | { 204 | public void keyPressed(KeyEvent eek) 205 | { 206 | switch (eek.getKeyCode()) 207 | { 208 | case KeyEvent.VK_ESCAPE: 209 | setVisible(false); 210 | break; 211 | case KeyEvent.VK_W: 212 | if (eek.isControlDown() || eek.isMetaDown()) 213 | setVisible(false); 214 | break; 215 | } 216 | } 217 | }; 218 | addKeyListener(searchKeyListener); 219 | nodeSearchField.addKeyListener(searchKeyListener); 220 | searchCaseCheckBox.addKeyListener(searchKeyListener); 221 | searchWhereSelector.addKeyListener(searchKeyListener); 222 | searchResultsTable.addKeyListener(searchKeyListener); 223 | searchMaxNumSpinner.addKeyListener(searchKeyListener); 224 | searchResultsTable.addKeyListener(new KeyAdapter() 225 | { 226 | public void keyPressed(KeyEvent eek) 227 | { 228 | switch (eek.getKeyCode()) 229 | { 230 | case KeyEvent.VK_SPACE: 231 | case KeyEvent.VK_ENTER: 232 | mouseClickedOnSearchResultsTable(null); 233 | break; 234 | } 235 | } 236 | }); 237 | 238 | // Finished establishing the search dialogue box 239 | } 240 | 241 | private void doTheSearch() 242 | { 243 | getPrefs().searchMaxNum = ((Integer)searchMaxNumSpinner.getValue()).intValue(); 244 | // DSpinner version getPrefs().searchMaxNum = searchMaxNumSpinner.getValue(); 245 | 246 | performSearch(nodeSearchField.getText(), 247 | nodeSearchField.getText(), // articleSearchField.getText(), 248 | searchWhereSelector.getSelectedIndex(), 249 | true /* searchCombinatorSelector.getSelectedIndex()==0 */, searchCaseCheckBox 250 | .isSelected(), getPrefs().searchMaxNum); 251 | } 252 | 253 | private boolean performSearch(String inNodes, String inArticles, 254 | int searchWhat /* 0=selected, 1=all */, boolean orNotAnd, boolean caseSensitive, 255 | int maxResults) 256 | { 257 | // setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); 258 | boolean ret = theJreepad.performSearch(inNodes, inArticles, searchWhat, orNotAnd, 259 | caseSensitive, maxResults); 260 | // setCursor(Cursor.getDefaultCursor()); 261 | if (!ret) 262 | { 263 | // JOptionPane.showMessageDialog(searchDialog, "Found nothing.", "Search result..." , 264 | // JOptionPane.INFORMATION_MESSAGE); 265 | searchResultsLabel.setText(JreepadViewer.lang.getString("SEARCH_RESULTS")); 266 | } 267 | else 268 | searchResultsLabel.setText(JreepadViewer.lang.getString("SEARCH_RESULTS") 269 | + theJreepad.getSearchResults().length 270 | + JreepadViewer.lang.getString("SEARCH_NODES_MATCHED")); 271 | searchResultsTableModel.fireTableStructureChanged(); 272 | // searchResultsTable.repaint(); 273 | return ret; 274 | } 275 | 276 | private void mouseClickedOnSearchResultsTable(MouseEvent e) 277 | { 278 | JreepadSearcher.JreepadSearchResult[] results = theJreepad.getSearchResults(); 279 | int selectedRow = searchResultsTable.getSelectedRow(); 280 | if (results == null || results.length == 0 || selectedRow == -1) 281 | return; 282 | 283 | // Select the node in the tree 284 | theJreepad.getTree().setSelectionPath(results[selectedRow].getTreePath()); 285 | theJreepad.getTree().scrollPathToVisible(results[selectedRow].getTreePath()); 286 | } 287 | 288 | private static JreepadPrefs getPrefs() 289 | { 290 | return JreepadView.getPrefs(); 291 | } 292 | 293 | public void setJreepad(JreepadView theJreepad) 294 | { 295 | this.theJreepad = theJreepad; 296 | } 297 | 298 | public void open() 299 | { 300 | setVisible(true); 301 | nodeSearchField.requestFocus(); 302 | nodeSearchField.setSelectionStart(0); 303 | } 304 | } 305 | --------------------------------------------------------------------------------