java - operator | for int value -
I think it's original in Java, but sorry, I ask stackoverflow.
I give an example in Eclipse RCP. For example, if I want to create an example of text (SDT text), I will do the following:
text text = new text (Overall, SWT.BORDER | SWT.MULTI); In the second parameter text, this is an int style, and I will be borderline text and can be a multi line, so I add SWT.BORDER. SWT.MULTI (operator will be used)
The question now, for example, I already have a variable int style with the GetStyle () method in the text class. But I want to see if SWT.MULTI is already set or not, how can I archive it? Thanks
bool multiIsSet = (x and SWT.MULTI) == SWT.Multi
Comments
Post a Comment