本文整理了Java中javax.swing.JTabbedPane.getRootPane()
方法的一些代码示例,展示了JTabbedPane.getRootPane()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTabbedPane.getRootPane()
方法的具体详情如下:
包路径:javax.swing.JTabbedPane
类名称:JTabbedPane
方法名:getRootPane
暂无
代码示例来源:origin: nccgroup/AutoRepeater
autoRepeaterMenu = new AutoRepeaterMenu(parentTabbedPane.getRootPane());
SwingUtilities.invokeLater(autoRepeaterMenu);
});
代码示例来源: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);
}
内容来源于网络,如有侵权,请联系作者删除!