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

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

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

JPanel.paintChildren介绍

暂无

代码示例

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@Override
protected void paintChildren(Graphics g) {
  paintingChildren = true;
  try {
    super.paintChildren(g);
  } finally {
    paintingChildren = false;
  }
}

代码示例来源:origin: crashinvaders/gdx-texture-packer-gui

protected void paintChildren (Graphics g) {
    super.paintChildren(g);
  }
}

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

public void paintChildren (Graphics g) {
  if ( !expanded ) return;
  super.paintChildren(g);
}

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

public void paintChildren (Graphics g) {
  if ( !expanded ) return;
  super.paintChildren(g);
}

代码示例来源:origin: xyz.cofe/docking-frames-core

@Override
public void paintChildren( Graphics g ){
  super.paintChildren( g );
}

代码示例来源:origin: tahaemara/object-recognition-tensorflow

protected void paintChildren (Graphics g) {
    super.paintChildren(g);
  }
}

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

@Override
protected void paintChildren(Graphics g) {
  Graphics2D g2d = (Graphics2D)g;
  Composite oldC = g2d.getComposite();
  g2d.setComposite( AlphaComposite.getInstance( AlphaComposite.SRC_OVER, currentAlpha ) );
  super.paintChildren(g);
  g2d.setComposite( oldC );
}

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

@Override
protected void paintChildren(Graphics g) {
  if (isEnabled()) {
    super.paintChildren(g);
  }
}

代码示例来源:origin: info.aduna.commons/aduna-commons-swing

public void paintChildren(Graphics g) {
  super.paintChildren(g);
  if (componentVisible) {
    Rectangle b = component.getBounds();
    g.drawImage(DRAG_TIP_IMAGE, b.x + b.width - 11, b.y + b.height - 11 + RESIZE_PANEL_SIZE.height, this);
  }
}

代码示例来源:origin: freeplane/freeplane

private void paintChildren(final Graphics2D g2, final PaintingMode[] paintModes) {
  for(final PaintingMode paintingMode : paintModes){
    this.paintingMode = paintingMode;
    switch(paintingMode){
      case LINKS:
        if(HIDE_CONNECTORS != showConnectors)
          paintConnectors(g2);
        break;
      default:
        super.paintChildren(g2);
    }
  }
}

代码示例来源:origin: de.sciss/scisslib

public void paintChildren(Graphics g) {
    super.paintChildren(g);

    if (topBorder) {
      final Graphics2D g2 = (Graphics2D) g;
      final int w = getWidth();
      g2.setPaint(pntTopBorder());
      g2.fillRect(0, 0, w, 8);
    }
  }
}

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

protected void paintChildren (Graphics g) {
  super.paintChildren (g);
  Graphics2D gr = (Graphics2D) g;
  gr.setColor (BORDER_COLOR);
  gr.draw (new RoundRectangle2D.Float (0, 0, getWidth () - 1, getHeight () - 1, 8, 8));
}

代码示例来源:origin: freeplane/freeplane

private void highlightEditor(final Graphics2D g2) {
  final Component editor = getComponent(0);
  if(editor instanceof NodeView)
    return;
  final java.awt.Shape oldClip = g2.getClip();
  try{
    g2.setClip(editor.getX(), editor.getY(), editor.getWidth(), editor.getHeight());
    super.paintChildren(g2);
  }
  finally{
    g2.setClip(oldClip);
  }
}

代码示例来源:origin: MegaMek/mekhq

@Override
protected void paintChildren(Graphics g) {
  super.paintChildren(g);

  if(null != planetIcon) {
    Graphics2D gfx = (Graphics2D) g;
    final int width = getWidth();
    final int offset = 6;
    gfx.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    Arc2D.Double arc = new Arc2D.Double();
    gfx.setPaint(Color.BLACK);
    arc.setArcByCenter(width - 32 - offset, 32 + offset, 35, 0, 360, Arc2D.OPEN);
    gfx.fill(arc);
    gfx.setPaint(Color.WHITE);
    arc.setArcByCenter(width - 32 - offset, 32 + offset, 34, 0, 360, Arc2D.OPEN);
    gfx.fill(arc);
    gfx.drawImage(planetIcon, width - 64 - offset, offset, 64, 64, null);
  }
}

