This was new for me too. Allways though this isX was the convention.
Never too old to learn I guess ;)
Eelco
Jonathan Locke wrote:
that's simply not true. although swing is a bit inconsistent, like
most frameworks, swing uses isX only when it makes sense in english.
we had discussions about this at javasoft and its the reason that both
isX and getX are supported in java beans. the idea is that you can
use isX when it makes sense in terms of the name. otherwise you use
getX.
for example, in JComponent.java, we have:
public boolean getVerifyInputWhenFocusTarget() {
return verifyInputWhenFocusTarget;
}
which wouldn't make sense as "isVerifyInputWhenFocusTarget" because
that doesn't make sense in english.
there are a ton of other examples in swing (and probably most other
toolkits):
JList.getScrollableTracksViewportWidth()
JList.getScrollableTracksViewportHeight()
JOptionPane.getWantsInput()
JSlider.getPaintTicks()
...
Johan Compagner wrote:
i am personnaly not a big fan to use getX() for a boolean
All other frameworks (like swing) use isX for booleans this is very
commonly used.
I don't care that much to vote against it but i just want to say this..
johan
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop