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

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

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

JComponent.isLightweightComponent介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-dlight-visualizers

public void mousePressed(MouseEvent event) {
  if (internalMousePressed) {
    return;
  }
  JComponent component = cellTipComponent;
  hideCellTip();
  Object source = event.getSource();
  if (source instanceof Component && !JComponent.isLightweightComponent((Component) source)) {
    heavyweightPopupClosed = true;
    internalMousePressed = true;
    ((CellTipAware) component).processMouseEvent(SwingUtilities.convertMouseEvent((Component) event.getSource(), event,
        component));
    internalMousePressed = false;
  } else {
    heavyweightPopupClosed = false;
  }
}

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

+ (bol = pop.isLightweight()));
System.out.println("before visible, out of EDT ---> "
    + (bol = pop.isLightweightComponent(comb)));
pop.setLightWeightPopupEnabled(true);
pop.add(comb);
    + (bol = comb.isLightweight()));
System.out.println("before visible, out of EDT ---> "
    + (bol = JComponent.isLightweightComponent(comb)));
System.out.println("before visible, out of EDT ---> "
    + (bol = button.isLightweight()));
System.out.println("before visible, out of EDT ---> "
    + (bol = JComponent.isLightweightComponent(button)));
System.out.println("before visible, out of EDT ---> "
    + (bol = label.isLightweight()));
System.out.println("before visible, out of EDT ---> "
    + (bol = JComponent.isLightweightComponent(label)));
        + (bol = pop.isLightweight()));
    System.out.println("JComponents are visible, on EDT ---> "
        + (bol = pop.isLightweightComponent(comb)));
    System.out.println("JComponents are visible, on EDT ---> "
        + (bol = comb.isLightweight()));
    System.out.println("JComponents are visible, on EDT ---> "
        + (bol = JComponent.isLightweightComponent(comb)));
    System.out.println("JComponents are visible, on EDT ---> "
        + (bol = button.isLightweight()));
    System.out.println("JComponents are visible, on EDT ---> "
        + (bol = JComponent.isLightweightComponent(button)));

代码示例来源:origin: org.netbeans.modules/org-netbeans-lib-profiler-ui

public void mousePressed(MouseEvent event) {
  if (internalMousePressed) {
    return;
  }
  JComponent component = cellTipComponent;
  hideCellTip();
  Object source = event.getSource();
  if (source instanceof Component && !JComponent.isLightweightComponent((Component) source)) {
    heavyweightPopupClosed = true;
    internalMousePressed = true;
    ((CellTipAware) component).processMouseEvent(SwingUtilities.convertMouseEvent((Component)source, event,
                                           component));
    // #241878 immediately send mouseReleased which won't be called automatically on closing the popup
    MouseEvent event2 = new MouseEvent((Component)source, MouseEvent.MOUSE_RELEASED,
                      event.getWhen() + 1, event.getModifiers(),
                      event.getX(), event.getY(), event.getClickCount(),
                      event.isPopupTrigger());
    ((CellTipAware) component).processMouseEvent(SwingUtilities.convertMouseEvent(
                      (Component)source, event2, component));
    internalMousePressed = false;
  } else {
    heavyweightPopupClosed = false;
  }
}

代码示例来源:origin: fr.avianey.apache-xmlgraphics/batik

Component comp = cmp.getComponent(i);
if( comp != null && JComponent.isLightweightComponent(comp) && comp.isVisible() ) {
  Rectangle cr = null;
  boolean isJComponent = (comp instanceof JComponent);

代码示例来源:origin: apache/batik

Component comp = cmp.getComponent(i);
if( comp != null && JComponent.isLightweightComponent(comp) && comp.isVisible() ) {
  Rectangle cr = null;
  boolean isJComponent = (comp instanceof JComponent);

相关文章

JComponent类方法