Пример #1
0
 public void editValueInTextField() {
   if (getSelectedRow() > -1) {
     int row = getSelectedRow();
     LargeTextDialog dialog =
         new LargeTextDialog((javax.swing.JDialog) this.getTopLevelAncestor(), true);
     if (dialog.editText(
         (String) tableModel.getValueAt(row, 0), (String) tableModel.getValueAt(row, 1))) {
       tableModel.setValueAt(dialog.getText(), row, 1);
     }
   }
 }
Пример #2
0
 public void moveAttributeDown() {
   if ((getSelectedRow() > -1) && (getSelectedRow() < this.getRowCount() - 1)) {
     commitCellEdit();
     int remind = getSelectedRow();
     tableModel.moveAttributeUp(getSelectedRow() + 1);
     this.changeSelection(remind + 1, 0, false, false);
   }
 }
Пример #3
0
 public void moveAttributeUp() {
   if (getSelectedRow() > 0) {
     commitCellEdit();
     int remind = getSelectedRow();
     tableModel.moveAttributeUp(getSelectedRow());
     this.changeSelection(remind - 1, 0, false, false);
   }
 }
Пример #4
0
 public void removeAttribute() {
   if (getSelectedRow() > -1) {
     commitCellEdit();
     int remind = getSelectedRow();
     tableModel.removeAttribute(getSelectedRow());
     if (this.getRowCount() > remind) {
       this.changeSelection(Math.max(0, remind), 0, false, false);
     } else if (getRowCount() > 0) {
       this.changeSelection(getRowCount() - 1, 0, false, false);
     }
   }
 }
Пример #5
0
 public void addAttribute() {
   commitCellEdit();
   tableModel.addAttribute();
   this.changeSelection(getRowCount() - 1, 0, false, false);
   this.editCellAt(getRowCount() - 1, 0);
 }
Пример #6
0
 public void setUDInformation(
     org.exmaralda.partitureditor.jexmaralda.UDInformationHashtable info) {
   commitCellEdit();
   tableModel.setUDInformation(info);
 }
Пример #7
0
 public org.exmaralda.partitureditor.jexmaralda.UDInformationHashtable getUDInformation() {
   return tableModel.getUDInformation();
 }
Пример #8
0
 /** Creates new UDInformationTable */
 public UDInformationTable(org.exmaralda.partitureditor.jexmaralda.UDInformationHashtable udi) {
   tableModel = new UDInformationTableModel(udi);
   setModel(tableModel);
   tableModel.addTableModelListener(this);
 }
Пример #9
0
 /** Creates new UDInformationTable */
 public UDInformationTable() {
   tableModel = new UDInformationTableModel();
   setModel(tableModel);
   tableModel.addTableModelListener(this);
 }