Package hipp.com.wappedidpadpro2
Class MyActionListener
java.lang.Object
hipp.com.wappedidpadpro2.MyActionListener
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.util.EventListener
public class MyActionListener
extends java.lang.Object
implements java.awt.event.ActionListener
MyActionListener
listen for all actions happen in WAppEditpadPro2
listen for all actions happen in WAppEditpadPro2
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Hashtable<java.lang.Object,javax.swing.Action>
actions
private DocumentParser
docParser
private boolean
doSave
private WAppEditFindDialog
findDialog
protected WAppRedoAction
redoAction
private javax.swing.JComponent[]
redoComponent
private WAppEditFindDialog
replaceDialog
private WAppEditpadPro2
theApp
protected javax.swing.undo.UndoManager
undo
protected WAppUndoAction
undoAction
private javax.swing.JComponent[]
undoComponent
-
Constructor Summary
Constructors Constructor Description MyActionListener(WAppEditpadPro2 _theApp)
-
Method Summary
Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent _ae)
listens for all possible actionsvoid
createActionTable(WappProTextPane textComponent)
The following two methods allow us to find an action provided by the editor kit by its name.protected void
doColorAction(WappProTextPane jTxtP)
private void
doExitAction()
private void
doFindAction()
private void
doLuFAction(java.lang.String whatAction)
private void
doOpenFileAction(javax.swing.JTextPane jTxtP)
private void
doReplaceAction()
private void
doSaveFileAction(javax.swing.JTextPane jTxtP)
private javax.swing.Action
getActionByName(java.lang.String name)
protected WAppEditFindDialog
getFindDialog()
protected WAppEditFindDialog
getReplaceDialog()
private java.lang.String
openFileDialog(boolean save)
protected void
removeHighlights(WappProTextPane jTxtP)
remove the highlightsprotected void
resetUndoManager()
Resets the undo manager.private void
setDocInfos(WappProTextPane jTxtP)
protected void
setHighlights(WappProTextPane jTxtP)
set Highlights in the text documentprotected void
setLookAndFeel(java.lang.String laf, java.awt.Color c)
protected void
setTextActions(WappProTextPane jTxtPane)
void
setUndoComponents()
-
Field Details
-
theApp
-
findDialog
-
replaceDialog
-
actions
protected java.util.Hashtable<java.lang.Object,javax.swing.Action> actions -
undoAction
-
redoAction
-
undo
protected javax.swing.undo.UndoManager undo -
undoComponent
private javax.swing.JComponent[] undoComponent -
redoComponent
private javax.swing.JComponent[] redoComponent -
doSave
private boolean doSave -
docParser
-
-
Constructor Details
-
MyActionListener
- Parameters:
_theApp
-WAppEditpadPro2
reference to the Main ApplicationWAppEditpadPro2
-
-
Method Details
-
doExitAction
private void doExitAction() -
setUndoComponents
public void setUndoComponents() -
getReplaceDialog
-
getFindDialog
-
doFindAction
private void doFindAction() -
doReplaceAction
private void doReplaceAction() -
setTextActions
- Parameters:
jTxtPane
-WappProTextPane
-
createActionTable
The following two methods allow us to find an action provided by the editor kit by its name.- Parameters:
textComponent
-WappProTextPane
-
getActionByName
private javax.swing.Action getActionByName(java.lang.String name) -
doColorAction
- Parameters:
jTxtP
-WappProTextPane
choice a color for the marked text inWappProTextPane
-
setHighlights
set Highlights in the text document- Parameters:
jTxtP
-WappProTextPane
WappProTextPane
-
removeHighlights
remove the highlights- Parameters:
jTxtP
-WappProTextPane
WappProTextPane
-
setLookAndFeel
protected void setLookAndFeel(java.lang.String laf, java.awt.Color c) -
doLuFAction
private void doLuFAction(java.lang.String whatAction) -
resetUndoManager
protected void resetUndoManager()Resets the undo manager. -
openFileDialog
private java.lang.String openFileDialog(boolean save) -
doOpenFileAction
private void doOpenFileAction(javax.swing.JTextPane jTxtP) -
doSaveFileAction
private void doSaveFileAction(javax.swing.JTextPane jTxtP) -
setDocInfos
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent _ae)listens for all possible actions- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Parameters:
_ae
-(ActionEvent
-