本文整理了Java中javax.swing.JButton.paint()
方法的一些代码示例,展示了JButton.paint()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JButton.paint()
方法的具体详情如下:
包路径:javax.swing.JButton
类名称:JButton
方法名:paint
暂无
代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql
public void paint(Graphics g)
{
super.paint(g);
// paintNumWaitingGC(g);
}
};
代码示例来源:origin: realXuJiang/bigtable-sql
public void paint(Graphics g)
{
super.paint(g);
// paintNumWaitingGC(g);
}
};
代码示例来源:origin: com.eas.platypus/platypus-js-calendar-widget
@Override
public void paint(Graphics g) {
if (g instanceof Graphics2D) {
Graphics2D g2d = (Graphics2D) g;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
}
super.paint(g);
}
代码示例来源:origin: org.bitbucket.goalhub.simpleide/jedit
public void paint(Graphics g)
{
if(isEnabled())
super.paint(g);
else
{
Graphics2D g2 = (Graphics2D)g;
g2.setComposite(c);
super.paint(g2);
}
} //}}}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
public void paint(Graphics _g)
{
BuLib.setAntialiasing(this,_g);
super.paint(_g);
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
public void paint(Graphics _g)
{
BuLib.setAntialiasing(this,_g);
super.paint(_g);
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
public void paint(Graphics _g)
{
BuLib.setAntialiasing(this,_g);
super.paint(_g);
}
代码示例来源:origin: com.jtattoo/JTattoo
public void paint(Graphics g) {
super.paint(g);
// Draw the arrow
int w = getSize().width;
int h = getSize().height;
int size = Math.min((h - 4) / 3, (w - 4) / 3);
size = Math.max(size, 2);
paintTriangle(g, (w - size) / 2 + 1, (h - size) / 2 + 1, size);
}
代码示例来源:origin: Spoutcraft/LegacyLauncher
@Override
public void paint(Graphics g) {
g = transparency.setup(g);
super.paint(g);
transparency.cleanup(g);
}
代码示例来源:origin: org.jspresso/jspresso-swing-components
@Override
public void paint(Graphics g) {
super.paint(g);
if (value != null) {
g.setColor(value);
Rectangle r = getBounds();
r.grow(-5, -5);
g.fill3DRect(r.x, r.y, r.width, r.height, true);
}
}
};
代码示例来源:origin: org.jspresso.framework/jspresso-swing-components
@Override
public void paint(Graphics g) {
super.paint(g);
if (value != null) {
g.setColor(value);
Rectangle r = getBounds();
r.grow(-5, -5);
g.fill3DRect(r.x, r.y, r.width, r.height, true);
}
}
};
代码示例来源:origin: org.netbeans.api/org-openide-explorer
public BufferedImage getSnapshot() {
if (snapshot == null) {
snapshot = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice()
.getDefaultConfiguration().createCompatibleImage(getWidth(), getHeight());
if (log) {
PropUtils.log(ButtonPanel.class, "Created " + snapshot + " custom editor button backing image");
}
if (snapshot.getAlphaRaster() == null) {
//Alpha not supported, could cause corruption (issue
//39280) - use a bufferedImage which will support alpha,
//although less efficient to blit
snapshot = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_ARGB);
}
Graphics g = snapshot.getGraphics();
super.paint(g);
}
return snapshot;
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-team-commons
@Override
public void paint(Graphics g) {
super.paint(g);
if( underline && isEnabled() ) {
Font f = getFont();
FontMetrics fm = getFontMetrics(f);
int iconWidth = 0;
if( null != getIcon() ) {
iconWidth = getIcon().getIconWidth()+getIconTextGap();
}
int x1 = iconWidth;
int y1 = fm.getHeight();
int x2 = fm.stringWidth(getText()) + iconWidth;
if( getText().length() > 0 )
g.drawLine(x1, y1, x2, y1);
}
}
代码示例来源:origin: org.java.net.substance/substance
@Override
public void paint(Graphics g) {
Graphics2D g2d = (Graphics2D) g.create();
int componentFontSize = SubstanceSizeUtils.getComponentFontSize(this);
int width = getWidth();
int height = getHeight();
int clipDelta = (int) SubstanceSizeUtils
.getBorderStrokeWidth(componentFontSize);
if (this.getComponentOrientation().isLeftToRight()) {
g2d.clipRect(clipDelta, 0, width - clipDelta, height);
} else {
g2d.clipRect(0, 0, width - clipDelta, height);
}
super.paint(g2d);
g2d.dispose();
}
}
代码示例来源:origin: com.github.insubstantial/substance
@Override
public void paint(Graphics g) {
Graphics2D g2d = (Graphics2D) g.create();
int componentFontSize = SubstanceSizeUtils.getComponentFontSize(this);
int width = getWidth();
int height = getHeight();
int clipDelta = (int) SubstanceSizeUtils
.getBorderStrokeWidth(componentFontSize);
if (this.getComponentOrientation().isLeftToRight()) {
g2d.clipRect(clipDelta, 0, width - clipDelta, height);
} else {
g2d.clipRect(0, 0, width - clipDelta, height);
}
super.paint(g2d);
g2d.dispose();
}
}
代码示例来源:origin: com.github.insubstantial/substance
@Override
public void paint(Graphics g) {
Graphics2D g2d = (Graphics2D) g.create();
int componentFontSize = SubstanceSizeUtils.getComponentFontSize(this);
int width = getWidth();
int height = getHeight();
int clipDelta = (int) SubstanceSizeUtils
.getBorderStrokeWidth(componentFontSize);
if (this.getComponentOrientation().isLeftToRight()) {
g2d.clipRect(clipDelta, 0, width - clipDelta, height);
} else {
g2d.clipRect(0, 0, width - clipDelta, height);
}
super.paint(g2d);
g2d.dispose();
}
}
代码示例来源:origin: org.java.net.substance/substance
@Override
public void paint(Graphics g) {
Graphics2D g2d = (Graphics2D) g.create();
int componentFontSize = SubstanceSizeUtils.getComponentFontSize(this);
int width = getWidth();
int height = getHeight();
int clipDelta = (int) SubstanceSizeUtils
.getBorderStrokeWidth(componentFontSize);
if (this.getComponentOrientation().isLeftToRight()) {
g2d.clipRect(clipDelta, 0, width - clipDelta, height);
} else {
g2d.clipRect(0, 0, width - clipDelta, height);
}
super.paint(g2d);
g2d.dispose();
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
public void paint (Graphics g) {
if (PropUtils.useOptimizedCustomButtonPainting() && !hasFocus()) {
if (log) {
PropUtils.log (ButtonPanel.class, "Blitting custom editor "+
"button backing store for button at " + getBounds() + " in " +
(getParent() == null ? " null parent" : getParent() +
"editor=" + inplace)); //NOI18N
}
((Graphics2D)g).drawRenderedImage(getSnapshot(), at);
} else {
if (log) {
PropUtils.log (ButtonPanel.class, "Painting unoptimized custom editor "+
"button button at " + getBounds() + " in " +
(getParent() == null ? " null parent" : getParent() +
"editor=" + inplace)); //NOI18N
}
super.paint(g);
}
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
public void paint(Graphics g) {
if (PropUtils.useOptimizedCustomButtonPainting() && !hasFocus()) {
if (log) {
PropUtils.log(
ButtonPanel.class,
"Blitting custom editor " + "button backing store for button at " + getBounds() + " in " +
((getParent() == null) ? " null parent" : (getParent() + "editor=" + inplace))
); //NOI18N
}
((Graphics2D) g).drawRenderedImage(getSnapshot(), at);
} else {
if (log) {
PropUtils.log(
ButtonPanel.class,
"Painting unoptimized custom editor " + "button button at " + getBounds() + " in " +
((getParent() == null) ? " null parent" : (getParent() + "editor=" + inplace))
); //NOI18N
}
super.paint(g);
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
public void paint (Graphics g) {
if (PropUtils.useOptimizedCustomButtonPainting() && !hasFocus()) {
if (log) {
PropUtils.log (ButtonPanel.class, "Blitting custom editor "+
"button backing store for button at " + getBounds() + " in " +
(getParent() == null ? " null parent" : getParent() +
"editor=" + inplace)); //NOI18N
}
((Graphics2D)g).drawRenderedImage(getSnapshot(), at);
} else {
if (log) {
PropUtils.log (ButtonPanel.class, "Painting unoptimized custom editor "+
"button button at " + getBounds() + " in " +
(getParent() == null ? " null parent" : getParent() +
"editor=" + inplace)); //NOI18N
}
super.paint(g);
}
}
内容来源于网络,如有侵权,请联系作者删除!