javax.swing.JPanel.getComponentAt()方法的使用及代码示例

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

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

JPanel.getComponentAt介绍

暂无

代码示例

代码示例来源:origin: omegat-org/omegat

@Override
  public String getKeyAtPoint(Point p) {
    Component comp = panel.getComponentAt(p);
    if (comp instanceof SegmentPropertiesListCell) {
      return ((SegmentPropertiesListCell) comp).key;
    }
    return null;
  }
}

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

public Component getComponentAt(int x, int y) {
  getLayout().layoutContainer(this);
  Component result = super.getComponentAt(x, y);
  System.err.println("getComponentAt " + x + "," + y + " returning " + result.getName());
  return result;
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

public Component getComponentAt(int x, int y) {
  getLayout().layoutContainer(this);
  Component result = super.getComponentAt(x,y);
  System.err.println("getComponentAt " + x + "," + y + " returning " + result.getName());
  return result;
}

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

public Component getComponentAt(int x, int y) {
  getLayout().layoutContainer(this);
  Component result = super.getComponentAt(x,y);
  System.err.println("getComponentAt " + x + "," + y + " returning " + result.getName());
  return result;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-xml-xam-ui

Component comp = mainParentPanel.getComponentAt(location);
if (comp instanceof JSplitterBar) {

代码示例来源:origin: akquinet/jbosscc-as7-examples

/**
 * Implements method for the <tt>MouseListener</tt> interface to initiate
 * shape dragging.
 *
 * @param evt
 *            The associated mouse event.
 **/
public void mousePressed(MouseEvent evt) {
  Component c = m_panel.getComponentAt(evt.getPoint());
  if (c instanceof ShapeComponent) {
    m_selectedComponent = (ShapeComponent) c;
    m_panel.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
    m_panel.addMouseMotionListener(this);
    m_selectedComponent.repaint();
  }
}

代码示例来源:origin: stackoverflow.com

Component c = panel.getComponentAt(e.getPoint()); // compare with panel.findComponentAt
System.out.println("Open context menu for " + c.getName());

相关文章

JPanel类方法