• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java OutlineView类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.openide.explorer.view.OutlineView的典型用法代码示例。如果您正苦于以下问题:Java OutlineView类的具体用法?Java OutlineView怎么用?Java OutlineView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



OutlineView类属于org.openide.explorer.view包,在下文中一共展示了OutlineView类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getHorizontalScrollbarPolicy

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
private static int getHorizontalScrollbarPolicy() {
    try {
        String prop = System.getProperty(PROP_HORIZONTAL_SCROLLBAR);
        if (prop == null) {
            return OutlineView.HORIZONTAL_SCROLLBAR_AS_NEEDED;
        }
        switch (prop) {
            case "on":                                              //NOI18N
            case "On":                                              //NOI18N
            case "ON":                                              //NOI18N
                return OutlineView.HORIZONTAL_SCROLLBAR_ALWAYS;
            case "off":                                             //NOI18N
            case "Off":                                             //NOI18N
            case "OFF":                                             //NOI18N
                return OutlineView.HORIZONTAL_SCROLLBAR_NEVER;
            default:
                return OutlineView.HORIZONTAL_SCROLLBAR_AS_NEEDED;
        }
    } catch (Exception e) {
        Logger.getLogger(ResultsOutlineSupport.class.getName()).log(
                Level.INFO, null, e);
        return OutlineView.HORIZONTAL_SCROLLBAR_AS_NEEDED;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:ResultsOutlineSupport.java


示例2: findUp

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
/**
 * Start finding for next or previous occurance, from a node or its previous
 * or next sibling of node {@code node}
 *
 * @param node reference node
 * @param offset 0 to start from node {@code node}, 1 to start from its next
 * sibling, -1 to start from its previous sibling.
 * @param dir Direction: 1 for next, -1 for previous.
 */
Node findUp(Node node, int dir, int offset, OutlineView outlineView,
        boolean canExpand) {
    if (node == null) {
        return null;
    }
    Node parent = node.getParentNode();
    Node[] siblings;
    if (parent == null) {
        siblings = new Node[]{node};
    } else {
        siblings = getChildren(parent, outlineView, canExpand);
    }
    int nodeIndex = findChildIndex(node, siblings);
    if (nodeIndex + offset < 0 || nodeIndex + offset >= siblings.length) {
        return findUp(parent, dir, dir, outlineView, canExpand);
    }
    for (int i = nodeIndex + offset;
            i >= 0 && i < siblings.length; i += dir) {
        Node found = findDown(siblings[i], siblings, i, dir, outlineView,
                canExpand);
        return found;
    }
    return findUp(parent, dir, offset, outlineView, canExpand);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:34,代码来源:AbstractSearchResultsPanel.java


示例3: findDown

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
/**
 * Find Depth-first search to find a detail node in the subtree.
 */
private Node findDown(Node node, Node[] siblings, int nodeIndex,
        int dir, OutlineView outlineView, boolean canExpand) {

    Node[] children = getChildren(node, outlineView, canExpand);
    for (int i = dir > 0 ? 0 : children.length - 1;
            i >= 0 && i < children.length; i += dir) {
        Node found = findDown(children[i], children, i, dir, outlineView,
                canExpand);
        if (found != null) {
            return found;
        }
    }
    for (int i = nodeIndex; i >= 0 && i < siblings.length; i += dir) {
        if (isDetailNode(siblings[i])) {
            return siblings[i];
        }
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:23,代码来源:AbstractSearchResultsPanel.java


示例4: initAccessibility

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
private void initAccessibility() {
    ResourceBundle bundle = NbBundle.getBundle(ResultView.class);

    AccessibleContext accessCtx;
    OutlineView outlineView = resultsOutlineSupport.getOutlineView();

    accessCtx = outlineView.getHorizontalScrollBar().getAccessibleContext();
    accessCtx.setAccessibleName(
            bundle.getString("ACSN_HorizontalScrollbar"));          //NOI18N

    accessCtx = outlineView.getVerticalScrollBar().getAccessibleContext();
    accessCtx.setAccessibleName(
            bundle.getString("ACSN_VerticalScrollbar"));            //NOI18N

    accessCtx = outlineView.getAccessibleContext();
    accessCtx.setAccessibleName(
            bundle.getString("ACSN_ResultTree"));                   //NOI18N
    accessCtx.setAccessibleDescription(
            bundle.getString("ACSD_ResultTree"));                   //NOI18N
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:BasicAbstractResultsPanel.java


示例5: setUp

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
@Before
public void setUp() {
    rootNode = new RootNode();
    a = rootNode.getChildren().getNodeAt(0);
    b = rootNode.getChildren().getNodeAt(1);
    c = rootNode.getChildren().getNodeAt(2);
    a1 = a.getChildren().getNodeAt(0);
    b2 = b.getChildren().getNodeAt(1);
    c3 = c.getChildren().getNodeAt(2);
    resultsPanel = new AbstractSearchResultsPanel(null, null) {

        @Override
        protected OutlineView getOutlineView() {
            return null;
        }

        @Override
        protected boolean isDetailNode(Node n) {
            return n.getLookup().lookup(TextDetail.class) != null;
        }
    };
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:23,代码来源:BasicSearchResultsPanelTest.java


示例6: findUp

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
/**
 * Start finding for next or previous occurance, from a node or its previous
 * or next sibling of node {@code node}
 *
 * @param node reference node
 * @param offset 0 to start from node {@code node}, 1 to start from its next
 * sibling, -1 to start from its previous sibling.
 * @param dir Direction: 1 for next, -1 for previous.
 */
private Node findUp(Node node, int dir, int offset, OutlineView outlineView,
        boolean canExpand) {
    if (node == null) {
        return null;
    }
    Node parent = node.getParentNode();
    Node[] siblings;
    if (parent == null) {
        siblings = new Node[]{node};
    } else {
        siblings = getChildren(parent, outlineView, canExpand);
    }
    int nodeIndex = findChildIndex(node, siblings);
    if (nodeIndex + offset < 0 || nodeIndex + offset >= siblings.length) {
        return findUp(parent, dir, dir, outlineView, canExpand);
    }
    for (int i = nodeIndex + offset;
            i >= 0 && i < siblings.length; i += dir) {
        Node found = findDown(siblings[i], siblings, i, dir, outlineView,
                canExpand);
        return found;
    }
    return findUp(parent, dir, offset, outlineView, canExpand);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:34,代码来源:FileTreeView.java


示例7: findDown

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
/**
 * Find Depth-first search to find a detail node in the subtree.
 */
private Node findDown(Node node, Node[] siblings, int nodeIndex,
        int dir, OutlineView outlineView, boolean canExpand) {

    Node[] children = getChildren(node, outlineView, canExpand);
    for (int i = dir > 0 ? 0 : children.length - 1;
            i >= 0 && i < children.length; i += dir) {
        Node found = findDown(children[i], children, i, dir, outlineView,
                canExpand);
        if (found != null) {
            return found;
        }
    }
    for (int i = nodeIndex; i >= 0 && i < siblings.length; i += dir) {
        Node converted = convertNode(siblings[i]);
        if (converted != null) {
            return converted;
        }
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:FileTreeView.java


示例8: initComponents

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    rootLayeredPane = new javax.swing.JLayeredPane();
    outlineView = new OutlineView(getTitle());

    rootLayeredPane.setLayout(new java.awt.GridLayout(1, 0));

    outlineView.setToolTipText(org.openide.util.NbBundle.getMessage(TableMemberPanel.class, "TableMemberPanel.outlineView.toolTipText")); // NOI18N
    rootLayeredPane.add(outlineView);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(rootLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 407, Short.MAX_VALUE)
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(rootLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 536, Short.MAX_VALUE)
    );
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:29,代码来源:TableMemberPanel.java


示例9: initComponents

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    rootLayeredPane = new javax.swing.JLayeredPane();
    outlineView = new OutlineView(getTitle());

    rootLayeredPane.setLayout(new java.awt.GridLayout(1, 0));

    outlineView.setToolTipText(org.openide.util.NbBundle.getMessage(EntityMappingMemberPanel.class, "EntityMappingMemberPanel.outlineView.toolTipText")); // NOI18N
    rootLayeredPane.add(outlineView);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(rootLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 407, Short.MAX_VALUE)
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(rootLayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 536, Short.MAX_VALUE)
    );
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:29,代码来源:EntityMappingMemberPanel.java


示例10: initView

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
private void initView() {
    setLayout(new BorderLayout());
    outlineView = new OutlineView(nodesColumnName);
    outlineView.setPropertyColumns(COLUMN_NAMES);
    final Outline outline = outlineView.getOutline();
    outline.setRootVisible(false);
    DefaultTableCellRenderer decimalTableCellRenderer = new StringDecimalFormatRenderer();
    outline.setDefaultRenderer(Double.class, decimalTableCellRenderer);
    outline.setDefaultRenderer(Float.class, decimalTableCellRenderer);
    outline.setDefaultRenderer(Node.Property.class, new MetadataOutlineCellRenderer());
    final TableColumnModel columnModel = outline.getColumnModel();
    columnModel.getColumn(0).setCellRenderer(new MetadataOutlineCellRenderer());
    final int[] columnWidths = COLUMN_WIDTHS;
    for (int i = 0; i < columnModel.getColumnCount(); i++) {
        columnModel.getColumn(i).setPreferredWidth(columnWidths[i]);
    }
    add(outlineView, BorderLayout.CENTER);
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:19,代码来源:MetadataViewTopComponent.java


示例11: createOutlineView

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
private void createOutlineView() {
    outlineView = new OutlineView(UiUtils.getText(
            "BasicSearchResultsPanel.outline.nodes"));              //NOI18N
    outlineView.getOutline().setDefaultRenderer(Node.Property.class,
            new ResultsOutlineCellRenderer());
    setOutlineColumns();
    outlineView.getOutline().setAutoCreateColumnsFromModel(false);
    outlineView.addTreeExpansionListener(
            new ExpandingTreeExpansionListener());
    outlineView.getOutline().setRootVisible(false);
    outlineView.addHierarchyListener(new HierarchyListener() {
        @Override
        public void hierarchyChanged(HierarchyEvent e) {
            if ((e.getChangeFlags() & HierarchyEvent.DISPLAYABILITY_CHANGED)
                    != 0) {
                if (outlineView.isDisplayable()) {
                    outlineView.expandNode(resultsNode);
                }
            }
        }
    });
    outlineView.getOutline().getColumnModel().addColumnModelListener(
            new ColumnsListener());
    outlineView.getOutline().getInputMap().remove(
            KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0)); //#209949
    outlineView.getOutline().getInputMap().put(KeyStroke.getKeyStroke(
            KeyEvent.VK_DELETE,
            0), "hide"); //NOI18N
    outlineView.getOutline().getActionMap().put("hide", SystemAction.get( //NOI18N
            HideResultAction.class));
    outlineView.getOutline().setShowGrid(false);
    Font font = outlineView.getOutline().getFont();
    FontMetrics fm = outlineView.getOutline().getFontMetrics(font);
    outlineView.getOutline().setRowHeight(
            Math.max(16, fm.getHeight()) + VERTICAL_ROW_SPACE);
    outlineView.setTreeHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_POLICY);
    setTooltipHidingBehavior();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:39,代码来源:ResultsOutlineSupport.java


示例12: findShiftNode

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
private Node findShiftNode(int direction, OutlineView outlineView,
        boolean canExpand) {
    Node[] selected = getExplorerManager().getSelectedNodes();
    Node n = null;
    if ((selected == null || selected.length == 0)
            /* TODO && getExplorerManager().getRootContext() == resultsOutlineSupport.getRootNode() */) {
        n = getExplorerManager().getRootContext();
    } else if (selected.length == 1) {
        n = selected[0];
    }
    return n == null ? null : findDetailNode(n, direction, outlineView,
            canExpand);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:AbstractSearchResultsPanel.java


示例13: getChildren

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
private static Node[] getChildren(Node n, OutlineView outlineView,
        boolean canExpand) {
    if (outlineView != null) {
        if (!outlineView.isExpanded(n)) {
            if (canExpand) {
                outlineView.expandNode(n);
            } else {
                return n.getChildren().getNodes(true);
            }
        }
        return getChildrenInDisplayedOrder(n, outlineView);
    } else {
        return n.getChildren().getNodes(true);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:AbstractSearchResultsPanel.java


示例14: getChildrenInDisplayedOrder

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
private static Node[] getChildrenInDisplayedOrder(Node parent,
        OutlineView outlineView) {

    Outline outline = outlineView.getOutline();
    Node[] unsortedChildren = parent.getChildren().getNodes(true);
    int rows = outlineView.getOutline().getRowCount();
    int start = findRowIndexInOutline(parent, outline, rows);
    if (start == -1) {
        return unsortedChildren;
    }
    List<Node> children = new LinkedList<Node>();
    for (int j = start + 1; j < rows; j++) {
        int childModelIndex = outline.convertRowIndexToModel(j);
        if (childModelIndex == -1) {
            continue;
        }
        Object childObject = outline.getModel().getValueAt(
                childModelIndex, 0);
        Node childNode = Visualizer.findNode(childObject);
        if (childNode.getParentNode() == parent) {
            children.add(childNode);
        } else if (children.size() == unsortedChildren.length) {
            break;
        }
    }
    return children.toArray(new Node[children.size()]);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:28,代码来源:AbstractSearchResultsPanel.java


示例15: DefaultSearchResultsPanel

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
public DefaultSearchResultsPanel(
        SearchResultsDisplayer.NodeDisplayer<T> nodeDisplayer,
        SearchComposition<T> searchComposition,
        Presenter searchProviderPresenter) {

    super(searchComposition, searchProviderPresenter);
    this.resultsNode = new ResultsNode();
    this.nodeDisplayer = nodeDisplayer;
    resultsNode.update();
    outlineView = new OutlineView(UiUtils.getText(
            "BasicSearchResultsPanel.outline.nodes"));              //NOI18N
    outlineView.getOutline().setRootVisible(false);
    initExpandButton();
    getContentPanel().add(outlineView);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:DefaultSearchResultsPanel.java


示例16: initComponents

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
/** This method is called from within the constructor to
 * initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    outlineView1 = new OutlineView(NbBundle.getMessage(CustomScopePanel.class, "DLG_CustomScope"));

    outlineView1.setDefaultActionAllowed(false);
    outlineView1.setDoubleBuffered(true);
    outlineView1.setDragSource(false);
    outlineView1.setDropTarget(false);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addComponent(outlineView1, javax.swing.GroupLayout.DEFAULT_SIZE, 527, Short.MAX_VALUE)
            .addContainerGap())
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addComponent(outlineView1, javax.swing.GroupLayout.DEFAULT_SIZE, 426, Short.MAX_VALUE)
            .addContainerGap())
    );
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:34,代码来源:CustomScopePanel.java


示例17: FileTreeView

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
@NbBundle.Messages({
    "CTL_FileTree.treeColumn.Name=File"
})
public FileTreeView () {
    em = new ExplorerManager();
    view = new OutlineView(Bundle.CTL_FileTree_treeColumn_Name());
    view.getOutline().setShowHorizontalLines(true);
    view.getOutline().setShowVerticalLines(false);
    view.getOutline().setRootVisible(false);
    view.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    view.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    view.setPopupAllowed(false);
    view.getOutline().addMouseListener(this);
    view.getOutline().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT ).put(
            KeyStroke.getKeyStroke(KeyEvent.VK_F10, KeyEvent.SHIFT_DOWN_MASK ), "org.openide.actions.PopupAction");
    view.getOutline().getActionMap().put("org.openide.actions.PopupAction", new AbstractAction() {
        @Override
        public void actionPerformed(ActionEvent e) {
            showPopup(org.netbeans.modules.versioning.util.Utils.getPositionForPopup(view.getOutline()));
        }
    });
    view.getOutline().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "slideOut");
    viewComponent = new ViewContainer(em);
    viewComponent.add(view, BorderLayout.CENTER);
    viewComponent.addAncestorListener(this);
    em.addPropertyChangeListener(this);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:28,代码来源:FileTreeView.java


示例18: getChildrenInDisplayedOrder

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
private static Node[] getChildrenInDisplayedOrder(Node parent,
        OutlineView outlineView) {

    Outline outline = outlineView.getOutline();
    Node[] unsortedChildren = parent.getChildren().getNodes(true);
    int rows = outlineView.getOutline().getRowCount();
    int start = findRowIndexInOutline(parent, outline, rows);
    if (start == -1 && parent != ExplorerManager.find(outlineView).getRootContext()) {
        return unsortedChildren;
    }
    List<Node> children = new LinkedList<Node>();
    for (int j = start + 1; j < rows; j++) {
        int childModelIndex = outline.convertRowIndexToModel(j);
        if (childModelIndex == -1) {
            continue;
        }
        Object childObject = outline.getModel().getValueAt(
                childModelIndex, 0);
        Node childNode = Visualizer.findNode(childObject);
        if (childNode.getParentNode() == parent) {
            children.add(childNode);
        } else if (children.size() == unsortedChildren.length) {
            break;
        }
    }
    return children.toArray(new Node[children.size()]);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:28,代码来源:FileTreeView.java


示例19: TreeModelRoot

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
public TreeModelRoot (Models.CompoundModel model, OutlineView outlineView) {
    this.model = model;
    this.manager = ExplorerManager.find(outlineView);
    this.treeFeatures = new DefaultTreeFeatures(outlineView);
    this.outlineView = outlineView;
    modelListeners = new ModelChangeListener[] { new ModelChangeListener(model) };
    model.addModelListener (modelListeners[0]);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:TreeModelRoot.java


示例20: FixedColumnTable

import org.openide.explorer.view.OutlineView; //导入依赖的package包/类
public FixedColumnTable(int fixedColumns, JScrollPane scrollPane) {
    this.scrollPane = scrollPane;

    main = ((JTable) ((OutlineView)scrollPane.getViewport().getView()).getOutline());
    main.setAutoCreateColumnsFromModel(false);
    main.addPropertyChangeListener(this);

    //  Use the existing table to create a new table sharing
    //  the DataModel and ListSelectionModel

    int totalColumns = main.getColumnCount();

    fixed = new OutlineView("Tree");
    fixed.getOutline().setAutoCreateColumnsFromModel(false);
    fixed.getOutline().setModel(main.getModel());
    fixed.getOutline().setSelectionModel(main.getSelectionModel());
    fixed.getOutline().setFocusable(false);

    //  Remove the fixed columns from the main table
    //  and add them to the fixed table

    //for (int i = 0; i < fixedColumns; i++) {
        TableColumnModel columnModel = main.getColumnModel();
        TableColumn column = columnModel.getColumn(0);
        columnModel.removeColumn(column);
        //fixed.getOutline().getColumnModel().addColumn(column);
    //}

    //  Add the fixed table to the scroll pane

    fixed.getOutline().setPreferredScrollableViewportSize(fixed.getPreferredSize());
    scrollPane.setRowHeaderView(fixed);
    scrollPane.setCorner(JScrollPane.UPPER_LEFT_CORNER, fixed.getOutline().getTableHeader());

    // Synchronize scrolling of the row header with the main table

    scrollPane.getRowHeader().addChangeListener(this);
}
 
开发者ID:alcharkov,项目名称:source-code-metrics,代码行数:39,代码来源:FixedColumnTable.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Poisson类代码示例发布时间:2022-05-23
下一篇:
Java ClassFactory类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap