Package jmri.jmrit.display
Class ToolTip
- java.lang.Object
-
- jmri.jmrit.display.ToolTip
-
public class ToolTip extends java.lang.Object
Implements Tooltips for Positionable objects.
-
-
Constructor Summary
Constructors Constructor Description ToolTip(java.lang.String text, int x, int y, java.awt.Font font, java.awt.Color fontColor, java.awt.Color backgroundColor, java.awt.Color borderColor, Positionable pos)
ToolTip(java.lang.String text, int x, int y, Positionable pos)
ToolTip(ToolTip tooltip, Positionable pos)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Color
getBackgroundColor()
java.awt.Color
getBorderColor()
java.awt.Color
getFontColor()
int
getFontSize()
Positionable
getPositionable()
boolean
getPrependToolTipWithDisplayName()
java.lang.String
getText()
java.lang.String
getTextToDisplay()
void
paint(java.awt.Graphics2D g2d, double scale)
void
setBackgroundColor(java.awt.Color backgroundColor)
void
setBoderColor(java.awt.Color borderColor)
void
setFontColor(java.awt.Color fontColor)
void
setFontSize(int size)
void
setLocation(int x, int y)
void
setPositionable(Positionable pos)
void
setPrependToolTipWithDisplayName(boolean value)
void
setText(java.lang.String text)
-
-
-
Constructor Detail
-
ToolTip
public ToolTip(java.lang.String text, int x, int y, Positionable pos)
- Parameters:
text
- tooltip textx
- x coord of Positionable's screen locationy
- y coord of Positionable's screen locationpos
- Positionable of this Tooltip
-
ToolTip
public ToolTip(ToolTip tooltip, Positionable pos)
- Parameters:
tooltip
- toolTip to clonepos
- Positionable of this Tooltip
-
ToolTip
public ToolTip(java.lang.String text, int x, int y, java.awt.Font font, java.awt.Color fontColor, java.awt.Color backgroundColor, java.awt.Color borderColor, Positionable pos)
- Parameters:
text
- tooltip textx
- x coord of Positionable's screen locationy
- y coord of Positionable's screen locationfont
- tooltip fontfontColor
- tooltip font colorbackgroundColor
- tooltip background colorborderColor
- tooltip border colorpos
- Positionable of this Tooltip
-
-
Method Detail
-
setPositionable
public final void setPositionable(Positionable pos)
-
getPositionable
public final Positionable getPositionable()
-
setText
public final void setText(java.lang.String text)
-
getText
public final java.lang.String getText()
-
setPrependToolTipWithDisplayName
public final void setPrependToolTipWithDisplayName(boolean value)
-
getPrependToolTipWithDisplayName
public final boolean getPrependToolTipWithDisplayName()
-
setLocation
public final void setLocation(int x, int y)
-
setFontSize
public final void setFontSize(int size)
-
getFontSize
public final int getFontSize()
-
setFontColor
public final void setFontColor(java.awt.Color fontColor)
-
getFontColor
public final java.awt.Color getFontColor()
-
setBackgroundColor
public final void setBackgroundColor(java.awt.Color backgroundColor)
-
getBackgroundColor
public final java.awt.Color getBackgroundColor()
-
setBoderColor
public final void setBoderColor(java.awt.Color borderColor)
-
getBorderColor
public final java.awt.Color getBorderColor()
-
getTextToDisplay
public java.lang.String getTextToDisplay()
-
paint
public void paint(java.awt.Graphics2D g2d, double scale)
-
-