samedi 28 février 2015

When to use JViewport.getExtentSize() vs. JViewport.getSize()?



Looking at the source, it seems that JViewport.getExtentSize() always returns the same value as JViewport.getSize() (The same holds for setExtentSize() and setSize()). Why do both exist? Is it just an alias to make it clearer in code that you are getting the size (visible extent) of the viewport.view? Is there something else happening in the UI delegates and/or something related to plaf that I'm missing? Or, does getExtentSize() exist purely for symmetry with setExtentSize(), and the latter exists to provide different notification than setSize() (I note ChangeListeners are notified when setExtentSize() is called)?




Aucun commentaire:

Enregistrer un commentaire