当前位置: 首页>>代码示例>>Java>>正文


Java JScrollPane.getBorder方法代码示例

本文整理汇总了Java中javax.swing.JScrollPane.getBorder方法的典型用法代码示例。如果您正苦于以下问题:Java JScrollPane.getBorder方法的具体用法?Java JScrollPane.getBorder怎么用?Java JScrollPane.getBorder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.JScrollPane的用法示例。


在下文中一共展示了JScrollPane.getBorder方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configureEnclosingScrollPane

import javax.swing.JScrollPane; //导入方法依赖的package包/类
/**
 * duplicated to avoid repeating the same checks multiple times
 */
@Override
protected void configureEnclosingScrollPane() {
	Container p = getParent();
	if (p instanceof JViewport) {
		Container gp = p.getParent();
		if (gp instanceof JScrollPane) {
			JScrollPane scrollPane = (JScrollPane) gp;
			// Make certain we are the viewPort's view and not, for
			// example, the rowHeaderView of the scrollPane -
			// an implementor of fixed columns might do this.
			JViewport viewport = scrollPane.getViewport();
			if (viewport == null || viewport.getView() != this) {
				return;
			}
			scrollPane.setColumnHeaderView(getTableHeader());
			Border border = scrollPane.getBorder();
			if (border == null || border instanceof UIResource) {
				scrollPane.setBorder(UIManager.getBorder("Table.scrollPaneBorder"));
			}
			//rowHeader=new RowHeader(dataModel);
			rowHeader.setRowHeight(CommonConstants.ROW_HEIGHT);
			rowHeader.install(this, scrollPane);
			installLabels(scrollPane);
			installSelectAllButton(scrollPane);
			viewport.addChangeListener(scrollListener);
		}
	}
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:32,代码来源:ExactTable.java

示例2: configureEnclosingScrollPane

import javax.swing.JScrollPane; //导入方法依赖的package包/类
/**
 * duplicated to avoid repeating the same checks multiple times
 */
@Override
protected void configureEnclosingScrollPane() {
	Container p = getParent();
	if (p instanceof JViewport) {
		Container gp = p.getParent();
		if (gp instanceof JScrollPane) {
			JScrollPane scrollPane = (JScrollPane) gp;
			// Make certain we are the viewPort's view and not, for
			// example, the rowHeaderView of the scrollPane -
			// an implementor of fixed columns might do this.
			JViewport viewport = scrollPane.getViewport();
			if (viewport == null || viewport.getView() != this) {
				return;
			}
			scrollPane.setColumnHeaderView(getTableHeader());
			Border border = scrollPane.getBorder();
			if (border == null || border instanceof UIResource) {
				scrollPane.setBorder(UIManager.getBorder("Table.scrollPaneBorder"));
			}
			//rowHeader=new RowHeader(dataModel);
			rowHeader.install(this, scrollPane);
			installLabels(scrollPane);
			installSelectAllButton(scrollPane);
			viewport.addChangeListener(scrollListener);
		}
	}
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:31,代码来源:ExactTable.java


注:本文中的javax.swing.JScrollPane.getBorder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。