javax.swing.JLayeredPane.getLayeredPaneAbove()方法的使用及代码示例

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

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

JLayeredPane.getLayeredPaneAbove介绍

暂无

代码示例

代码示例来源:origin: com.samskivert/samskivert

/**
 * Creates a dialog that will display itself in the layered pane of
 * the frame that contains the supplied component.
 */
public JInternalDialog (JComponent friend)
{
  this(JLayeredPane.getLayeredPaneAbove(friend));
}

代码示例来源:origin: org.netbeans.api/org-netbeans-spi-quicksearch

JLayeredPane lPane = JLayeredPane.getLayeredPaneAbove(comboBar);
if (lPane == null) {

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

currentPane = JLayeredPane.getLayeredPaneAbove( owner );

代码示例来源:origin: com.threerings/nenya

/**
 * Renders all components in all {@link JLayeredPane} layers that intersect the supplied
 * bounds.
 */
protected void renderLayers (Graphics2D g, Component pcomp, Rectangle bounds,
  boolean[] clipped, Rectangle dirty)
{
  JLayeredPane lpane = JLayeredPane.getLayeredPaneAbove(pcomp);
  if (lpane != null) {
    renderLayer(g, bounds, lpane, clipped, JLayeredPane.PALETTE_LAYER);
    renderLayer(g, bounds, lpane, clipped, JLayeredPane.MODAL_LAYER);
    renderLayer(g, bounds, lpane, clipped, JLayeredPane.POPUP_LAYER);
    renderLayer(g, bounds, lpane, clipped, JLayeredPane.DRAG_LAYER);
  }
  // if we have a MediaOverlay, let it know that any sprites in this region need to be
  // repainted as the components beneath them have just been redrawn
  if (_overlay != null) {
    _overlay.addDirtyRegion(dirty);
  }
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-bugtracking

/**
 * Updates size and visibility of this panel according to model content
 */
public void updatePopup () {
  int modelSize = rModel.getSize();
  // plug this popup into layered pane if needed
  JLayeredPane lPane = JLayeredPane.getLayeredPaneAbove(comboBar);
  // lPane can be null when the corresponding dialog is closed already
  // for example, when the user didn't want to wait until the search finishes
  if (!isDisplayable() && (lPane != null)) {
    lPane.add(this, new Integer(JLayeredPane.POPUP_LAYER + 1) );
  }
  boolean statusVisible = updateStatusPanel();
  if(lPane != null) {
    computePopupBounds(popupBounds, lPane, modelSize);
    setBounds(popupBounds);
  }
  // popup visibility constraints
  if ((modelSize > 0 || statusVisible) && comboBar.isTextFieldFocusOwner()) {
    if (jList1.getSelectedIndex() >= modelSize) {
      jList1.setSelectedIndex(modelSize - 1);
    }
    setVisible(true);
  } else {
    setVisible(false);
  }
  // needed on JDK 1.5.x to repaint correctly
  revalidate();
}

代码示例来源:origin: threerings/nenya

/**
 * Renders all components in all {@link JLayeredPane} layers that intersect the supplied
 * bounds.
 */
protected void renderLayers (Graphics2D g, Component pcomp, Rectangle bounds,
  boolean[] clipped, Rectangle dirty)
{
  JLayeredPane lpane = JLayeredPane.getLayeredPaneAbove(pcomp);
  if (lpane != null) {
    renderLayer(g, bounds, lpane, clipped, JLayeredPane.PALETTE_LAYER);
    renderLayer(g, bounds, lpane, clipped, JLayeredPane.MODAL_LAYER);
    renderLayer(g, bounds, lpane, clipped, JLayeredPane.POPUP_LAYER);
    renderLayer(g, bounds, lpane, clipped, JLayeredPane.DRAG_LAYER);
  }
  // if we have a MediaOverlay, let it know that any sprites in this region need to be
  // repainted as the components beneath them have just been redrawn
  if (_overlay != null) {
    _overlay.addDirtyRegion(dirty);
  }
}

相关文章