Package org.jdesktop.swingx

Examples of org.jdesktop.swingx.JXTable.convertRowIndexToModel()


            @Override
            public void valueChanged(ListSelectionEvent e) {
                ListSelectionModel listSelectionModel = (ListSelectionModel) e.getSource();
                if (!listSelectionModel.isSelectionEmpty()) {
                    Integer selectionIndex = listSelectionModel.getMinSelectionIndex();
                    final Violation violation = violationTableModel.getViolation(violationsTable.convertRowIndexToModel(selectionIndex));

                    if (violation.getLine() != null) {
                        DataManager.getInstance().getDataContextFromFocus().doWhenDone(new AsyncResult.Handler<DataContext>() {
                            @Override
                            public void run(DataContext dataContext) {
View Full Code Here


    if (selectedRows.length > 0) {
      DefaultTableModel model = (DefaultTableModel) table.getModel();

      // sort
      for (int i = 0; i < selectedRows.length; i++) {
        sorteredRows[i] = table.convertRowIndexToModel(selectedRows[i]);
      }
      for (int i = 0; i < sorteredRows.length - 1; i++) {
        for (int j = i + 1; j < sorteredRows.length; j++) {
          if (sorteredRows[i] > sorteredRows[j]) {
            int temp = sorteredRows[i];
View Full Code Here

            Object[] options = {TxtManager.getTxt("INFORMATION.OKBUTTON")};
            int n = JOptionPane.showOptionDialog(container, scrollPane, TxtManager.getTxt("INFORMATION.CORRESPONDENCE.SELECTLD"),
                    JOptionPane.OK_OPTION, JOptionPane.PLAIN_MESSAGE, null, options, options[0]);
            if (n == 0) {
                if (table.getSelectedRow() != -1) {
                    int selectedRowNumber = table.convertRowIndexToModel(table.getSelectedRow());
                    LDTableModel model = (LDTableModel)table.getModel();
                    Vector dataVector = model.getDataVector();
                    Vector rowDatas = (Vector)dataVector.get(selectedRowNumber);
                    ld = (String)rowDatas.get(0);
                }
View Full Code Here

        if (!(table instanceof JXTable)) return null;
        final JXTable xTable = (JXTable) table;
        IndexMapper mapper = new IndexMapper() {

            public int viewToModel(int index) {
                 return xTable.convertRowIndexToModel(index);
            }

            public int modelToView(int index) {
                return xTable.convertRowIndexToView(index);
            }
View Full Code Here

        if (!(table instanceof JXTable)) return null;
        final JXTable xTable = (JXTable) table;
        IndexMapper mapper = new IndexMapper() {

            public int viewToModel(int index) {
                 return xTable.convertRowIndexToModel(index);
            }

            public int modelToView(int index) {
                return xTable.convertRowIndexToView(index);
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.