-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from eprogramming/master
no messageDialog no @author tags
- Loading branch information
Showing
26 changed files
with
13 additions
and
216 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 |
---|---|---|
|
@@ -15,14 +15,8 @@ | |
import javax.swing.SwingUtilities; | ||
import javax.swing.UIManager; | ||
|
||
import org.jboss.aesh.mterm.gui.MessageDialog; | ||
import org.jboss.aesh.mterm.gui.MtermUI; | ||
|
||
/** | ||
* The main class. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
public class Mterm { | ||
|
||
public static void main(String... args) { | ||
|
@@ -33,7 +27,7 @@ public void run() { | |
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); | ||
} | ||
catch (Exception e) { | ||
new MessageDialog().error(e.getMessage()); | ||
e.printStackTrace(); | ||
} | ||
new MtermUI(); | ||
} | ||
|
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 |
---|---|---|
|
@@ -19,11 +19,6 @@ | |
import org.jboss.aesh.mterm.util.AeshUtil; | ||
import org.jboss.aesh.mterm.util.MtermUtil; | ||
|
||
/** | ||
* BaseAction class. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
@SuppressWarnings("serial") | ||
abstract class BaseAction extends AbstractAction { | ||
|
||
|
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 |
---|---|---|
|
@@ -20,13 +20,6 @@ | |
|
||
import org.jboss.aesh.mterm.util.MtermUtil; | ||
|
||
/** | ||
* BlockAction class. | ||
* | ||
* This action blocks the deletion of the prompt string. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class BlockAction extends AbstractAction { | ||
|
||
|
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 |
---|---|---|
|
@@ -17,24 +17,11 @@ | |
import javax.swing.JTextArea; | ||
import javax.swing.text.BadLocationException; | ||
|
||
import org.jboss.aesh.mterm.gui.MessageDialog; | ||
import org.jboss.aesh.mterm.util.MtermUtil; | ||
|
||
/** | ||
* ClearAction class. | ||
* | ||
* This action clears the terminal and is fired when user types control + l. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class ClearAction extends BaseAction { | ||
|
||
/** | ||
* Parametric constructor initializes this action with JTextArea. | ||
* | ||
* @param textArea JTextArea | ||
*/ | ||
public ClearAction(JTextArea textArea) { | ||
super(textArea); | ||
} | ||
|
@@ -44,7 +31,7 @@ public void actionPerformed(ActionEvent ae) { | |
textArea.getDocument().remove(0, textArea.getDocument().getLength()); | ||
} | ||
catch (BadLocationException e) { | ||
new MessageDialog().error(e.getMessage()); | ||
e.printStackTrace(); | ||
} | ||
System.out.print(MtermUtil.INSTANCE.getPs1()); | ||
|
||
|
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 |
---|---|---|
|
@@ -17,27 +17,12 @@ | |
import javax.swing.JTextArea; | ||
import javax.swing.text.BadLocationException; | ||
|
||
import org.jboss.aesh.mterm.gui.MessageDialog; | ||
import org.jboss.aesh.mterm.util.AeshUtil; | ||
import org.jboss.aesh.mterm.util.MtermUtil; | ||
|
||
/** | ||
* RunAction class. | ||
* | ||
* This action delegates commands to aesh. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class RunAction extends BaseAction { | ||
|
||
/** | ||
* Parametric constructor initializes this action with target textarea and <br> | ||
* aesh handler. | ||
* | ||
* @param textArea AeshHandler | ||
* @param aesh JTextArea | ||
*/ | ||
public RunAction(JTextArea textArea) { | ||
super(textArea); | ||
} | ||
|
@@ -68,7 +53,6 @@ public void actionPerformed(ActionEvent ae) { | |
} | ||
catch (Exception e) { | ||
e.printStackTrace(); | ||
new MessageDialog().error(e.getMessage()); | ||
} | ||
|
||
} | ||
|
@@ -78,7 +62,7 @@ private void clear() { | |
textArea.getDocument().remove(0, textArea.getDocument().getLength()); | ||
} | ||
catch (BadLocationException e) { | ||
new MessageDialog().error(e.getMessage()); | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
|
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 |
---|---|---|
|
@@ -17,14 +17,8 @@ | |
|
||
import javax.swing.JTextArea; | ||
|
||
import org.jboss.aesh.mterm.gui.MessageDialog; | ||
import org.jboss.aesh.mterm.util.MtermUtil; | ||
|
||
/** | ||
* TabAction class. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class TabAction extends BaseAction { | ||
|
||
|
@@ -41,7 +35,7 @@ protected void perform() { | |
aesh.run("\t"); | ||
} | ||
catch (IOException e) { | ||
new MessageDialog().error(e.getMessage()); | ||
e.printStackTrace(); | ||
} | ||
System.out.print(aesh.getResult() + MtermUtil.INSTANCE.getPs1()); | ||
aesh.reset(); | ||
|
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 |
---|---|---|
|
@@ -15,14 +15,8 @@ | |
import java.awt.event.ActionEvent; | ||
|
||
import javax.swing.ImageIcon; | ||
import javax.swing.JOptionPane; | ||
|
||
import org.jboss.aesh.mterm.gui.MessageDialog; | ||
|
||
/** | ||
* Menu MenuAboutAction class. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class MenuAboutAction extends MenuBaseAction { | ||
|
||
|
@@ -38,6 +32,6 @@ public void actionPerformed(ActionEvent e) { | |
sb.append("\n\n\nA simple java terminal emulator"); | ||
sb.append(" "); | ||
sb.append("\n\n\n\n\nCreated by Aesh Team"); | ||
new MessageDialog().info(sb.toString()); | ||
JOptionPane.showMessageDialog(null, sb.toString()); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -17,11 +17,6 @@ | |
import javax.swing.AbstractAction; | ||
import javax.swing.ImageIcon; | ||
|
||
/** | ||
* General class MenuBaseAction class. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class MenuBaseAction extends AbstractAction { | ||
|
||
|
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 |
---|---|---|
|
@@ -18,14 +18,8 @@ | |
import javax.swing.JTextArea; | ||
import javax.swing.text.BadLocationException; | ||
|
||
import org.jboss.aesh.mterm.gui.MessageDialog; | ||
import org.jboss.aesh.mterm.util.MtermUtil; | ||
|
||
/** | ||
* Menu MenuClearAction class. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class MenuClearAction extends MenuBaseAction { | ||
|
||
|
@@ -42,7 +36,7 @@ public void actionPerformed(ActionEvent e) { | |
System.out.print(MtermUtil.INSTANCE.getPs1()); | ||
} | ||
catch (BadLocationException ex) { | ||
new MessageDialog().error(ex.getMessage()); | ||
ex.printStackTrace(); | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -20,11 +20,6 @@ | |
import javax.swing.JOptionPane; | ||
import javax.swing.JTextArea; | ||
|
||
/** | ||
* Menu MenuColorAction class. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class MenuColorAction extends MenuBaseAction { | ||
|
||
|
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 |
---|---|---|
|
@@ -18,13 +18,6 @@ | |
|
||
import javax.swing.ImageIcon; | ||
|
||
import org.jboss.aesh.mterm.gui.MessageDialog; | ||
|
||
/** | ||
* Menu MenuContentsAction class. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class MenuContentsAction extends MenuBaseAction { | ||
|
||
|
@@ -44,7 +37,7 @@ public void actionPerformed(ActionEvent e) { | |
} | ||
} | ||
catch (Exception ex) { | ||
new MessageDialog().error(ex.getMessage()); | ||
ex.printStackTrace(); | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -20,11 +20,6 @@ | |
import javax.swing.ImageIcon; | ||
import javax.swing.JTextArea; | ||
|
||
/** | ||
* Menu MenuCopyAction class. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class MenuCopyAction extends MenuBaseAction { | ||
|
||
|
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 |
---|---|---|
|
@@ -18,11 +18,6 @@ | |
|
||
import org.jboss.aesh.mterm.util.AeshUtil; | ||
|
||
/** | ||
* Menu MenuExitAction class. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class MenuExitAction extends MenuBaseAction { | ||
|
||
|
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 |
---|---|---|
|
@@ -20,11 +20,6 @@ | |
import javax.swing.JOptionPane; | ||
import javax.swing.JTextArea; | ||
|
||
/** | ||
* Menu MenuFontAction class. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class MenuFontAction extends MenuBaseAction { | ||
|
||
|
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 |
---|---|---|
|
@@ -19,11 +19,6 @@ | |
|
||
import org.jboss.aesh.mterm.gui.MtermUI; | ||
|
||
/** | ||
* Menu MenuFullScreenAction class. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class MenuFullScreenAction extends MenuBaseAction { | ||
|
||
|
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 |
---|---|---|
|
@@ -19,11 +19,6 @@ | |
|
||
import org.jboss.aesh.mterm.gui.MtermUI; | ||
|
||
/** | ||
* Menu MenuNewAction class. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class MenuNewAction extends MenuBaseAction { | ||
|
||
|
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 |
---|---|---|
|
@@ -23,13 +23,6 @@ | |
import javax.swing.ImageIcon; | ||
import javax.swing.JTextArea; | ||
|
||
import org.jboss.aesh.mterm.gui.MessageDialog; | ||
|
||
/** | ||
* Menu MenuPasteAction class. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class MenuPasteAction extends MenuBaseAction { | ||
|
||
|
@@ -52,7 +45,7 @@ public void actionPerformed(ActionEvent e) { | |
textArea.replaceRange(clip, textArea.getSelectionStart(), textArea.getSelectionEnd()); | ||
} | ||
catch (UnsupportedFlavorException | IOException ex) { | ||
new MessageDialog().error(ex.getMessage()); | ||
ex.printStackTrace(); | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -19,11 +19,6 @@ | |
|
||
import org.jboss.aesh.mterm.gui.MtermUI; | ||
|
||
/** | ||
* Menu MenuTitleAction class. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class MenuTitleAction extends MenuBaseAction { | ||
|
||
|
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 |
---|---|---|
|
@@ -26,11 +26,6 @@ | |
import org.jboss.aesh.mterm.action.TabAction; | ||
import org.jboss.aesh.mterm.filter.MtermNavigationFilter; | ||
|
||
/** | ||
* EventConfig configures terminal events. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
public class EventConfig { | ||
|
||
private JScrollPane scrollPane; | ||
|
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 |
---|---|---|
|
@@ -20,11 +20,6 @@ | |
import org.jboss.aesh.mterm.action.BlockAction; | ||
import org.jboss.aesh.mterm.util.MtermUtil; | ||
|
||
/** | ||
* MtermNavigationFilter takes care of the caret position. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
public class MtermNavigationFilter extends NavigationFilter { | ||
|
||
private int promptStringLength = MtermUtil.INSTANCE.getPs1().length(); | ||
|
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 |
---|---|---|
|
@@ -18,11 +18,6 @@ | |
|
||
import org.jboss.aesh.mterm.action.menu.MenuBaseAction; | ||
|
||
/** | ||
* The menu class. | ||
* | ||
* @author <a href="mailto:[email protected]">Helio Frota</a> | ||
*/ | ||
class Menu { | ||
|
||
private JMenuBar menuBar; | ||
|
Oops, something went wrong.