本文整理了Java中javax.swing.JComponent.createToolTip()
方法的一些代码示例,展示了JComponent.createToolTip()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JComponent.createToolTip()
方法的具体详情如下:
包路径:javax.swing.JComponent
类名称:JComponent
方法名:createToolTip
暂无
代码示例来源:origin: org.netbeans.api/org-openide-explorer
@Override
public JToolTip createToolTip() {
if (component instanceof JComponent) {
return ((JComponent) component).createToolTip();
} else {
return super.createToolTip();
}
}
代码示例来源:origin: de.sciss/prefuse-core
/**
* Returns the tooltip instance to use for this Display. By default, uses
* the normal Swing tooltips, returning the result of this same method
* invoked on the JComponent super-class. If a custom tooltip has been
* set, that is returned instead.
* @see #setCustomToolTip(JToolTip)
* @see javax.swing.JComponent#createToolTip()
*/
public JToolTip createToolTip() {
if ( m_customToolTip == null ) {
return super.createToolTip();
} else {
return m_customToolTip;
}
}
代码示例来源:origin: xyz.cofe/docking-frames-core
public JToolTip createTooltip( Component component, TooltipStrategyCallback callback ){
if( component instanceof JComponent ){
return ((JComponent)component).createToolTip();
}
else{
return callback.createToolTip();
}
}
}
代码示例来源:origin: org.opentcs.thirdparty.dockingframes/docking-frames-core
public JToolTip createTooltip( Component component, TooltipStrategyCallback callback ){
if( component instanceof JComponent ){
return ((JComponent)component).createToolTip();
}
else{
return callback.createToolTip();
}
}
}
代码示例来源:origin: freeplane/freeplane
private void showTipWindow() {
Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
if (insideComponent == null || !insideComponent.isShowing() || focusOwner == null)
return;
tip = insideComponent.createToolTip();
tip.setTipText(toolTipText);
final JComponent nearComponent = insideComponent;
focusOwnerRef = new WeakReference<Component>(focusOwner);
tipPopup = new JPopupMenu();
tipPopup.setLayout(new GridLayout(1, 1));
tipPopup.add(tip);
mouseInsideTooltipListener = new MouseInsideListener(tipPopup);
final Component placedComponent = tipPopup;
Point location = UITools.findBestLocation(placedComponent, nearComponent);
SwingUtilities.convertPointFromScreen(location, nearComponent);
tipPopup.show(nearComponent, location.x, location.y);
focusOwner.requestFocusInWindow();
exitTimer.start();
}
代码示例来源:origin: stackoverflow.com
panel.createToolTip().setDoubleBuffered(true);
代码示例来源:origin: edu.stanford.protege/ca.uvic.cs.chisel.cajun
tip = insideComponent.createToolTip();
tip.setTipText(toolTipText);
size = tip.getPreferredSize();
内容来源于网络,如有侵权,请联系作者删除!