public OutlineNavigatorTest(String title){ super(title); Container contents = getContentPane(); contents.add(new JScrollPane(outline)); outline.setRootVisible(false); setDefaultCloseOperation(EXIT_ON_CLOSE); setSize(500, 500); }
@Override public void addNotify() { super.addNotify(); if (outlineView == null) { outlineView = new OutlineView(Bundle.CTL_FoundModes()); outlineView.getOutline().setRootVisible(false); tree.add(outlineView); outlineView.setDefaultActionAllowed(false); outlineView.setVisible(false); tree.setMinimumSize(outlineView.getPreferredSize()); } }
DefaultOutlineModel.createOutlineModel(model, new MyRowModel()); Outline outline = new Outline(); outline.setRootVisible(true); outline.setModel(outlineModel); frame.getContentPane().add(new JScrollPane(outline));
public ToolTipView() { final OutlineView ov = new OutlineView(); ov.setPropertyColumns("value", "Value"); //NOI18N ov.getOutline().getColumnModel().getColumn(0).setHeaderValue("Name"); //NOI18N ov.getOutline().setRootVisible(true); ov.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); setBorder(BorderFactory.createCompoundBorder( BorderFactory.createLineBorder(getForeground()), BorderFactory.createEmptyBorder(0, 0, 0, 0))); setLayout(new BorderLayout()); add(ov, BorderLayout.CENTER); }
protected void setModel(Robot rootGroup){ myRobot = rootGroup; myRowModel = new RobotTreeRowModel(); myTreeModel = new RobotTreeModel(rootGroup); OutlineModel mdl = DefaultOutlineModel.createOutlineModel(myTreeModel, myRowModel); myRobotTreeOutline.setRootVisible(true); myRobotTreeOutline.setModel(mdl); myRobotTreeOutline.setRenderDataProvider(new JointTreeRenderer()); jScrollPane1.setViewportView(myRobotTreeOutline); }
public ProjectOutlineView() { getOutline().setShowHorizontalLines(true); getOutline().setShowVerticalLines(false); getOutline().setRootVisible(false); setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); setBorder(UIManager.getBorder("Nb.ScrollPane.border")); // NOI18N getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(ProjectsView.class, "ACSD_ProjectOutlineView")); // NOI18N getAccessibleContext().setAccessibleName(NbBundle.getMessage(ProjectsView.class, "ACSN_ProjectOutlineView")); // NOI18N setPopupAllowed(true); setupColumns(); setDefaultColumnSizes(); }
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); }
protected void setModel(JointGroup rootGroup, List<String> propNames){ myRootGroup = rootGroup; myPropertyNames = propNames; myRowModel = new JointTreeRowModel(myPropertyNames); myTreeModel = new JointGroupTreeModel(rootGroup); OutlineModel mdl = DefaultOutlineModel.createOutlineModel(myTreeModel, myRowModel); myJointTreeOutline.setRootVisible(true); myJointTreeOutline.setModel(mdl); myJointTreeOutline.setRenderDataProvider(new JointTreeRenderer()); jScrollPane1.setViewportView(myJointTreeOutline); if(myListenerTree != null){ myListenerTree.stopListening(); } myListenerTree = JointTreeJointGroupListener.buildListenerTree(myRootGroup, myJointTreeOutline, myPropertyNames); }
public AbstractListViewTable(String nodeColumnName) { super(nodeColumnName); setDragSource(false); setDropTarget(false); setAllowedDragActions(DnDConstants.ACTION_NONE); setAllowedDropActions(DnDConstants.ACTION_NONE); final Outline outline = getOutline(); outline.setRootVisible(false); outline.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); outline.getTableHeader().setReorderingAllowed(false); outline.setRootVisible(false); ETableColumnModel colModel = (ETableColumnModel) getOutline().getColumnModel(); TableColumn firstColumn = colModel.getColumn(0); ETableColumn col = (ETableColumn) firstColumn; col.setNestedComparator(new Comparator<Node>() { @Override public int compare(Node o1, Node o2) { return o1.getName().compareTo(o2.getName()); } }); }
WindowManager.getDefault().invokeWhenUIReady(new Runnable() { @Override public void run() { RequestProcessor.getDefault().post(new Runnable() { @Override public void run() { //We must do this in the awt thread SwingUtilities.invokeLater(new Runnable() { @Override public void run() { TopComponent findTopComponent = WindowManager.getDefault().findTopComponent(PROJECT_LOGICAL_TAB_ID); // TODO add your handling code here: findTopComponent.setVisible(false); findTopComponent.removeAll(); findTopComponent.setLayout(new BorderLayout()); OutlineView myView2 = new OutlineView("Filename"); Outline outline2 = myView2.getOutline(); outline2.setRootVisible(false); outline2.setTableHeader(null); findTopComponent.add(myView2, BorderLayout.CENTER); findTopComponent.setVisible(true); findTopComponent.open(); findTopComponent.requestActive(); } }); } //This delay is important! }, 1000); } });
@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"); //NOI18N view.getOutline().getActionMap().put("org.openide.actions.PopupAction", new AbstractAction() { //NOI18N @Override public void actionPerformed(ActionEvent e) { showPopup(org.netbeans.modules.versioning.util.Utils.getPositionForPopup(view.getOutline())); } }); viewComponent = new ViewContainer(em); viewComponent.add(view, BorderLayout.CENTER); viewComponent.addAncestorListener(this); em.addPropertyChangeListener(this); }
@NbBundle.Messages("LBL_DiffView.TreeColumnLabel=Revision") public DiffTreeTable(SearchHistoryPanel master) { super(Bundle.LBL_DiffView_TreeColumnLabel()); this.master = master; getOutline().setShowHorizontalLines(true); getOutline().setShowVerticalLines(false); getOutline().setRootVisible(false); setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); setupColumns(); getOutline().setRenderDataProvider( new NoLeafIconRenderDataProvider( getOutline().getRenderDataProvider() ) ); }
resultsOutline.setVisible(true); resultsOutline.setRootVisible(false);
resultsOutline.setVisible(true); resultsOutline.setRootVisible(false);