代码示例来源:origin: nz.ac.waikato.cms.moa/moa

@Override
protected void paintChildren(Graphics g) {
  updateBaseHeight();
  updateBaseWidth();
  updateChildren();
  super.paintChildren(g);
}

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

protected void paintChildren(Graphics g) {
  if (canPaint.get()) {
    try {
      doPaintChildren(g);
    }
    catch (OutOfMemoryError e) {
      canPaint.set( false );
      remove( imagePanel );
      setLayout( new LabelLayout() );
      add(  myErrorComponent );
    }
  }
  else {
    super.paintChildren(g);
  }
}

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

/**
 * Uses the DividerPainter (if any) to paint each Divider that
 * overlaps the clip Rectangle.  This is done after the call to
 * <code>super.paintChildren()</code> so that Dividers can be
 * rendered "on top of" the children.
 * <p/>
 * {@inheritDoc}
 */
protected void paintChildren(Graphics g) {
  super.paintChildren(g);
  DividerPainter dp = getDividerPainter();
  Rectangle clipR = g.getClipBounds();
  if ((dp != null) && (clipR != null)) {
    Graphics dpg = g.create();
    try {
      MultiSplitLayout msl = getMultiSplitLayout();
      for (Divider divider : msl.dividersThatOverlap(clipR)) {
        dp.paint(dpg, divider);
      }
    }
    finally {
      dpg.dispose();
    }
  }
}

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

private void doPaintChildren( Graphics g ) {
  super.paintChildren(g);
  int xOff = imagePanel.getX();
  int yOff = imagePanel.getY();
  g.setColor(Color.BLACK);
  int w = imagePanel.getWidth(),
    h = imagePanel.getHeight();
  drawCross( g, xOff - 1, yOff -1);
  drawCross( g, xOff - 1, yOff + h + 1);
  drawCross( g, xOff + w + 1, yOff -1);
  drawCross( g, xOff + w + 1, yOff + h + 1);
  Rectangle2D clip = new Rectangle2D.Float( xOff, yOff, w, h);
  Rectangle visible = getVisibleRect();
  if (visible != null) {
    clip = visible.createIntersection(clip);
  }
  g.setClip( clip);
  paintPanel(g, xOff, yOff);
}

代码示例来源:origin: org.swinglabs.swingx/swingx-core

/**
 * Uses the DividerPainter (if any) to paint each Divider that
 * overlaps the clip Rectangle.  This is done after the call to
 * <code>super.paintChildren()</code> so that Dividers can be 
 * rendered "on top of" the children.
 * <p>
 * {@inheritDoc}
 */
@Override
protected void paintChildren(Graphics g) {
 super.paintChildren(g);
 DividerPainter dp = getDividerPainter();
 Rectangle clipR = g.getClipBounds();
 if ((dp != null) && (clipR != null)) {
  MultiSplitLayout msl = getMultiSplitLayout();
  if ( msl.hasModel()) {
   for(Divider divider : msl.dividersThatOverlap(clipR)) {
    Rectangle bounds = divider.getBounds();
    Graphics cg = g.create( bounds.x, bounds.y, bounds.width, bounds.height );
    try {
     dp.paint((Graphics2D)cg, divider, bounds.width, bounds.height );
    } finally {
     cg.dispose();
    }
   }
  }
 }
}

代码示例来源:origin: JetBrains/jediterm

protected void paintChildren(final Graphics g) {
  super.paintChildren(g);
  if (getLabelComponent().getParent() == null)
    return;
  final Rectangle textBounds = SwingUtilities.convertRectangle(getLabelComponent().getParent(), getLabelComponent().getBounds(), this);
  // Paint border around label if we got the focus
  if (isFocusOwner()) {
    g.setColor(UIUtil.getTreeSelectionBorderColor());
    DrawUtil.drawDottedRectangle(g, textBounds.x, textBounds.y, textBounds.x + textBounds.width - 1, textBounds.y + textBounds.height - 1);
  }
  if (myOverlayedIcon == null)
    return;
}

相关文章

微信公众号

最新文章

更多

JPanel类方法