void postReadSettings(Properties p, int index, String propertyPrefix) { TableModel model = getModel(); if (model.getRowCount() > 0 && getModelIndex () > 0) { String myPrefix = propertyPrefix + PROP_PREFIX + Integer.toString(index) + "-"; String shortDescription = p.getProperty(myPrefix + PROP_SHORT_DESCRIPTION, null); if (shortDescription != null) { rowModel.setShortDescription(getModelIndex () - 1, shortDescription); } } }
@Override public void writeSettings(Properties p, int index, String propertyPrefix) { super.writeSettings(p, index, propertyPrefix); TableModel model = getModel(); if (model.getRowCount() > 0 && getModelIndex () > 0) { String shortDescription = rowModel.getShortDescription(getModelIndex () - 1); String myPrefix = propertyPrefix + PROP_PREFIX + Integer.toString(index) + "-"; p.setProperty(myPrefix + PROP_SHORT_DESCRIPTION, shortDescription); } }
public String getRawColumnName () { TableModel model = getModel(); if (model.getRowCount() <= 0) { return null; } if (getModelIndex () == 0) { return null; } return rowModel.getRawColumnName (getModelIndex () - 1); }
public String getShortDescription (String defaultValue) { TableModel model = getModel(); if (model.getRowCount() <= 0) { return null; } if (getModelIndex () == 0) { // 1st column if (nodesColumnDescription != null) { return nodesColumnDescription; } return defaultValue; } return rowModel.getShortDescription (getModelIndex () - 1); }
void setTreePositionX(int treePositionX) { if (treePositionX == this.treePositionX) { return ; } this.treePositionX = treePositionX; tableChanged(new TableModelEvent(getModel(), 0, getRowCount(), 0));// convertColumnIndexToView(0))); }