Package org.opentrafficsim.swing.gui
Class GhostText
java.lang.Object
org.opentrafficsim.swing.gui.GhostText
- All Implemented Interfaces:
FocusListener
,PropertyChangeListener
,EventListener
,DocumentListener
public class GhostText
extends Object
implements FocusListener, DocumentListener, PropertyChangeListener
Code taken from stack overflow.
Copyright (c) 2024-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Wouter Schakel
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
delete()
Delete ghost text.void
void
Get ghost color.void
void
void
void
setGhostColor
(Color ghostColor) Set ghost color.
-
Constructor Details
-
GhostText
Constructor.- Parameters:
textComp
- JTextComponent; text component to receive ghost text.ghostText
- String; ghost text.
-
-
Method Details
-
delete
public void delete()Delete ghost text. -
getGhostColor
Get ghost color.- Returns:
- Color; ghost color.
-
setGhostColor
Set ghost color.- Parameters:
ghostColor
- Color; ghost color.
-
focusGained
- Specified by:
focusGained
in interfaceFocusListener
-
focusLost
- Specified by:
focusLost
in interfaceFocusListener
-
propertyChange
- Specified by:
propertyChange
in interfacePropertyChangeListener
-
changedUpdate
- Specified by:
changedUpdate
in interfaceDocumentListener
-
insertUpdate
- Specified by:
insertUpdate
in interfaceDocumentListener
-
removeUpdate
- Specified by:
removeUpdate
in interfaceDocumentListener
-