Search in sources :

Example 1 with SortPreference

use of org.vcell.util.gui.sorttable.SortPreference in project vcell by virtualcell.

the class BioModelEditorModelPanel method setBioModel.

public void setBioModel(BioModel newValue) {
    BioModel oldValue = bioModel;
    bioModel = newValue;
    firePropertyChange(PROPERTY_NAME_BIO_MODEL, oldValue, newValue);
    if (oldValue != null && oldValue.getModel() != null) {
        oldValue.getModel().removePropertyChangeListener(eventHandler);
    }
    if (bioModel != null && bioModel.getModel() != null) {
        bioModel.getModel().addPropertyChangeListener(eventHandler);
    }
    SortPreference sp = new SortPreference(true, BioModelEditorReactionTableModel.COLUMN_NAME);
    reactionTableModel.setSortPreference(sp);
}
Also used : BioModel(cbit.vcell.biomodel.BioModel) SortPreference(org.vcell.util.gui.sorttable.SortPreference)

Example 2 with SortPreference

use of org.vcell.util.gui.sorttable.SortPreference in project vcell by virtualcell.

the class VCellSortTableModel method setSortPreference.

/**
 * Sets the sortPreference property (cbit.vcell.messaging.admin.sorttable.SortPreference) value.
 * @param sortPreference The new value for the property.
 * @see #getSortPreference
 */
public void setSortPreference(SortPreference sortPreference) {
    if (fieldSortPreference == sortPreference || fieldSortPreference.equals(sortPreference)) {
        return;
    }
    SortPreference oldValue = fieldSortPreference;
    fieldSortPreference = sortPreference;
    resortColumn();
    currentPageIndex = 0;
    updateVisibleRows();
    firePropertyChange(PROPERTY_NAME_SORT_PREFERENCE, oldValue, sortPreference);
}
Also used : SortPreference(org.vcell.util.gui.sorttable.SortPreference)

Aggregations

SortPreference (org.vcell.util.gui.sorttable.SortPreference)2 BioModel (cbit.vcell.biomodel.BioModel)1