public class SwingConnectionManager extends Object implements ActionListener, ChangeListener, ListSelectionListener, TreeSelectionListener, CaretListener, FocusListener, PropertyChangeListener, DocumentListener
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent pAction)
This method is not part of the public API, it's internally used as
the Swing callback method and forwards pAction to the registered
objekt.
|
void |
caretUpdate(CaretEvent pCaret)
This method is not part of the public API, it's internally used as
the Swing callback method and forwards pCaret to the registered
objekt.
|
void |
changedUpdate(DocumentEvent pDocumentEvent)
This method is not part of the public API, it's internally used as
the Swing callback method and forwards pFocus to the registered
objekt.
|
static void |
createActionConnection(AbstractButton pActionSource,
Object pTarget,
String pMethodName)
This methods provides callback dispatching for all Swing buttons (derived
from javax.swing.AbstractButton).
|
static void |
createActionConnection(DispatcherAction pActionSource,
Object pTarget,
String pMethodName)
This methods provides callback dispatching for the DispatcherAction.
|
static void |
createActionConnection(JComboBox pActionSource,
Object pTarget,
String pMethodName)
This methods provides callback dispatching for a Swing JComboBox.
|
static void |
createActionConnection(JTextField pActionSource,
Object pTarget,
String pMethodName)
This methods provides callback dispatching for all Swing one-line text
fields (derived from javax.swing.JTextField).
|
static void |
createCaretConnection(JTextComponent pCaretSource,
Object pTarget,
String pMethodName)
This methods provides callback dispatching for all Swing one-line text
fields (derived from JTextComponent).
|
static void |
createChangeConnection(AbstractButton pChangeSource,
Object pTarget,
String pMethodName)
This methods provides callback dispatching for all Swing buttons (derived
from javax.swing.AbstractButton).
|
static void |
createChangeConnection(JSlider pChangeSource,
Object pTarget,
String pMethodName)
This methods provides callback dispatching for a Swing JSlider.
|
static void |
createChangeConnection(JSpinner pChangeSource,
Object pTarget,
String pMethodName)
This methods provides callback dispatching for a JSpinner.
|
static void |
createChangeConnection(JTabbedPane pChangeSource,
Object pTarget,
String pMethodName)
This methods provides callback dispatching for a JTabbedPane.
|
static void |
createDocumentConnection(Document pDocumentSource,
Object pTarget,
String pMethodName)
This methods provides callback dispatching for a Document.
|
static void |
createDocumentConnection(JTextComponent pDocumentSource,
Object pTarget,
String pMethodName)
This methods provides callback dispatching for the document of a
Swing JTextComponent.
|
static void |
createFocusConnection(JComponent pFocusSource,
Object pTarget,
String pMethodName)
This methods provides focus callback dispatching for all JComponent's.
|
static void |
createListSelectionConnection(JList pListSelectionSource,
Object pTarget,
String pMethodName)
This methods provides callback dispatching for JList's.
|
static void |
createListSelectionConnection(JTable pListSelectionSource,
Object pTarget,
String pMethodName)
This methods provides callback dispatching for JTable's.
|
static void |
createPropertyChangeConnection(JComponent pPropertyChangeSource,
Object pTarget,
String pMethodName)
This methods provides property change callback dispatching
for all JComponent's.
|
static void |
createTreeSelectionConnection(JTree pTreeSelectionSource,
Object pTarget,
String pMethodName)
This methods provides callback dispatching for JTree's.
|
void |
focusGained(FocusEvent pFocus)
This method is not part of the public API, it's internally used as
the Swing callback method and forwards pFocus to the registered
objekt.
|
void |
focusLost(FocusEvent pFocus)
This method is not part of the public API, it's internally used as
the Swing callback method and forwards pFocus to the registered
objekt.
|
void |
insertUpdate(DocumentEvent pDocumentEvent)
This method is not part of the public API, it's internally used as
the Swing callback method and forwards pFocus to the registered
objekt.
|
void |
propertyChange(PropertyChangeEvent pPropertyChange)
This method is not part of the public API, it's internally used as
the Swing callback method and forwards pFocus to the registered
objekt.
|
static void |
removeConnection(Object pTarget)
This methods removes all mappings pointing to the target object.
|
void |
removeUpdate(DocumentEvent pDocumentEvent)
This method is not part of the public API, it's internally used as
the Swing callback method and forwards pFocus to the registered
objekt.
|
void |
stateChanged(ChangeEvent pChange)
This method is not part of the public API, it's internally used as
the Swing callback method and forwards pChange to the registered
objekt.
|
void |
valueChanged(ListSelectionEvent pListSelection)
This method is not part of the public API, it's internally used as
the Swing callback method and forwards pListSelection to the registered
objekt.
|
void |
valueChanged(TreeSelectionEvent pTreeSelection)
This method is not part of the public API, it's internally used as
the Swing callback method and forwards pTreeSelection to the registered
objekt.
|
public static void createActionConnection(JComboBox pActionSource, Object pTarget, String pMethodName)
pActionSource
- the combo box instance triggering the callbackpTarget
- the target for the callbackpMethodName
- the method of pTarget we should call backIllegalArgumentException
- if pActionSource or pTarget or pMethodName is null
or pMethodName is not a method of pTarget with
the right signaturepublic static void createActionConnection(JTextField pActionSource, Object pTarget, String pMethodName)
pActionSource
- the text field instance triggering the callbackpTarget
- the target for the callbackpMethodName
- the method of pTarget we should call backIllegalArgumentException
- if pActionSource or pTarget or pMethodName is null
or pMethodName is not a method of pTarget with
the right signaturepublic static void createActionConnection(AbstractButton pActionSource, Object pTarget, String pMethodName)
pActionSource
- the button instance triggering the callbackpTarget
- the target for the callbackpMethodName
- the method of pTarget we should call backIllegalArgumentException
- if pActionSource or pTarget or pMethodName is null
or pMethodName is not a method of pTarget with
the right signaturepublic static void createActionConnection(DispatcherAction pActionSource, Object pTarget, String pMethodName)
pActionSource
- the DispatcherAction instance triggering the callbackpTarget
- the target for the callbackpMethodName
- the method of pTarget we should call backIllegalArgumentException
- if pActionSource or pTarget or pMethodName is null
or pMethodName is not a method of pTarget with
the right signaturepublic static void createChangeConnection(JSlider pChangeSource, Object pTarget, String pMethodName)
pChangeSource
- the slider instance triggering the callbackpTarget
- the target for the callbackpMethodName
- the method of pTarget we should call backIllegalArgumentException
- if pChangeSource or pTarget or pMethodName is null
or pMethodName is not a method of pTarget with
the right signaturepublic static void createChangeConnection(AbstractButton pChangeSource, Object pTarget, String pMethodName)
pChangeSource
- the button instance triggering the callbackpTarget
- the target for the callbackpMethodName
- the method of pTarget we should call backIllegalArgumentException
- if pChangeSource or pTarget or pMethodName is null
or pMethodName is not a method of pTarget with
the right signaturepublic static void createChangeConnection(JTabbedPane pChangeSource, Object pTarget, String pMethodName)
pChangeSource
- the tabbed pane instance triggering the callbackpTarget
- the target for the callbackpMethodName
- the method of pTarget we should call backIllegalArgumentException
- if pChangeSource or pTarget or pMethodName is null
or pMethodName is not a method of pTarget with
the right signaturepublic static void createChangeConnection(JSpinner pChangeSource, Object pTarget, String pMethodName)
pChangeSource
- the spinner instance triggering the callbackpTarget
- the target for the callbackpMethodName
- the method of pTarget we should call backIllegalArgumentException
- if pChangeSource or pTarget or pMethodName is null
or pMethodName is not a method of pTarget with
the right signaturepublic static void createTreeSelectionConnection(JTree pTreeSelectionSource, Object pTarget, String pMethodName)
pTreeSelectionSource
- the JTree instance triggering the callbackpTarget
- the target for the callbackpMethodName
- the method of pTarget we should call backIllegalArgumentException
- if pTreeSelectionSource or pTarget or pMethodName is null
or pMethodName is not a method of pTarget with
the right signaturepublic static void createListSelectionConnection(JList pListSelectionSource, Object pTarget, String pMethodName)
pListSelectionSource
- the JList instance triggering the callbackpTarget
- the target for the callbackpMethodName
- the method of pTarget we should call backIllegalArgumentException
- if pListSelectionSource or pTarget or pMethodName is null
or pMethodName is not a method of pTarget with
the right signaturepublic static void createListSelectionConnection(JTable pListSelectionSource, Object pTarget, String pMethodName)
pListSelectionSource
- the JTable instance triggering the callbackpTarget
- the target for the callbackpMethodName
- the method of pTarget we should call backIllegalArgumentException
- if pListSelectionSource or pTarget or pMethodName is null
or pMethodName is not a method of pTarget with
the right signaturepublic static void createCaretConnection(JTextComponent pCaretSource, Object pTarget, String pMethodName)
pCaretSource
- the text field instance triggering the callbackpTarget
- the target for the callbackpMethodName
- the method of pTarget we should call backIllegalArgumentException
- if pCaretSource or pTarget or pMethodName is null
or pMethodName is not a method of pTarget with
the right signaturepublic static void createFocusConnection(JComponent pFocusSource, Object pTarget, String pMethodName)
pFocusSource
- the Swing component triggering the callbackpTarget
- the target for the callbackpMethodName
- the method of pTarget we should call backIllegalArgumentException
- if pFocusSource or pTarget or pMethodName is null
or pMethodName is not a method of pTarget with
the right signaturepublic static void createPropertyChangeConnection(JComponent pPropertyChangeSource, Object pTarget, String pMethodName)
pPropertyChangeSource
- the Swing component triggering the callbackpTarget
- the target for the callbackpMethodName
- the method of pTarget we should call backIllegalArgumentException
- if pPropertyChangeSource or pTarget or pMethodName
is null or pMethodName is not a method of pTarget
with the right signaturepublic static void createDocumentConnection(JTextComponent pDocumentSource, Object pTarget, String pMethodName)
pDocumentSource
- the text component containing the document that will trigger the callbackpTarget
- the target for the callbackpMethodName
- the method of pTarget we should call backIllegalArgumentException
- if pChangeSource or pTarget or pMethodName is null
or pMethodName is not a method of pTarget with
the right signaturepublic static void createDocumentConnection(Document pDocumentSource, Object pTarget, String pMethodName)
pDocumentSource
- the text component containing the document that will trigger the callbackpTarget
- the target for the callbackpMethodName
- the method of pTarget we should call backIllegalArgumentException
- if pChangeSource or pTarget or pMethodName is null
or pMethodName is not a method of pTarget with
the right signaturepublic static void removeConnection(Object pTarget)
pTarget
- the target all mappings should be removed frompublic void actionPerformed(ActionEvent pAction)
actionPerformed
in interface ActionListener
pAction
- event describing the actionpublic void stateChanged(ChangeEvent pChange)
stateChanged
in interface ChangeListener
pChange
- event describing the changepublic void valueChanged(TreeSelectionEvent pTreeSelection)
valueChanged
in interface TreeSelectionListener
pTreeSelection
- event describing the new tree selectionpublic void valueChanged(ListSelectionEvent pListSelection)
valueChanged
in interface ListSelectionListener
pListSelection
- event describing the new list selectionpublic void caretUpdate(CaretEvent pCaret)
caretUpdate
in interface CaretListener
pCaret
- event describing the new caret positionpublic void focusGained(FocusEvent pFocus)
focusGained
in interface FocusListener
pFocus
- event describing the new focus situationpublic void focusLost(FocusEvent pFocus)
focusLost
in interface FocusListener
pFocus
- event describing the new focus situationpublic void propertyChange(PropertyChangeEvent pPropertyChange)
propertyChange
in interface PropertyChangeListener
pPropertyChange
- event describing the new property situationpublic void insertUpdate(DocumentEvent pDocumentEvent)
insertUpdate
in interface DocumentListener
pDocumentEvent
- event describing the new document situationpublic void removeUpdate(DocumentEvent pDocumentEvent)
removeUpdate
in interface DocumentListener
pDocumentEvent
- event describing the new document situationpublic void changedUpdate(DocumentEvent pDocumentEvent)
changedUpdate
in interface DocumentListener
pDocumentEvent
- event describing the new document situationCopyright © 2017 Jürgen Zeller (privat). All rights reserved.