Updated to Commons Net 1.3.0
Added Anti-Aliasing Fixed a problem with uploading binary files.
This commit is contained in:
parent
3fac476ddf
commit
b3a9e880ce
14 changed files with 86 additions and 40 deletions
|
@ -31,7 +31,7 @@
|
|||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/commons-net-1.2.2.jar!/" />
|
||||
<root url="jar://$MODULE_DIR$/lib/commons-net-1.3.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
|
|
|
@ -257,16 +257,6 @@
|
|||
</modules>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" assert-keyword="false" jdk-15="false" project-jdk-name="1.4.x" />
|
||||
<component name="Regex">
|
||||
<option name="pos1" value="218" />
|
||||
<option name="pos2" value="218" />
|
||||
<option name="pos3" value="162" />
|
||||
<option name="pos4" value="444" />
|
||||
<option name="pos5" value="162" />
|
||||
<option name="autoUpdate" value="true" />
|
||||
<option name="referenceOn" value="false" />
|
||||
<option name="referencePos" value="0" />
|
||||
</component>
|
||||
<component name="RmicSettings">
|
||||
<option name="IS_EANABLED" value="false" />
|
||||
<option name="DEBUGGING_INFO" value="true" />
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<resources os="Windows">
|
||||
<j2se version="1.4+"/>
|
||||
<jar href="LifeBlogger.jar"/>
|
||||
<jar href="commons-net-1.2.2.jar"/>
|
||||
<jar href="commons-net-1.3.0.jar"/>
|
||||
<jar href="sqlite.jar"/>
|
||||
<jar href="thinlet.jar"/>
|
||||
<nativelib href="sqlite_jni.dll"/>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Project
|
||||
proj.name=LifeBlogger
|
||||
proj.version=0.1.1
|
||||
proj.version=0.1.2
|
||||
proj.package=net.thauvin.lifeblogger
|
||||
proj.run=${proj.package}.LifeBlogger
|
||||
|
||||
|
|
Binary file not shown.
BIN
lib/commons-net-1.3.0.jar
Normal file
BIN
lib/commons-net-1.3.0.jar
Normal file
Binary file not shown.
49
src/net/thauvin/lifeblogger/AntiAliasedThinlet.java
Normal file
49
src/net/thauvin/lifeblogger/AntiAliasedThinlet.java
Normal file
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* @(#)AntiAliasedThinlet.java
|
||||
*
|
||||
* Copyright (C) 2004 by Erik C. Thauvin (erik@thauvin.net)
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
package net.thauvin.lifeblogger;
|
||||
|
||||
import thinlet.Thinlet;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
|
||||
/**
|
||||
* The <code>AntiAliasedThinlet</code> class implements an anti-aliased {@link thinlet.Thinlet Thinlet} component.
|
||||
*
|
||||
* @author Erik C. Thauvin
|
||||
* @version $Revision$, $Date$
|
||||
*
|
||||
* @created Nov 25, 2004
|
||||
* @since 1.0
|
||||
*/
|
||||
public class AntiAliasedThinlet extends Thinlet
|
||||
{
|
||||
/**
|
||||
* Creates a new AntiAliasedThinlet object.
|
||||
*/
|
||||
public AntiAliasedThinlet()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Paints the components inside the graphics clip area.
|
||||
*
|
||||
* @param g The graphics clip area.
|
||||
*
|
||||
* @see thinlet.Thinlet#paint(java.awt.Graphics)
|
||||
*/
|
||||
public void paint(Graphics g)
|
||||
{
|
||||
((Graphics2D) g).setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
|
||||
((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
super.paint(g);
|
||||
}
|
||||
}
|
|
@ -65,7 +65,7 @@ import javax.swing.*;
|
|||
* @created Jul 19, 2004
|
||||
* @since 1.0
|
||||
*/
|
||||
public class LifeBlogger extends Thinlet
|
||||
public class LifeBlogger extends AntiAliasedThinlet
|
||||
{
|
||||
private static final String DRIVER = "SQLite.JDBCDriver";
|
||||
private static final String PREFS =
|
||||
|
@ -628,7 +628,7 @@ public class LifeBlogger extends Thinlet
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
showException(e);
|
||||
handleException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -637,7 +637,7 @@ public class LifeBlogger extends Thinlet
|
|||
*
|
||||
* @param thr The exception.
|
||||
*/
|
||||
protected final void showException(Throwable thr)
|
||||
protected final void handleException(Throwable thr)
|
||||
{
|
||||
final StringWriter writer = new StringWriter();
|
||||
thr.printStackTrace(new PrintWriter(writer));
|
||||
|
|
|
@ -36,22 +36,20 @@
|
|||
*/
|
||||
package net.thauvin.lifeblogger;
|
||||
|
||||
import org.apache.commons.net.ftp.FTP;
|
||||
import org.apache.commons.net.ftp.FTPClient;
|
||||
import org.apache.commons.net.ftp.FTPReply;
|
||||
import org.apache.commons.net.ftp.FTP;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* The <code>LifeFTP</code> class stores/uploads a file to a FTP server.
|
||||
*
|
||||
* @author <a href="http://www.thauvin.net/erik/">Erik C. Thauvin</a>
|
||||
* @version $Revision$, $Date$
|
||||
*
|
||||
* @created Jul 20, 2004
|
||||
* @since 1.0
|
||||
*/
|
||||
|
@ -116,16 +114,18 @@ public class LifeFTP extends LifeBlog
|
|||
|
||||
if (success)
|
||||
{
|
||||
final BufferedInputStream bis = new BufferedInputStream(new FileInputStream(getFile()));
|
||||
|
||||
if (!getFilename().endsWith(".txt"))
|
||||
{
|
||||
ftp.setFileTransferMode(FTP.BINARY_FILE_TYPE);
|
||||
ftp.setFileType(FTP.BINARY_FILE_TYPE);
|
||||
}
|
||||
|
||||
ftp.storeFile(getFilename(), bis);
|
||||
ftp.enterLocalPassiveMode();
|
||||
|
||||
bis.close();
|
||||
final InputStream is = new FileInputStream(getFile());
|
||||
|
||||
ftp.storeFile(getFilename(), is);
|
||||
|
||||
is.close();
|
||||
|
||||
success = FTPReply.isPositiveCompletion(ftp.getReplyCode());
|
||||
|
||||
|
@ -138,6 +138,9 @@ public class LifeFTP extends LifeBlog
|
|||
getThinlet().closeDialog(getDialog());
|
||||
getThinlet().postDialog(getPath() + (getPath().endsWith("/") ? "" : "/") + getFilename(), getFilename());
|
||||
}
|
||||
|
||||
ftp.logout();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,7 +149,7 @@ public class LifeFTP extends LifeBlog
|
|||
catch (IOException e)
|
||||
{
|
||||
getThinlet().closeDialog(getDialog());
|
||||
getThinlet().showException(e);
|
||||
getThinlet().handleException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -177,7 +177,7 @@ public class LifeMediaObject extends LifeBlog
|
|||
catch (IOException e)
|
||||
{
|
||||
getThinlet().closeDialog(getDialog());
|
||||
getThinlet().showException(e);
|
||||
getThinlet().handleException(e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
|
@ -143,7 +143,7 @@ public class LifePost extends LifeAction
|
|||
catch (IOException e)
|
||||
{
|
||||
getThinlet().closeDialog(getDialog());
|
||||
getThinlet().showException(e);
|
||||
getThinlet().handleException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Created by JReleaseInfo AntTask from Open Source Competence Group */
|
||||
/* Creation date Wed Sep 29 05:39:16 PDT 2004 */
|
||||
/* Creation date Sun Feb 06 00:48:16 PST 2005 */
|
||||
package net.thauvin.lifeblogger;
|
||||
|
||||
import java.util.Date;
|
||||
|
@ -12,28 +12,28 @@ import java.util.Date;
|
|||
public class ReleaseInfo {
|
||||
|
||||
|
||||
/** buildDate (set during build process to 1096461556906L). */
|
||||
private static Date buildDate = new Date(1096461556906L);
|
||||
/** buildDate (set during build process to 1107679696812L). */
|
||||
private static Date buildDate = new Date(1107679696812L);
|
||||
|
||||
/**
|
||||
* Get buildDate (set during build process to Wed Sep 29 05:39:16 PDT 2004).
|
||||
* Get buildDate (set during build process to Sun Feb 06 00:48:16 PST 2005).
|
||||
* @return Date buildDate
|
||||
*/
|
||||
public static final Date getBuildDate() { return buildDate; }
|
||||
|
||||
|
||||
/**
|
||||
* Get buildNumber (set during build process to 1).
|
||||
* Get buildNumber (set during build process to 5).
|
||||
* @return int buildNumber
|
||||
*/
|
||||
public static final int getBuildNumber() { return 1; }
|
||||
public static final int getBuildNumber() { return 5; }
|
||||
|
||||
|
||||
/** version (set during build process to "0.1.1"). */
|
||||
private static String version = new String("0.1.1");
|
||||
/** version (set during build process to "0.1.2"). */
|
||||
private static String version = new String("0.1.2");
|
||||
|
||||
/**
|
||||
* Get version (set during build process to "0.1.1").
|
||||
* Get version (set during build process to "0.1.2").
|
||||
* @return String version
|
||||
*/
|
||||
public static final String getVersion() { return version; }
|
||||
|
|
|
@ -28,6 +28,8 @@ h5.blueheader { font-family: arial; font-weight: bold; font-size: 14px; color: #
|
|||
|
||||
.Grey10px { font-family: arial; font-weight: bold; font-size: 10px; color: #666666; }
|
||||
|
||||
.Red10px { font-family: arial; font-weight: bold; font-size: 10px; color: red; }
|
||||
|
||||
a:link { color: #0033CC; text-decoration: none; }
|
||||
a:active { color: #0033CC; text-decoration: none; }
|
||||
a:visited { color:#800080; text-decoration: none; }
|
||||
|
|
|
@ -108,10 +108,12 @@ End If
|
|||
<script type="text/javascript">insertLink('http://www.thauvin.net/erik/download/lifeblogger/LifeBlogger.jnlp');</script>
|
||||
</div>
|
||||
<p><span class="Grey10px">Requirements</span><br>
|
||||
<span class="Grey10px"><a href="http://www.nokia.com/lifeblog/">Nokia Lifeblog</a><br>
|
||||
<span class="Grey10px"><a href="http://www.nokia.com/lifeblog/">Nokia Lifeblog 1.0</a><br>
|
||||
<a href="http://www.java.com/">Java 1.4</a></span></p>
|
||||
<p><span class="Grey10px"> LifeBlogger only runs on Windows, at least until Nokia produces a Lifeblog version for Mac or Linux. </span> <br>
|
||||
</p>
|
||||
<p><span class="Red10px"> LifeBlogger does not currently work with Lifeblog 1.5.</span> <br>
|
||||
</p>
|
||||
<p> <span class="Blue12pxBold">Source</span><br>
|
||||
You can also download the latest source archive. <a href="http://www.thauvin.net/erik/download/lifeblogger/LifeBlogger-src.zip">»</a></p>
|
||||
<p><span class="Blue12pxBold">CVS</span><br>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue