本文整理了Java中org.netbeans.swing.outline.Outline.getColumnModel()
方法的一些代码示例,展示了Outline.getColumnModel()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Outline.getColumnModel()
方法的具体详情如下:
包路径:org.netbeans.swing.outline.Outline
类名称:Outline
方法名:getColumnModel
暂无
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-mercurial
@Override
public void run() {
int width = view.getWidth();
view.getOutline().getColumnModel().getColumn(0).setPreferredWidth(width * 40 / 100);
view.getOutline().getColumnModel().getColumn(1).setPreferredWidth(width * 20 / 100);
view.getOutline().getColumnModel().getColumn(2).setPreferredWidth(width * 40 / 100);
}
});
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-remotefs-versioning-api
public void run() {
int width = getWidth();
getOutline().getColumnModel().getColumn(0).setPreferredWidth(width * 40 / 100);
getOutline().getColumnModel().getColumn(1).setPreferredWidth(width * 60 / 100);
}
});
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-mercurial
@Override
public void run() {
if (getOutline().getColumnCount() == 4) {
int width = getWidth();
getOutline().getColumnModel().getColumn(0).setPreferredWidth(width * 25 / 100);
getOutline().getColumnModel().getColumn(1).setPreferredWidth(width * 15 / 100);
getOutline().getColumnModel().getColumn(2).setPreferredWidth(width * 10 / 100);
getOutline().getColumnModel().getColumn(3).setPreferredWidth(width * 50 / 100);
}
}
});
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-dlight-visualizers
@Override
public void actionPerformed(ActionEvent e) {
// ok, do the sorting
int column = columnNumber;
ETableColumnModel columnModel = null;
if (outline.getColumnModel() instanceof ETableColumnModel) {
columnModel = (ETableColumnModel) outline.getColumnModel();
columnModel.clearSortedColumns();
}
boolean asc = !ascColumnValues.containsKey(column) ? true : ascColumnValues.get(column);
outline.setColumnSorted(column, asc, 1);
ascColumnValues.put(column, !asc);
outline.getTableHeader().resizeAndRepaint();
}
});
代码示例来源:origin: in.jlibs/org-netbeans-swing-outline
public Rectangle getNodeDimensions(Object value, int row, int depth,
boolean expanded, Rectangle bounds) {
int wid = Outline.this.getColumnModel().getColumn(0).getPreferredWidth();
bounds.setBounds (0, row * getRowHeight(), wid, getRowHeight());
return bounds;
}
代码示例来源: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.netbeans.modules/org-netbeans-modules-mercurial
@SuppressWarnings("unchecked")
private void setupColumns() {
ResourceBundle loc = NbBundle.getBundle(DiffTreeTable.class);
setPropertyColumns(RevisionNode.COLUMN_NAME_PATH, loc.getString("LBL_DiffTree_Column_Path"),
RevisionNode.COLUMN_NAME_DATE, loc.getString("LBL_DiffTree_Column_Time"),
RevisionNode.COLUMN_NAME_USERNAME, loc.getString("LBL_DiffTree_Column_Username"),
RevisionNode.COLUMN_NAME_MESSAGE, loc.getString("LBL_DiffTree_Column_Message"));
setPropertyColumnDescription(RevisionNode.COLUMN_NAME_PATH, loc.getString("LBL_DiffTree_Column_Path_Desc"));
setPropertyColumnDescription(RevisionNode.COLUMN_NAME_DATE, loc.getString("LBL_DiffTree_Column_Time_Desc"));
setPropertyColumnDescription(RevisionNode.COLUMN_NAME_USERNAME, loc.getString("LBL_DiffTree_Column_Username_Desc"));
setPropertyColumnDescription(RevisionNode.COLUMN_NAME_MESSAGE, loc.getString("LBL_DiffTree_Column_Message_Desc"));
TableColumnModel model = getOutline().getColumnModel();
if (model instanceof ETableColumnModel) {
((ETableColumnModel) model).setColumnHidden(model.getColumn(1), true);
}
TableColumn column = getOutline().getColumn(loc.getString("LBL_DiffTree_Column_Message"));
column.setCellRenderer(new MessageRenderer(getOutline().getDefaultRenderer(String.class)));
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: digital-preservation/droid
TableColumnModel columnModel = resultsOutline.getColumnModel();
代码示例来源: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: uk.gov.nationalarchives/droid-ui
TableColumnModel columnModel = resultsOutline.getColumnModel();
代码示例来源:origin: in.jlibs/jlibs-examples
outline.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 14));
outline.setModel(DefaultOutlineModel.createOutlineModel(treeModel, rowModel));
outline.getColumnModel().getColumn(1).setMinWidth(150);
内容来源于网络,如有侵权,请联系作者删除!