javax.swing.JWindow.paint()方法的使用及代码示例

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

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

JWindow.paint介绍

暂无

代码示例

代码示例来源:origin: robo-code/robocode

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

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

super.paint(g);

代码示例来源:origin: uk.co.caprica/vlcj

@Override
public final void paint(Graphics g) {
  // The use of the non-short-circuit logical '|' operator here is intentional
  if (layoutWidth != (layoutWidth = getWidth()) | layoutHeight != (layoutHeight = getHeight())) {
    onNewSize(layoutWidth, layoutHeight);
  }
  super.paint(g);
  Graphics2D g2 = (Graphics2D)g;
  onPrepareGraphicsContext(g2);
  onPaintOverlay(g2);
}

代码示例来源:origin: net.sf.ingenias/editor

public static void createEPS(JComponent graph, File output)
    throws FileNotFoundException, SVGGraphics2DIOException {
  // Get a DOMImplementation
  FileOutputStream fos = new FileOutputStream(output);
  try {
    JWindow jw = new JWindow();
    jw.getContentPane().add(graph);
    jw.pack();
    EpsGraphics2D g2d = new EpsGraphics2D("prueba", fos, 2, 2,
        jw.getSize().width - 2, jw.getSize().height - 2);
    if (jw.getSize().width != 0 && jw.getSize().height != 0) {
      // svgGenerator.setSVGCanvasSize(new Dimension(2000,2000));
      graph.setDoubleBuffered(false);
      jw.setVisible(true);
      jw.paint(g2d);
      jw.setVisible(false);
      jw.getContentPane().remove(graph);
      // Finally, stream out SVG to the standard output using UTF-8
      // character to byte encoding
      g2d.flush();
      g2d.close();
    }
  } catch (IOException e) {
    e.printStackTrace();
  }
}

相关文章