本文整理了Java中javax.swing.JTextPane.paintComponent()
方法的一些代码示例,展示了JTextPane.paintComponent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextPane.paintComponent()
方法的具体详情如下:
包路径:javax.swing.JTextPane
类名称:JTextPane
方法名:paintComponent
暂无
代码示例来源:origin: org.apache.cayenne.modeler/cayenne-modeler
@Override
public void paintComponent(Graphics g) {
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: antlr/antlrworks
public void paintComponent(Graphics g) {
super.paintComponent(g);
if(delegate != null)
delegate.textPaneDidPaint(g);
}
代码示例来源:origin: RPTools/maptool
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Dimension size = getSize();
g.setColor(Color.gray);
g.drawLine(0, 0, size.width, 0);
}
};
代码示例来源:origin: antlr/antlrworks
@Override
public void paintComponent(Graphics g) {
super.paintComponent(g);
paintDestinationCursor(g);
textEditor.textPaneDidPaint(g);
}
代码示例来源:origin: org.protege/protege-editor-owl
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Color oldColor = g.getColor();
try {
// Paint in error range if there is one
if (errorStartIndex != errorEndIndex && errorStartIndex > -1 && errorStartIndex < getDocument().getLength()) {
Rectangle start = modelToView(errorStartIndex);
Rectangle end = modelToView(errorEndIndex);
g.setColor(Color.RED);
((Graphics2D) g).setStroke(errorStroke);
int y = end.y + end.height;
g.drawLine(start.x, y, end.x + end.width, y);
}
}
catch (BadLocationException e) {
e.printStackTrace();
}
g.setColor(oldColor);
}
代码示例来源:origin: protegeproject/protege
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Color oldColor = g.getColor();
try {
// Paint in error range if there is one
if (errorStartIndex != errorEndIndex && errorStartIndex > -1 && errorStartIndex < getDocument().getLength()) {
Rectangle start = modelToView(errorStartIndex);
Rectangle end = modelToView(errorEndIndex);
g.setColor(Color.RED);
((Graphics2D) g).setStroke(errorStroke);
int y = end.y + end.height;
g.drawLine(start.x, y, end.x + end.width, y);
}
}
catch (BadLocationException e) {
e.printStackTrace();
}
g.setColor(oldColor);
}
代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Color oldColor = g.getColor();
try {
// Paint in error range if there is one
if (errorStartIndex != errorEndIndex && errorStartIndex > -1 && errorStartIndex < getDocument().getLength()) {
Rectangle start = modelToView(errorStartIndex);
Rectangle end = modelToView(errorEndIndex);
g.setColor(Color.RED);
((Graphics2D) g).setStroke(errorStroke);
int y = end.y + end.height;
g.drawLine(start.x, y, end.x + end.width, y);
}
}
catch (BadLocationException e) {
e.printStackTrace();
}
g.setColor(oldColor);
}
代码示例来源:origin: edu.stanford.protege/protege-editor-owl
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Color oldColor = g.getColor();
try {
// Paint in error range if there is one
if (errorStartIndex != errorEndIndex && errorStartIndex > -1 && errorStartIndex < getDocument().getLength()) {
Rectangle start = modelToView(errorStartIndex);
Rectangle end = modelToView(errorEndIndex);
g.setColor(Color.RED);
((Graphics2D) g).setStroke(errorStroke);
int y = end.y + end.height;
g.drawLine(start.x, y, end.x + end.width, y);
}
}
catch (BadLocationException e) {
e.printStackTrace();
}
g.setColor(oldColor);
}
代码示例来源:origin: eu.mihosoft.vrl/vrl
@Override
protected void paintComponent(Graphics g) {
if (getBackgroundColor() != null) {
g.setColor(getBackgroundColor());
g.fillRect(0, 0, getWidth(), getHeight());
}
super.paintComponent(g);
}
代码示例来源:origin: net.sf.mmax2/mmax2
super.paintComponent(gr);
代码示例来源:origin: omegat-org/omegat
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
if (flasher != null && flasher.isFlashing()) {
flasher.mark();
setBackground(flasher.getColor());
repaint();
}
}
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
public void paintComponent(Graphics _g)
try { super.paintComponent(_g); }
catch(Exception ex) { }
内容来源于网络,如有侵权,请联系作者删除!