public void stateChanged(ChangeEvent e) { getPositionsModel().fireTableRowsUpdated(0, MAX_VALUE, ALL_COLUMNS); } });
public int getIndex(NavigationPosition position) { return mapRow(getDelegate().getIndex(position)); }
public void valueChanged(ListSelectionEvent e) { if (e.getValueIsAdjusting()) return; if (getPositionsModel().isContinousRange()) return; handlePositionsUpdate(); } });
public void remove(int[] rowIndices) { getDelegate().remove(mapRows(rowIndices)); }
private void initialize() { final RouteConverter r = RouteConverter.getInstance(); positionsModel = new FilteringPositionsModel<>(r.getConvertPanel().getPositionsModel(), new PointOfInterestPositionPredicate()); tablePointsOfInterest.setModel(getPositionsModel()); PointsOfInterestTableColumnModel tableColumnModel = new PointsOfInterestTableColumnModel(); getPositionsModel().addTableModelListener(new TableModelListener() { public void tableChanged(TableModelEvent e) { if (!isFirstToLastRow(e))
public void fireTableRowsUpdated(int firstIndex, int lastIndex, int columnIndex) { getDelegate().fireTableRowsUpdated(firstIndex, lastIndex, columnIndex); } }
public void itemStateChanged(ItemEvent e) { if (e.getStateChange() != SELECTED) { return; } @SuppressWarnings("unchecked") FilterPredicate<NavigationPosition> filterPredicate = (FilterPredicate) e.getItem(); setFilterPredicatePreference(filterPredicate); filteredPhotosModel.setFilterPredicate(filterPredicate); } });
private void handlePositionsUpdate() { int[] selectedRows = tablePointsOfInterest.getSelectedRows(); boolean existsASelectedPosition = selectedRows.length > 0; RouteConverter r = RouteConverter.getInstance(); ActionManager actionManager = r.getContext().getActionManager(); actionManager.enableLocal("delete", POINTS_OF_INTEREST, existsASelectedPosition); actionManager.enable("play-voice", existsASelectedPosition); actionManager.enable("add-audio", existsASelectedPosition); if (r.isPointsOfInterestPanelSelected()) r.selectPositionsInMap(getPositionsModel().mapRows(selectedRows)); }
filteredPhotosModel = new FilteringPositionsModel<>(photosModel, getFilterPredicatePreference()); tablePhotos.setModel(filteredPhotosModel); PhotosTableColumnModel tableColumnModel = new PhotosTableColumnModel();
public BaseRoute getRoute() { return getDelegate().getRoute(); }
public void edit(int rowIndex, PositionColumnValues columnToValues, boolean fireEvent, boolean trackUndo) { getDelegate().edit(mapRow(rowIndex), columnToValues, fireEvent, trackUndo); }
public void setRoute(BaseRoute route) { getDelegate().setRoute(route); }
public void tableChanged(TableModelEvent e) { if (!isFirstToLastRow(e)) return; if (getPositionsModel().isContinousRange()) return; handlePositionsUpdate(); } });
public void stateChanged(ChangeEvent e) { getPositionsModel().fireTableRowsUpdated(0, MAX_VALUE, ALL_COLUMNS); } });
public NavigationPosition getPosition(int rowIndex) { return getDelegate().getPosition(mapRow(rowIndex)); }
public boolean isContinousRange() { return getDelegate().isContinousRange(); }