JXTable table = new JXTable(myModel); AbstractHyperlinkAction<Object> simpleAction = new AbstractHyperlinkAction<Object>(null) { public void actionPerformed(ActionEvent e) { // here goes what you want to do on activating the hyperlink //LOG.info("hit: " + getTarget()); } }; TableCellRenderer renderer = new DefaultTableRenderer( new HyperlinkProvider(simpleAction)); table.getColumnExt(0).setEditable(false); table.getColumnExt(0).setCellRenderer(renderer);
/** * {@inheritDoc} */ @Override public int getColumnIndex(Object identifier) { TableColumn column = table.getColumnExt(identifier); return column != null ? column.getModelIndex() : -1; }
public static void showOnlyThisColumns(JXTable table, Object[] columns) { for (Object tableColumns : columns) { table.getColumnExt(tableColumns).setVisible(true); } // updateColumnsSize(); } }
/** * {@inheritDoc} */ @Override public int getColumnIndex(Object identifier) { TableColumn column = table.getColumnExt(identifier); return column != null ? column.getModelIndex() : -1; }
JXTable table = new JXTable(myModel); AbstractHyperlinkAction<Object> simpleAction = new AbstractHyperlinkAction<Object>(null) { public void actionPerformed(ActionEvent e) { // here goes what you want to do on activating the hyperlink //LOG.info("hit: " + getTarget()); } }; TableCellRenderer renderer = new DefaultTableRenderer( new HyperlinkProvider(simpleAction)); table.getColumnExt(0).setEditable(false); table.getColumnExt(0).setCellRenderer(renderer);
/** * {@inheritDoc} */ @Override public int getColumnIndex(Object identifier) { TableColumn column = table.getColumnExt(identifier); return column != null ? column.getModelIndex() : -1; }
/** * {@inheritDoc} */ @Override public int getColumnIndex(Object identifier) { TableColumn column = table.getColumnExt(identifier); return column != null ? column.getModelIndex() : -1; }
/** * {@inheritDoc} */ @Override public int getColumnIndex(Object identifier) { TableColumn column = table.getColumnExt(identifier); return column != null ? column.getModelIndex() : -1; }
public UsersMultipleOptionsPanel(ExtensionUserManagement extension, UsersTableModel model, int contextId) { super(model); this.extension = extension; getTable().getColumnExt(0).setPreferredWidth(40); getTable().getColumnExt(1).setPreferredWidth(30); getTable().getColumnExt(1).setMaxWidth(50); getTable().setSortOrder(2, SortOrder.ASCENDING); }
public DataDrivenNodesMultipleOptionsPanel(StructuralNodeModifiersTableModel model) { super(model); getTable().getColumnExt(0).setPreferredWidth(50); getTable().getColumnExt(1).setPreferredWidth(50); getTable().getColumnExt(2).setPreferredWidth(200); getTable().setSortOrder(1, SortOrder.ASCENDING); }
/** * Returns the column tooltip of the column at the position * of the MouseEvent, if a tooltip is available. * * @param event the mouseEvent representing the mouse location. * @return the column tooltip of the column below the mouse location, * or null if not available. */ protected String getColumnToolTipText(MouseEvent event) { if (getXTable() == null) return null; int column = columnAtPoint(event.getPoint()); if (column < 0) return null; TableColumnExt columnExt = getXTable().getColumnExt(column); return columnExt != null ? columnExt.getToolTipText() : null; }
/** * Returns the column tooltip of the column at the position * of the MouseEvent, if a tooltip is available. * * @param event the mouseEvent representing the mouse location. * @return the column tooltip of the column below the mouse location, * or null if not available. */ protected String getColumnToolTipText(MouseEvent event) { if (getXTable() == null) return null; int column = columnAtPoint(event.getPoint()); if (column < 0) return null; TableColumnExt columnExt = getXTable().getColumnExt(column); return columnExt != null ? columnExt.getToolTipText() : null; }
/** * Returns the column tooltip of the column at the position * of the MouseEvent, if a tooltip is available. * * @param event the mouseEvent representing the mouse location. * @return the column tooltip of the column below the mouse location, * or null if not available. */ protected String getColumnToolTipText(MouseEvent event) { if (getXTable() == null) return null; int column = columnAtPoint(event.getPoint()); if (column < 0) return null; TableColumnExt columnExt = getXTable().getColumnExt(column); return columnExt != null ? columnExt.getToolTipText() : null; }
/** * Returns the column tooltip of the column at the position * of the MouseEvent, if a tooltip is available. * * @param event the mouseEvent representing the mouse location. * @return the column tooltip of the column below the mouse location, * or null if not available. */ protected String getColumnToolTipText(MouseEvent event) { if (getXTable() == null) return null; int column = columnAtPoint(event.getPoint()); if (column < 0) return null; TableColumnExt columnExt = getXTable().getColumnExt(column); return columnExt != null ? columnExt.getToolTipText() : null; }
/** * Returns the column tooltip of the column at the position * of the MouseEvent, if a tooltip is available. * * @param event the mouseEvent representing the mouse location. * @return the column tooltip of the column below the mouse location, * or null if not available. */ protected String getColumnToolTipText(MouseEvent event) { if (getXTable() == null) return null; int column = columnAtPoint(event.getPoint()); if (column < 0) return null; TableColumnExt columnExt = getXTable().getColumnExt(column); return columnExt != null ? columnExt.getToolTipText() : null; }
public ScannersMultipleOptionsPanel(OptionsPassiveScanTableModel model) { super(model); this.model = model; getTable().getColumnExt(0).setPreferredWidth(20); getTable().setSortOrder(1, SortOrder.ASCENDING); }
public AntiCsrfMultipleOptionsPanel(OptionsAntiCsrfTableModel model) { super(model); this.model = model; getTable().getColumnExt(0).setPreferredWidth(20); getTable().setSortOrder(1, SortOrder.ASCENDING); }
public HttpSessionTokensMultipleOptionsPanel(OptionsHttpSessionsTableModel model) { super(model); this.model = model; getTable().getColumnExt(0).setPreferredWidth(20); getTable().setSortOrder(1, SortOrder.ASCENDING); }
public GlobalExcludeURLMultipleOptionsPanel(OptionsGlobalExcludeURLTableModel model) { super(model); this.model = model; getTable().getColumnExt(0).setPreferredWidth(25); // checkbox column should be tiny getTable().getColumnExt(1).setPreferredWidth(350); // wide Desc Col getTable().getColumnExt(2).setPreferredWidth(300); // less wide Regex Column getTable().setHorizontalScrollEnabled(true); // descriptions / regexs are very wide, so turn on horiz scroll getTable().setAutoCreateRowSorter(true); getTable().setSortOrder(1, SortOrder.ASCENDING); // sort by description by default /* XXX For some reason, sorting isn't accurate in the table. The getColumnClass correctly returns String for the Description, but sort order might be: "Ext - MS Word, ExtParam - Bla bla, Ext - PDF." It is like string.compare for the column sort ignores the space and dash. Really unsure as to why. As a work-around, start some descriptions with "Extension" instead of the shorter "Ext" */ }
public ProxiesMultipleOptionsPanel(OptionsProxiesTableModel model, ExtensionProxies extension) { super(model); this.extension = extension; getTable().getColumnExt(0).setPreferredWidth(20); getTable().setVisibleRowCount(10); getTable().setSortOrder(1, SortOrder.ASCENDING); }