public class FocusableTip extends Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
FocusableTip.AttachedComponentListener |
| Modifier and Type | Field and Description |
|---|---|
protected JComponent |
attachedComponent |
protected FocusableTip.AttachedComponentListener |
attachedComponentListener |
static String |
DUMMY_TOOL_TIP |
protected int |
height
Height with default value.
|
protected HyperlinkListener |
hyperlinkListener |
protected URL |
imageBase |
protected Component |
lastComponent |
protected String |
lastText |
protected static int |
MARGIN
Margin from mouse cursor at which to draw focusable tip.
|
protected boolean |
showCopyContextMenu |
protected Rectangle |
tipVisibleBounds
The screen bounds in which the mouse has to stay for the currently
displayed tip to stay visible.
|
protected TipWindow |
tipWindow |
protected int |
width
Width with default value.
|
| Constructor and Description |
|---|
FocusableTip(JComponent attachedComponent)
FocusableTip constructor
|
FocusableTip(JComponent attachedComponent,
boolean showCopyContextMenu)
FocusableTip constructor
|
FocusableTip(JComponent attachedComponent,
HyperlinkListener listener)
FocusableTip constructor
|
FocusableTip(JComponent attachedComponent,
HyperlinkListener listener,
boolean showCopyContextMenu)
FocusableTip constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
computeTipVisibleBounds()
Compute the bounds in which the user can move the mouse without the
tip window disappearing.
|
protected void |
createAndShowTipWindow(MouseEvent e,
Component component,
String text) |
URL |
getImageBase()
Returns the base URL to use when loading images in this focusable tip.
|
TipWindow |
getTipWindows()
Get
TipWindow displayed |
void |
possiblyDisposeOfTipWindow()
Disposes of the focusable tip currently displayed, if any.
|
protected void |
setAttachedComponent(JComponent attachedComponent) |
void |
setImageBase(URL url)
Sets the base URL to use when loading images in this focusable tip.
|
void |
setSize(int width,
int height)
Change tip size.
|
void |
toolTipRequested(MouseEvent e,
Component component) |
void |
toolTipRequested(MouseEvent e,
String text) |
public static final String DUMMY_TOOL_TIP
protected JComponent attachedComponent
protected TipWindow tipWindow
protected URL imageBase
protected final FocusableTip.AttachedComponentListener attachedComponentListener
protected final HyperlinkListener hyperlinkListener
protected String lastText
protected Component lastComponent
protected final boolean showCopyContextMenu
protected int width
protected int height
protected final Rectangle tipVisibleBounds
protected static final int MARGIN
public FocusableTip(JComponent attachedComponent)
attachedComponent - component to attachpublic FocusableTip(JComponent attachedComponent, HyperlinkListener listener)
attachedComponent - component to attachlistener - hyper link listener to addpublic FocusableTip(JComponent attachedComponent, boolean showCopyContextMenu)
attachedComponent - component to attachshowCopyContextMenu - to show copy context menupublic FocusableTip(JComponent attachedComponent, HyperlinkListener listener, boolean showCopyContextMenu)
attachedComponent - component to attachlistener - hyper link listener to addshowCopyContextMenu - to show copy context menupublic void setSize(int width,
int height)
width - widthheight - heightprotected void computeTipVisibleBounds()
protected void createAndShowTipWindow(MouseEvent e, Component component, String text)
public URL getImageBase()
setImageBase(URL)public void possiblyDisposeOfTipWindow()
public void setImageBase(URL url)
url - The base URL to use.getImageBase()protected void setAttachedComponent(JComponent attachedComponent)
public void toolTipRequested(MouseEvent e, String text)
public void toolTipRequested(MouseEvent e, Component component)
Copyright © 2004–2017 Ultreia.io. All rights reserved.