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


Java AbstractLayoutCache.NodeDimensions方法代码示例

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


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

示例1: createNodeDimensions

import javax.swing.tree.AbstractLayoutCache; //导入方法依赖的package包/类
@Override
protected AbstractLayoutCache.NodeDimensions createNodeDimensions() {
    return new NodeDimensionsHandler() {
        @Override
        public Rectangle getNodeDimensions(
                Object value, int row, int depth, boolean expanded, Rectangle size) {

            Rectangle dimensions = super.getNodeDimensions(value, row, depth, expanded, size);
            int containerWidth = tree.getParent() instanceof JViewport
                    ? tree.getParent().getWidth() : tree.getWidth();

            dimensions.width = containerWidth - getRowX(row, depth);

            return dimensions;
        }
    };
}
 
开发者ID:mathieulegoc,项目名称:SmartTokens,代码行数:18,代码来源:SourceListTreeUI.java

示例2: createNodeDimensions

import javax.swing.tree.AbstractLayoutCache; //导入方法依赖的package包/类
@Override
protected AbstractLayoutCache.NodeDimensions createNodeDimensions() {
  return new NodeDimensionsHandler() {
    @Override
    public Rectangle getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle size) {
      Rectangle dimensions = super.getNodeDimensions(value, row, depth, expanded, size);
      dimensions.width = tree.getWidth() - getRowX(row, depth);
      return dimensions;
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:ColumnTreeBuilder.java

示例3: createNodeDimensions

import javax.swing.tree.AbstractLayoutCache; //导入方法依赖的package包/类
@Override
protected AbstractLayoutCache.NodeDimensions createNodeDimensions() {
	return new NodeDimensionsHandler() {
		@Override
		public Rectangle getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle size) {
			Rectangle dimensions = super.getNodeDimensions(value, row, depth, expanded, size);
			dimensions.width = parent.getWidth() - getRowX(row, depth);
			return dimensions;
		}
	};
}
 
开发者ID:CollapsedDom,项目名称:Stud.IP-Client,代码行数:12,代码来源:TreeCellListRenderer.java

示例4: createNodeDimensions

import javax.swing.tree.AbstractLayoutCache; //导入方法依赖的package包/类
@Override
/**
 * Creates an instance of NodeDimensions that is able to determine
 * the size of a given node in the tree.
 */
protected AbstractLayoutCache.NodeDimensions createNodeDimensions() {
	return new PNNodeDimensionsHandler();
}
 
开发者ID:iig-uni-freiburg,项目名称:WOLFGANG,代码行数:9,代码来源:PNPropertiesTreeUI.java

示例5: createNodeDimensions

import javax.swing.tree.AbstractLayoutCache; //导入方法依赖的package包/类
@Override
protected AbstractLayoutCache.NodeDimensions createNodeDimensions() {
  return new NodeDimensionsHandler() {
    @Override
    public Rectangle getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle size) {
      Rectangle dimensions = super.getNodeDimensions(value, row, depth, expanded, size);
      Insets insets = tree.getInsets();
      dimensions.width = tree.getWidth() - getRowX(row, depth) - insets.left - insets.right;
      return dimensions;
    }
  };
}
 
开发者ID:Orange-OpenSource,项目名称:matos-profiles,代码行数:13,代码来源:JClassView.java

示例6: createNodeDimensions

import javax.swing.tree.AbstractLayoutCache; //导入方法依赖的package包/类
protected AbstractLayoutCache.NodeDimensions createNodeDimensions() {
    return new NodeDimensionsHandler();
}
 
开发者ID:shannah,项目名称:cn1,代码行数:4,代码来源:BasicTreeUI.java

示例7: createNodeDimensions

import javax.swing.tree.AbstractLayoutCache; //导入方法依赖的package包/类
/**
 * Creates an instance of NodeDimensions that is able to determine the size of
 * a given node in the tree. The node dimensions must be created before
 * configuring the layout cache.
 *
 * @return the NodeDimensions of a given node in the tree
 */
protected AbstractLayoutCache.NodeDimensions createNodeDimensions()
{
  return new NodeDimensionsHandler();
}
 
开发者ID:vilie,项目名称:javify,代码行数:12,代码来源:BasicTreeUI.java

示例8: createNodeDimensions

import javax.swing.tree.AbstractLayoutCache; //导入方法依赖的package包/类
/**
 * Creates an instance of NodeDimensions that is able to determine the size of
 * a given node in the tree. The node dimensions must be created before
 * configuring the layout cache.
 * 
 * @return the NodeDimensions of a given node in the tree
 */
protected AbstractLayoutCache.NodeDimensions createNodeDimensions()
{
  return new NodeDimensionsHandler();
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:12,代码来源:BasicTreeUI.java


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