本文整理了Java中javax.swing.JEditorPane.paintComponent()
方法的一些代码示例,展示了JEditorPane.paintComponent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JEditorPane.paintComponent()
方法的具体详情如下:
包路径:javax.swing.JEditorPane
类名称:JEditorPane
方法名:paintComponent
暂无
代码示例来源:origin: magefree/mage
/**
* A little trick to paint black background under the text.
*
* @param g
*/
@Override
public void paintChildren(Graphics g) {
super.paintComponent(g);
}
代码示例来源:origin: robo-code/robocode
@Override
public void paintComponent(Graphics g) {
Graphics2D g2 = (Graphics2D) g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
super.paintComponent(g);
}
};
代码示例来源:origin: com.l2fprod.common/l2fprod-common-shared
protected void paintComponent(java.awt.Graphics g) {
Graphics2D g2d = (Graphics2D)g;
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
super.paintComponent(g);
}
};
代码示例来源:origin: onyxbits/dummydroid
@Override
public void paintComponent(Graphics g) {
Graphics2D graphics2d = (Graphics2D) g;
graphics2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
super.paintComponent(g);
}
代码示例来源:origin: onyxbits/Raccoon
@Override
public void paintComponent(Graphics g) {
Graphics2D graphics2d = (Graphics2D) g;
graphics2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
super.paintComponent(g);
}
代码示例来源:origin: sdedit/sdedit
protected void paintComponent(Graphics g) {
Graphics2D g2d = (Graphics2D) g;
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
g2d.setRenderingHint(RenderingHints.KEY_RENDERING,
RenderingHints.VALUE_RENDER_QUALITY);
super.paintComponent(g);
}
};
代码示例来源:origin: freeplane/freeplane
@Override
protected void paintComponent(Graphics g) {
try {
super.paintComponent(g);
}
catch (Exception e) {
LogUtils.warn(e);
}
}
};
代码示例来源:origin: sdedit/sdedit
@Override
public void paintComponent (Graphics g) {
((Graphics2D) g).setRenderingHints(new RenderingHints(
RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON));
super.paintComponent(g);
}
};
代码示例来源:origin: uk.org.mygrid.taverna.processors/taverna-soaplab-processor
protected void paintComponent(Graphics g) {
final int width = getWidth();
final int height = getHeight();
Graphics2D g2d = (Graphics2D) g;
Paint oldPaint = g2d.getPaint();
g2d.setPaint(new GradientPaint(0, 0, col, width, 0, col2));
g2d.fillRect(0, 0, width, height);
g2d.setPaint(oldPaint);
super.paintComponent(g);
}
/**
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-debugger-common2
@Override
protected void paintComponent(Graphics passG) {
final Graphics g = passG.create();
final Rectangle clip = g.getClipBounds();
// clear background
// We need to do this opurselves because we've set
// opacity to false
g.setColor(getBackground());
g.fillRect(clip.x,
clip.y,
clip.width,
clip.height);
// paint background
viewScanner.scan(editorPane, g, metrics);
super.paintComponent(passG);
}
};
代码示例来源:origin: eu.mihosoft.vrl/vrl
@Override
protected void paintComponent(Graphics g) {
if (vParent == null) {
setParent((VComponent) VSwingUtil.getParent(this, VComponent.class));
}
if (vParent != null) {
this.setForeground(vParent.getStyle().getBaseValues().
getColor(Canvas.TEXT_COLOR_KEY));
}
super.paintComponent(g);
}
代码示例来源:origin: eu.mihosoft.vrl/vrl
@Override
protected void paintComponent(Graphics g) {
if (vParent == null) {
setParent((VComponent) VSwingUtil.getParent(this, VComponent.class));
}
if (vParent != null) {
this.setForeground(vParent.getStyle().getBaseValues().
getColor(Canvas.TEXT_COLOR_KEY));
}
super.paintComponent(g);
}
内容来源于网络,如有侵权,请联系作者删除!