本文整理了Java中javax.swing.JTabbedPane.paint()
方法的一些代码示例,展示了JTabbedPane.paint()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTabbedPane.paint()
方法的具体详情如下:
包路径:javax.swing.JTabbedPane
类名称:JTabbedPane
方法名:paint
暂无
代码示例来源:origin: net.sf.ingenias/editor
public void paint(Graphics g) {
super.paint(g);
// Are we dragging?
System.err.println(""+dragging + currentMouseLocation + tabImage );
if(dragging && currentMouseLocation != null && tabImage != null) {
// Draw the dragged tab
System.err.println("redrawing");
g.drawImage(tabImage, currentMouseLocation.x, currentMouseLocation.y, this);
}
}
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
public void paint(Graphics _g)
{
BuLib.setAntialiasing(this,_g);
super.paint(_g);
}
}
代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql
static void initGlassPane(Point tabPt, DnDTabbedPaneData localDnDTabbedPaneData, DnDTabbedPaneData outerDnDTabbedPaneData, GhostGlassPane localGlassPane)
{
localDnDTabbedPaneData.getTabbedPane().getRootPane().setGlassPane(localGlassPane);
if (localDnDTabbedPaneData.isHasGhost())
{
Rectangle rect = outerDnDTabbedPaneData.getTabbedPane().getBoundsAt(outerDnDTabbedPaneData.getDragTabIndex());
BufferedImage image = new BufferedImage(outerDnDTabbedPaneData.getTabbedPane().getWidth(), outerDnDTabbedPaneData.getTabbedPane().getHeight(), BufferedImage.TYPE_INT_ARGB);
Graphics g = image.getGraphics();
outerDnDTabbedPaneData.getTabbedPane().paint(g);
rect.x = rect.x < 0 ? 0 : rect.x;
rect.y = rect.y < 0 ? 0 : rect.y;
// When scrollable tabbed panes are used tabs might be displayed in part.
rect.width = Math.min(rect.width, outerDnDTabbedPaneData.getTabbedPane().getWidth() - rect.x);
image = image.getSubimage(rect.x, rect.y, rect.width, rect.height);
localGlassPane.setImage(image);
}
Point glassPt = SwingUtilities.convertPoint(localDnDTabbedPaneData.getTabbedPane(), tabPt, localGlassPane);
localGlassPane.setPoint(glassPt);
localGlassPane.setVisible(true);
}
代码示例来源:origin: realXuJiang/bigtable-sql
static void initGlassPane(Point tabPt, DnDTabbedPaneData localDnDTabbedPaneData, DnDTabbedPaneData outerDnDTabbedPaneData, GhostGlassPane localGlassPane)
{
localDnDTabbedPaneData.getTabbedPane().getRootPane().setGlassPane(localGlassPane);
if (localDnDTabbedPaneData.isHasGhost())
{
Rectangle rect = outerDnDTabbedPaneData.getTabbedPane().getBoundsAt(outerDnDTabbedPaneData.getDragTabIndex());
BufferedImage image = new BufferedImage(outerDnDTabbedPaneData.getTabbedPane().getWidth(), outerDnDTabbedPaneData.getTabbedPane().getHeight(), BufferedImage.TYPE_INT_ARGB);
Graphics g = image.getGraphics();
outerDnDTabbedPaneData.getTabbedPane().paint(g);
rect.x = rect.x < 0 ? 0 : rect.x;
rect.y = rect.y < 0 ? 0 : rect.y;
// When scrollable tabbed panes are used tabs might be displayed in part.
rect.width = Math.min(rect.width, outerDnDTabbedPaneData.getTabbedPane().getWidth() - rect.x);
image = image.getSubimage(rect.x, rect.y, rect.width, rect.height);
localGlassPane.setImage(image);
}
Point glassPt = SwingUtilities.convertPoint(localDnDTabbedPaneData.getTabbedPane(), tabPt, localGlassPane);
localGlassPane.setPoint(glassPt);
localGlassPane.setVisible(true);
}
内容来源于网络,如有侵权,请联系作者删除!