/** * {@inheritDoc} */ @Override public Object getValue() { return table.getValueAt(row, column); }
@Override public void actionPerformed(ActionEvent e) { log.trace("rowIndex:" + rowIndex + " columnIndex:" + columnIndex); Object value = jTable.getValueAt(rowIndex, columnIndex); setClipboardContents(value == null ? "" : value.toString()); } });
@Override public void actionPerformed(ActionEvent e) { // System.out.println("rowIndex: " + rowIndex + " columnIndex: " + columnIndex); Object value = jTable.getValueAt(rowIndex, columnIndex); setClipboardContents(value == null ? "" : value.toString()); } });
/** * Returns the string representation of the cell value at the given * position. * * @param row the row index of the cell in view coordinates * @param column the column index of the cell in view coordinates. * @return the string representation of the cell value as it will appear in * the table. */ public String getStringAt(int row, int column) { TableCellRenderer renderer = getCellRenderer(row, column); if (renderer instanceof StringValue) { return ((StringValue) renderer).getString(getValueAt(row, column)); } return StringValues.TO_STRING.getString(getValueAt(row, column)); }
@Override public void valueChanged(ListSelectionEvent arg) { if (!arg.getValueIsAdjusting() && this.acceptListEvents) { int[] rows = anomalyTable.getSelectedRows(); LOGGER.debug("Selected ROWS: " + Arrays.toString(rows)); ArrayList<String> rules = new ArrayList<String>(rows.length); for (int i = 0; i < rows.length; i++) { int ridx = rows[i]; String rule = String.valueOf( anomalyTable.getValueAt(ridx, GrammarvizRulesTableColumns.RULE_NUMBER.ordinal())); rules.add(rule); } this.firePropertyChange(FIRING_PROPERTY_ANOMALY, this.selectedAnomalies, rules); } }
@Override public void valueChanged(ListSelectionEvent arg) { if (!arg.getValueIsAdjusting() && this.acceptListEvents) { int[] rows = sequiturTable.getSelectedRows(); LOGGER.debug("Selected ROWS: " + Arrays.toString(rows)); ArrayList<String> rules = new ArrayList<String>(rows.length); for (int i = 0; i < rows.length; i++) { int ridx = rows[i]; String rule = String.valueOf( sequiturTable.getValueAt(ridx, GrammarvizRulesTableColumns.RULE_NUMBER.ordinal())); rules.add(rule); } this.firePropertyChange(FIRING_PROPERTY, this.selectedRules, rules); this.selectedRules = rules; } }
@Override public void valueChanged(ListSelectionEvent arg) { if (!arg.getValueIsAdjusting() && this.acceptListEvents) { int col = periodicityTable.getSelectedColumn(); int row = periodicityTable.getSelectedRow(); String rule = String.valueOf( periodicityTable.getValueAt(row, PrunedRulesTableColumns.CLASS_NUMBER.ordinal())); LOGGER.debug("Selected ROW: " + row + " - COL: " + col + "; rule: " + rule); this.firePropertyChange(FIRING_PROPERTY_PERIOD, this.selectedRule, rule); this.selectedRule = rule; } }
@Override public void valueChanged(ListSelectionEvent arg) { if (!arg.getValueIsAdjusting() && this.acceptListEvents) { int[] rows = packedTable.getSelectedRows(); LOGGER.debug("Selected ROWS: " + Arrays.toString(rows)); ArrayList<String> rules = new ArrayList<String>(rows.length); for (int i = 0; i < rows.length; i++) { int ridx = rows[i]; String rule = String.valueOf( packedTable.getValueAt(ridx, GrammarvizRulesTableColumns.RULE_NUMBER.ordinal())); rules.add(rule); } this.firePropertyChange(FIRING_PROPERTY_PACKED, this.selectedRules, rules); this.selectedRules = rules; } // if (!arg.getValueIsAdjusting() && this.acceptListEvents) { // int col = packedTable.getSelectedColumn(); // int row = packedTable.getSelectedRow(); // consoleLogger.debug("Selected ROW: " + row + " - COL: " + col); // String rule = String.valueOf(packedTable.getValueAt(row, // PrunedRulesTableColumns.CLASS_NUMBER.ordinal())); // this.firePropertyChange(FIRING_PROPERTY_PACKED, this.selectedRule, rule); // this.selectedRule = rule; // } }
public void propertyChange(PropertyChangeEvent event) { String prop = event.getPropertyName(); if (prop.equalsIgnoreCase(GrammarVizMessage.MAIN_CHART_CLICKED_MESSAGE)) { String rule = (String) event.getNewValue(); for (int row = 0; row <= sequiturTable.getRowCount() - 1; row++) { for (int col = 0; col <= sequiturTable.getColumnCount() - 1; col++) { if (rule.equals(this.session.chartData.convert2OriginalSAXAlphabet('1', sequiturTable.getValueAt(row, col).toString()))) { sequiturTable.scrollRectToVisible(sequiturTable.getCellRect(row, 0, true)); sequiturTable.setRowSelectionInterval(row, row); } } } } }
protected HtmlParameterStats getSelectedParam() { int selectedRow = this.getParamsTable().getSelectedRow(); if (selectedRow == -1) { return null; } // TODO type is localized :( String type = (String) this.getParamsTable().getValueAt(selectedRow, 0); String name = (String) this.getParamsTable().getValueAt(selectedRow, 1); SiteParameters sps = extension.getSiteParameters(currentSite); if (sps != null) { return sps.getParam(HtmlParameter.Type.valueOf(type.toLowerCase()), name); // TODO HACK! } return null; }
/** * Returns the string representation of the cell value at the given * position. * * @param row the row index of the cell in view coordinates * @param column the column index of the cell in view coordinates. * @return the string representation of the cell value as it will appear in * the table. */ public String getStringAt(int row, int column) { // changed implementation to use StringValueRegistry StringValue stringValue = getStringValueRegistry().getStringValue( convertRowIndexToModel(row), convertColumnIndexToModel(column)); return stringValue.getString(getValueAt(row, column)); }
/** * Returns the string representation of the cell value at the given * position. * * @param row the row index of the cell in view coordinates * @param column the column index of the cell in view coordinates. * @return the string representation of the cell value as it will appear in * the table. */ public String getStringAt(int row, int column) { // changed implementation to use StringValueRegistry StringValue stringValue = getStringValueRegistry().getStringValue( convertRowIndexToModel(row), convertColumnIndexToModel(column)); return stringValue.getString(getValueAt(row, column)); }
/** * Returns the string representation of the cell value at the given * position. * * @param row the row index of the cell in view coordinates * @param column the column index of the cell in view coordinates. * @return the string representation of the cell value as it will appear in * the table. */ public String getStringAt(int row, int column) { // changed implementation to use StringValueRegistry StringValue stringValue = getStringValueRegistry().getStringValue( convertRowIndexToModel(row), convertColumnIndexToModel(column)); return stringValue.getString(getValueAt(row, column)); }
/** * Returns the string representation of the cell value at the given * position. * * @param row the row index of the cell in view coordinates * @param column the column index of the cell in view coordinates. * @return the string representation of the cell value as it will appear in * the table. */ public String getStringAt(int row, int column) { // changed implementation to use StringValueRegistry StringValue stringValue = getStringValueRegistry().getStringValue( convertRowIndexToModel(row), convertColumnIndexToModel(column)); return stringValue.getString(getValueAt(row, column)); }
for (int r = 0; r < getRowCount(table); r++) { Component comp = renderer.getTableCellRendererComponent(table, table .getValueAt(r, column), false, false, r, column); width = Math.max(width, comp.getPreferredSize().width);
return stringValue.getString( delegateTable.getValueAt( aRowIndex, aColumnIndex ) );