private void constrain() { BigInteger offset = new BigInteger(Integer.toString(addressSize * (numUsableRows))); BigInteger endVal = startVal.add(offset); if (endVal.compareTo(scrollBar.getMaximumHP()) > 0) { startVal = scrollBar.getMaximumHP().subtract(offset); endVal = scrollBar.getMaximumHP(); scrollBar.setValueHP(startVal); model.fireTableDataChanged(); } }
/** Makes the given address visible somewhere in the window */ public void makeVisible(Address addr) { BigInteger bi = addressToBigInt(addr); scrollBar.setValueHP(bi); }