예제 #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);
 }