本文整理了Java中javax.swing.border.Border.paintBorder()
方法的一些代码示例,展示了Border.paintBorder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Border.paintBorder()
方法的具体详情如下:
包路径:javax.swing.border.Border
类名称:Border
方法名:paintBorder
暂无
代码示例来源:origin: org.swinglabs.swingx/swingx-core
@Override
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
if (borderDelegate != null) {
borderDelegate.paintBorder(c, g, x, y, width, height);
}
}
代码示例来源:origin: org.swinglabs.swingx/swingx-all
@Override
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
if (borderDelegate != null) {
borderDelegate.paintBorder(c, g, x, y, width, height);
}
}
代码示例来源:origin: com.haulmont.thirdparty/swingx-core
@Override
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
if (borderDelegate != null) {
borderDelegate.paintBorder(c, g, x, y, width, height);
}
}
代码示例来源:origin: JetBrains/jediterm
@Override
public void paintBorder(Component view, Graphics g, int x, int y, int width, int height) {
if (myBorder != null) {
// additional insets are used inside a custom border
myBorder.paintBorder(view, g, x, y, width, height);
}
}
代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core
@Override
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
if (borderDelegate != null) {
borderDelegate.paintBorder(c, g, x, y, width, height);
}
}
代码示例来源:origin: omegat-org/omegat
@Override
public void run() {
BORDER.paintBorder(table, table.getGraphics(), rect.x, rect.y, rect.width, rect.height);
}
});
代码示例来源:origin: antlr/antlrworks
public void paint(Graphics g) {
BorderFactory.createEtchedBorder().paintBorder(ATEAnalysisColumn.this, g, r.x, r.y, r.width, r.height);
g.setColor(getAnalysisManager().getAnalysisColor());
g.fillRect(r.x+2, r.y+2, r.width-5, r.height-5);
}
}
代码示例来源:origin: mucommander/mucommander
@Override
public void paint(Graphics g) {
int width = getWidth();
int height = getHeight();
// Fill the button with the specified color
g.setColor((ColorButton.this).currentColor);
g.fillRect(0, 0, width, height);
// Paint custom border
border.paintBorder(this, g, 0, 0, width, height);
}
};
代码示例来源:origin: igniterealtime/Spark
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
Insets borderInsets = border.getBorderInsets(c);
Insets insets = getBorderInsets(c);
int temp = (insets.top - borderInsets.top) / 2;
border.paintBorder(c, g, x, y + temp, width, height - temp);
Dimension size = comp.getPreferredSize();
rect = new Rectangle(offset, 0, size.width, size.height);
SwingUtilities.paintComponent(g, comp, (Container)c, rect);
}
代码示例来源:origin: com.synaptix/SynaptixWidget
@Override
protected void paintEmptyContents(Graphics g) {
final Graphics2D g2 = (Graphics2D) g.create();
paintBackground(g2);
this.border.paintBorder(this, g2, 0, 0, this.getWidth(), this.getHeight());
g2.dispose();
}
代码示例来源:origin: khuxtable/seaglass
protected void paint(SynthContext context, Graphics g) {
Border vpBorder = scrollpane.getViewportBorder();
if (vpBorder != null) {
Rectangle r = scrollpane.getViewportBorderBounds();
vpBorder.paintBorder(scrollpane, g, r.x, r.y, r.width, r.height);
}
}
代码示例来源:origin: com.synaptix/SynaptixSwing
@Override
public void paint(Graphics g, JComponent c) {
Border vpBorder = scrollpane.getViewportBorder();
if (vpBorder != null) {
Rectangle r = scrollpane.getViewportBorderBounds();
vpBorder.paintBorder(scrollpane, g, r.x, r.y, r.width, r.height);
}
}
代码示例来源:origin: ru.sbtqa/monte-media
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
getBackgroundBorder().paintBorder(this, g, 0, 0, getWidth(), getHeight());
}
private Border backgroundBorder;
代码示例来源:origin: org.gosu-lang.gosu/gosu-editor
@Override
protected void paintBorder( Graphics g )
{
if( isSelected() || _bRollover )
{
_activeBorder.paintBorder( this, g, 0, 0, getWidth(), getHeight() );
}
}
代码示例来源:origin: com.synaptix/SynaptixWidget
private void paintBackground(final Graphics2D g2) {
g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2.setPaint(GraphicsHelper.buildVerticalGradientPaint(SummaryFooterPanel.class.getName(), this.getHeight(), this.colorScheme.getUltraLightColor(), this.colorScheme.getLightColor()));
g2.fillRect(0, 0, this.getWidth(), this.getHeight());
this.border.paintBorder(this, g2, 0, 0, this.getWidth(), this.getHeight() + 1);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/napkinlaf
@Override
protected void doPaintBorder(Component c, Graphics g, int x, int y,
int width, int height) {
g = NapkinUtil.defaultGraphics(g, c);
NapkinUtil.syncWithTheme(origBorder, c);
origBorder.paintBorder(c, g, x, y, width, height);
NapkinUtil.finishGraphics(g, c);
}
代码示例来源:origin: com.synaptix/SynaptixWidget
private int paintColumnAndReturnEndAbsciss(final int columnIndex, final Graphics2D graphics, final int absciss) {
final int columnWidth = super.parent.getColumnSizeAt(columnIndex);
this.border.paintBorder(this, graphics, absciss, 0, columnWidth, this.getHeight());
graphics.setColor(this.colorScheme.getForegroundColor());
final String cellLabel = getCellLabel(columnIndex, columnIndex);
GraphicsHelper.paintCenterString(graphics, cellLabel, graphics.getFont(), absciss, 0, columnWidth, this.getHeight());
return absciss + columnWidth;
}
代码示例来源:origin: com.synaptix/SynaptixWidget
private int paintColumnAndReturnEndAbsciss(final int columnIndex, final Graphics2D graphics, final int absciss) {
final String columnLabel = super.parent.getColumnLabelAt(columnIndex);
final int columnWidth = super.parent.getColumnSizeAt(columnIndex);
this.border.paintBorder(this, graphics, absciss, 0, columnWidth, this.getHeight());
graphics.setColor(this.colorScheme.getForegroundColor());
GraphicsHelper.paintCenterString(graphics, columnLabel, graphics.getFont(), absciss, 0, columnWidth, this.getHeight());
return absciss + columnWidth;
}
代码示例来源:origin: org.japura/japura-gui
@Override
protected final void paintBorder(Graphics g) {
Border border = getBorder();
if (border != null) {
int y = getInnerTitlePanel().getY() - getInsets().top - titleMargin;
border.paintBorder(this, g, 0, y, getWidth(), getHeight() - y);
}
}
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
@Override
public void paintBackground(Graphics g) {
JTextComponent c = getComponent();
if (c.getBorder() instanceof BackdropBorder) {
BackdropBorder bb = (BackdropBorder) c.getBorder();
bb.getBackdropBorder().paintBorder(c, g, 0, 0, c.getWidth(), c.getHeight());
} else {
super.paintBackground(g);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!