com.jstatcom.ts
Class DefaultTSKeyListener
- java.lang.Object
-
- java.awt.event.KeyAdapter
-
- com.jstatcom.ts.DefaultTSKeyListener
-
- All Implemented Interfaces:
- java.awt.event.KeyListener, java.util.EventListener
public class DefaultTSKeyListener extends java.awt.event.KeyAdapterAKeyListenerthat is especially designed to be used with theTSList. It is meant to be shared betweenTSListinstances, but can also be created and subclassed if necessary.
-
-
Constructor Summary
Constructors Constructor and Description DefaultTSKeyListener(java.lang.String name)Creates aDefaultTSKeyListenerwith a descriptive name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static DefaultTSKeyListenergetSharedInstance()Returns an instance of theDefaultTSKeyListener, that can be shared across allTSListinstances.voidkeyPressed(java.awt.event.KeyEvent keyEvent)The following keys are recognized:
KeyEvent.VK_DELETE- all selected series are deletedjava.lang.StringtoString()Returns a string representation ofDefaultTSKeyListener.
-
-
-
Constructor Detail
-
DefaultTSKeyListener
public DefaultTSKeyListener(java.lang.String name)
Creates aDefaultTSKeyListenerwith a descriptive name. Use the constructor only, if you need a instance that should be different fromgetSharedInstancevia subclassing.
-
-
Method Detail
-
getSharedInstance
public static DefaultTSKeyListener getSharedInstance()
Returns an instance of theDefaultTSKeyListener, that can be shared across allTSListinstances. It is also possible to create subclasses that can be individually configured and set to aTSListthat should have a differentKeyListener.- Returns:
- an instance of this class that can be shared
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent keyEvent)
The following keys are recognized:
KeyEvent.VK_DELETE- all selected series are deleted- Specified by:
keyPressedin interfacejava.awt.event.KeyListener- Overrides:
keyPressedin classjava.awt.event.KeyAdapter- Parameters:
keyEvent- a key event
-
toString
public java.lang.String toString()
Returns a string representation ofDefaultTSKeyListener.- Overrides:
toStringin classjava.lang.Object- Returns:
- string representation
-
-
DMelt 3.0 © DataMelt by jWork.ORG