本文整理了Java中javax.swing.JTabbedPane.getTabLayoutPolicy()
方法的一些代码示例,展示了JTabbedPane.getTabLayoutPolicy()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTabbedPane.getTabLayoutPolicy()
方法的具体详情如下:
包路径:javax.swing.JTabbedPane
类名称:JTabbedPane
方法名:getTabLayoutPolicy
暂无
代码示例来源:origin: net.sf.tinylaf/tinylaf
private boolean scrollableTabLayoutEnabled() {
return (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT);
}
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
private boolean scrollableTabLayoutEnabled() {
return tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT;
}
代码示例来源:origin: org.java.net.substance/substance
@Override
protected LayoutManager createLayoutManager() {
if (this.tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT) {
return super.createLayoutManager();
}
return new TabbedPaneLayout();
}
代码示例来源:origin: com.github.insubstantial/substance
@Override
protected LayoutManager createLayoutManager() {
if (this.tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT) {
return super.createLayoutManager();
}
return new TabbedPaneLayout();
}
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
@Override
protected LayoutManager createLayoutManager() {
if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT) {
return super.createLayoutManager();
}
return new TabbedPaneLayout();
}
@Override
代码示例来源:origin: realXuJiang/bigtable-sql
@Override
public void paintComponent(Graphics g)
{
Graphics2D g2 = (Graphics2D) g;
g2.setComposite(composite);
if (_dnDTabbedPaneData.isPaintScrollArea() && _dnDTabbedPaneData.getTabbedPane().getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT)
{
g2.setPaint(Color.RED);
g2.fill(_dnDTabbedPaneData.getrBackward());
g2.fill(_dnDTabbedPaneData.getrForward());
}
if (draggingGhost != null)
{
double xx = location.getX() - (draggingGhost.getWidth(this) / 2d);
double yy = location.getY() - (draggingGhost.getHeight(this) / 2d);
g2.drawImage(draggingGhost, (int) xx, (int) yy, null);
}
// if (_dnDTabbedPaneData.getDragTabIndex() >= 0)
// {
g2.setPaint(DndTabUtils.TARGET_LINE_COLOR);
g2.fill(_dnDTabbedPaneData.getTargetLineRectBuffer());
// }
}
}
代码示例来源:origin: net.sf.tinylaf/tinylaf
/**
* Overridden so we can enable/disable tab rotating using
* TinyTabbedPaneLayout.
* Invoked by <code>installUI</code> to create
* a layout manager object to manage
* the <code>JTabbedPane</code>.
*
* @return a layout manager object
*
* @see TabbedPaneLayout
* @see javax.swing.JTabbedPane#getTabLayoutPolicy
*/
protected LayoutManager createLayoutManager() {
if(tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT) {
return super.createLayoutManager();
} else { /* WRAP_TAB_LAYOUT */
return new TinyTabbedPaneLayout();
}
}
代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql
@Override
public void paintComponent(Graphics g)
{
Graphics2D g2 = (Graphics2D) g;
g2.setComposite(composite);
if (_dnDTabbedPaneData.isPaintScrollArea() && _dnDTabbedPaneData.getTabbedPane().getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT)
{
g2.setPaint(Color.RED);
g2.fill(_dnDTabbedPaneData.getrBackward());
g2.fill(_dnDTabbedPaneData.getrForward());
}
if (draggingGhost != null)
{
double xx = location.getX() - (draggingGhost.getWidth(this) / 2d);
double yy = location.getY() - (draggingGhost.getHeight(this) / 2d);
g2.drawImage(draggingGhost, (int) xx, (int) yy, null);
}
// if (_dnDTabbedPaneData.getDragTabIndex() >= 0)
// {
g2.setPaint(DndTabUtils.TARGET_LINE_COLOR);
g2.fill(_dnDTabbedPaneData.getTargetLineRectBuffer());
// }
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
/**
* Invoked by <code>installUI</code> to create
* a layout manager object to manage
* the <code>JTabbedPane</code>.
*
* @return a layout manager object
*
* @see TabbedPaneLayout
* @see javax.swing.JTabbedPane#getTabLayoutPolicy
*/
protected LayoutManager createLayoutManager()
{
if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT)
{
return new TabbedPaneScrollLayout();
}
else
{ /* WRAP_TAB_LAYOUT */
return new TabbedPaneLayout();
}
}
代码示例来源:origin: com.jtattoo/JTattoo
/**
* Invoked by <code>installUI</code> to create
* a layout manager object to manage
* the <code>JTabbedPane</code>.
*
* @return a layout manager object
*
* @see TabbedPaneLayout
* @see javax.swing.JTabbedPane#getTabLayoutPolicy
*/
protected LayoutManager createLayoutManager() {
if (JTattooUtilities.getJavaVersion() >= 1.4) {
if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT) {
return new TabbedPaneScrollLayout();
}
}
/* WRAP_TAB_LAYOUT */
return new TabbedPaneLayout();
}
代码示例来源:origin: com.jtattoo/JTattoo
public void stateChanged(ChangeEvent e) {
JTabbedPane tabPane = (JTabbedPane) e.getSource();
if (JTattooUtilities.getJavaVersion() >= 1.4) {
if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT) {
int index = tabPane.getSelectedIndex();
if (index >= 0) {
BaseTabbedPaneUI ui = (BaseTabbedPaneUI) tabPane.getUI();
ui.tabScroller.scrollTabToVisible(tabPane.getTabPlacement(), index);
}
}
}
tabPane.revalidate();
tabPane.repaint();
}
}
代码示例来源:origin: stackoverflow.com
if (pane.getTabLayoutPolicy() == JTabbedPane.WRAP_TAB_LAYOUT) {
pane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
} else {
代码示例来源:origin: stackoverflow.com
scrollLayoutItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (pane.getTabLayoutPolicy() == JTabbedPane.WRAP_TAB_LAYOUT) {
pane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
} else {
内容来源于网络,如有侵权,请联系作者删除!