public void update(ObservableElementState o, Object arg) { if (arg instanceof Short) { short newValue = ((Short) arg).shortValue(); // the value from the slider! short magnitude = (short) (newValue - getScaledValue()); InterestModel.expressInterest(term, magnitude); // InterestModel.setTermInterest(term,newValue); } }
public short getScaledValue() { return InterestModel.getInterestExpressedInXTerm(term); }