本文整理了Java中org.netbeans.swing.outline.Outline.setRootVisible()
方法的一些代码示例,展示了Outline.setRootVisible()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Outline.setRootVisible()
方法的具体详情如下:
包路径:org.netbeans.swing.outline.Outline
类名称:Outline
方法名:setRootVisible
[英]Set whether or not the root is visible
[中]设置根目录是否可见
代码示例来源:origin: in.jlibs/jlibs-examples
public OutlineNavigatorTest(String title){
super(title);
Container contents = getContentPane();
contents.add(new JScrollPane(outline));
outline.setRootVisible(false);
setDefaultCloseOperation(EXIT_ON_CLOSE);
setSize(500, 500);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards
@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());
}
}
代码示例来源:origin: stackoverflow.com
DefaultOutlineModel.createOutlineModel(model, new MyRowModel());
Outline outline = new Outline();
outline.setRootVisible(true);
outline.setModel(outlineModel);
frame.getContentPane().add(new JScrollPane(outline));
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-debugger-common2
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);
}
代码示例来源:origin: org.rwshop/org.rwshop.nb.motion
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);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-remotefs-versioning-api
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();
}
代码示例来源:origin: senbox-org/snap-desktop
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);
}
代码示例来源:origin: org.rwshop/org.rwshop.nb.motion
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);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-dlight-visualizers
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());
}
});
}
代码示例来源:origin: stackoverflow.com
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);
}
});
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-remotefs-versioning-api
@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);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-mercurial
@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() ) );
}
代码示例来源:origin: uk.gov.nationalarchives/droid-ui
resultsOutline.setVisible(true);
resultsOutline.setRootVisible(false);
代码示例来源:origin: digital-preservation/droid
resultsOutline.setVisible(true);
resultsOutline.setRootVisible(false);
内容来源于网络,如有侵权,请联系作者删除!