I'm examining some SWT code and I'm having trouble understanding how the SWT constants work and particularly, how their bitwose OR works.
For example:
final Table leftTable = new Table(parent, SWT.MULTI | SWT.FULL_SELECTION);
I looked up SWT.MULTI
in the API and found that its value is 1<<1
. What does this mean? I did the same for SWT.FULL_SELECTION
and found its value to be 13
(more understandable).
What does it mean to bitwise OR these? Is there a quick way to determine what the result is? Why is it done this way?