-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Pablo O Vieira
committed
Jan 21, 2014
0 parents
commit f9ba926
Showing
13 changed files
with
1,205 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
*.class | ||
bin/ | ||
dist/ | ||
|
||
.settings/ | ||
.project | ||
.classpath | ||
|
||
.DS_Store | ||
|
||
jnetsend.cfg | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# JNetSend - README | ||
|
||
**JNetSend** is an app created back in 2002 with the intent to provide a *pretty* interface for chat via `net send` (command line) in a WinNT based network. | ||
|
||
The goal back then was replace a Visual Basic version of a similar app in the company where I did my internship. | ||
|
||
**Note**: the code is poorly commented and a *little* messy :-) | ||
|
||
## Requirements | ||
* JRE 1.4 or later | ||
* Ant 1.7 or later (`build.xml` was generated by Eclipse recently) | ||
* Works only in Windows workstations in WinNT network since it depends on `net send` service. | ||
|
||
## Usage | ||
```cmd | ||
> cd <installation folder> | ||
> JNetSend.bat | ||
``` | ||
|
||
## MIT License | ||
JNetSend - Copyright (c) 2013 Pablo O Vieira (povieira) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
DEALINGS IN THE SOFTWARE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<project default="create_run_jar" name="Create Runnable Jar for Project JNetSend"> | ||
<!--this file was created by Eclipse Runnable JAR Export Wizard--> | ||
<!--ANT 1.7 is required --> | ||
<target name="create_run_jar"> | ||
<jar destfile="dist/JNetSend.jar" filesetmanifest="mergewithoutmain"> | ||
<manifest> | ||
<attribute name="Main-Class" value="com.jnetsend.JNetSend"/> | ||
<attribute name="Class-Path" value="."/> | ||
</manifest> | ||
<fileset dir="bin"/> | ||
</jar> | ||
</target> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.jnetsend; | ||
|
||
import com.jnetsend.gui.JNetSendFrame; | ||
|
||
public class JNetSend{ | ||
// main method | ||
public static void main(String args[]){ | ||
JNetSendFrame application = new JNetSendFrame(); | ||
application.launchFrame(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.jnetsend.gui; | ||
|
||
import java.io.File; | ||
|
||
import javax.swing.filechooser.FileFilter; | ||
|
||
import com.jnetsend.util.Constants; | ||
|
||
public class ContactsFileFilter extends FileFilter { | ||
|
||
public boolean accept(File f) { | ||
|
||
boolean accepted = false; | ||
if (f != null) { | ||
String ext = this.getExtension(f); | ||
if ((ext != null && ext.equals(Constants.DEFAULT_CONTACTS_FILE_EXTENSION)) | ||
|| f.isDirectory()) { | ||
accepted = true; | ||
} | ||
} | ||
return accepted; | ||
} | ||
|
||
public String getDescription() { | ||
return "Contacts list file (*.txt)"; | ||
} | ||
|
||
private String getExtension(File f) { | ||
if (f != null) { | ||
String fileName = f.getName(); | ||
int i = fileName.lastIndexOf('.'); | ||
if (i > 0 && i < fileName.length() - 1) { | ||
return fileName.substring(i + 1).toLowerCase(); | ||
} | ||
} | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.jnetsend.gui; | ||
|
||
import java.awt.GridBagConstraints; | ||
import java.awt.GridBagLayout; | ||
import java.awt.Insets; | ||
|
||
import javax.swing.BorderFactory; | ||
import javax.swing.JLabel; | ||
import javax.swing.JPanel; | ||
import javax.swing.border.Border; | ||
|
||
import com.jnetsend.util.Constants; | ||
|
||
|
||
public class JNetSendAboutBoxPanel extends JPanel { | ||
Border border = BorderFactory.createEtchedBorder(); | ||
GridBagLayout mainLayout = new GridBagLayout(); | ||
JLabel copyrightLabel = new JLabel(); | ||
JLabel authorLabel = new JLabel(); | ||
JLabel titleLabel = new JLabel(); | ||
|
||
public JNetSendAboutBoxPanel() { | ||
this.setLayout(mainLayout); | ||
this.setBorder(border); | ||
titleLabel.setText(Constants.APP_NAME); | ||
copyrightLabel.setText("Copyright (c) 2002 Pablo Vieira"); | ||
titleLabel.setFont(Constants.TEXT_FONT); | ||
authorLabel.setFont(Constants.TEXT_FONT); | ||
authorLabel.setText("Pablo Vieira"); | ||
copyrightLabel.setFont(Constants.TEXT_FONT); | ||
this.add(titleLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, | ||
GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, | ||
15, 0, 15), 0, 0)); | ||
this.add(authorLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, | ||
GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, | ||
15, 0, 15), 0, 0)); | ||
this.add(copyrightLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, | ||
GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, | ||
15, 0, 15), 0, 0)); | ||
} | ||
} |
Oops, something went wrong.