java-gnome version 4.0.7

org.freedesktop.bindings
Class Flag

java.lang.Object
  extended by org.freedesktop.bindings.Constant
      extended by org.freedesktop.bindings.Flag
Direct Known Subclasses:
CalendarDisplayOptions, CellRendererState, Content, CursorType, EventMask, FileFilterFlags, FontMask, GCValuesMask, ModifierType, PrintCapabilities, RecentFilterFlags, TreeModelFlags, WidgetFlags, WindowState

public abstract class Flag
extends Constant

Representation of an enum that is used to bit-pack option flags. A flag is a Constant that can be bitwise OR'd with another flag of the same type

Since:
4.0.3
Author:
Vreixo Formoso, Andrew Cowie

Method Summary
 boolean contains(Flag setting)
          Utility function to determine whether a Flags instance has the bit embodied by setting set.
 
Methods inherited from class org.freedesktop.bindings.Constant
toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

contains

public final boolean contains(Flag setting)
Utility function to determine whether a Flags instance has the bit embodied by setting set. An example of this in action is:
 WindowState s;
 ...
     
 if (s.contains(WindowState.STICKY)) {
     // get a cloth to clean up the mess
 }
 
You can only use this on instances of the same class!



java-gnome