javax.swing.JComponent.getToolTipLocation()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中javax.swing.JComponent.getToolTipLocation()方法的一些代码示例,展示了JComponent.getToolTipLocation()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JComponent.getToolTipLocation()方法的具体详情如下:
包路径:javax.swing.JComponent
类名称:JComponent
方法名:getToolTipLocation

JComponent.getToolTipLocation介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.api/org-openide-explorer

@Override
public Point getToolTipLocation(MouseEvent event) {
  if (component instanceof JComponent) {
    return ((JComponent) component).getToolTipLocation(event);
  } else {
    return super.getToolTipLocation(event);
  }
}

代码示例来源:origin: org.fudaa.business/fudaa-common-corba

/**
 * @see javax.swing.JComponent#getToolTipLocation(java.awt.event.MouseEvent)
 */
public Point getToolTipLocation(final MouseEvent _evt) {
 Point r= super.getToolTipLocation(_evt);
 if (r == null) {
  final JToolTip tt= new JToolTip();
  tt.setToolTipText(getToolTipText());
  r= new Point(0, -tt.getPreferredSize().height - 1);
 }
 return r;
}
/**

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu

public final Point getToolTipLocation(MouseEvent _evt) {
 Point r = super.getToolTipLocation(_evt);
 if (r == null) {
  JToolTip tt = new JToolTip();
  tt.setToolTipText(getToolTipText());
  r = new Point(0, -tt.getPreferredSize().height - 1);
 }
 return r;
}

代码示例来源:origin: edu.stanford.protege/ca.uvic.cs.chisel.cajun

toolTipText = component.getToolTipText(event);
if (toolTipText != null) {
  preferredLocation = component.getToolTipLocation(event);
  mouseEvent = event;
  insideComponent = component;

代码示例来源:origin: edu.stanford.protege/ca.uvic.cs.chisel.cajun

if (showImmediately) {
  String newToolTipText = component.getToolTipText(event);
  Point newPreferredLocation = component.getToolTipLocation(event);
  boolean sameLoc = (preferredLocation != null) ? preferredLocation.equals(newPreferredLocation) : (newPreferredLocation == null);

代码示例来源:origin: edu.stanford.protege/ca.uvic.cs.chisel.cajun

public void actionPerformed(ActionEvent e) {
    if (insideComponent != null && insideComponent.isShowing()) {
      // Lazy lookup
      if (toolTipText == null && mouseEvent != null) {
        toolTipText = insideComponent.getToolTipText(mouseEvent);
        preferredLocation = insideComponent.getToolTipLocation(mouseEvent);
      }
      if (toolTipText != null) {
        showImmediately = true;
        showTipWindow();
      } else {
        insideComponent = null;
        toolTipText = null;
        preferredLocation = null;
        mouseEvent = null;
        hideTipWindow();
      }
    }
  }
}

代码示例来源:origin: edu.stanford.protege/ca.uvic.cs.chisel.cajun

public void actionPerformed(ActionEvent e) {
    if (insideComponent != null && insideComponent.isShowing()) {
      // Lazy lookup
      if (toolTipText == null && mouseEvent != null) {
        toolTipText = insideComponent.getToolTipText(mouseEvent);
        preferredLocation = insideComponent.getToolTipLocation(mouseEvent);
      }
      if (toolTipText != null) {
        showImmediately = true;
        showTipWindow();
      } else {
        insideComponent = null;
        toolTipText = null;
        preferredLocation = null;
        mouseEvent = null;
        hideTipWindow();
      }
    }
  }
}

相关文章

JComponent类方法