1. /*
  2. * @(#)SynthConstants.java 1.7 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.swing.plaf.synth;
  8. import javax.swing.*;
  9. /**
  10. * Constants used by Synth. Not all Components support all states. A
  11. * Component will at least be in one of the primary states. That is, the
  12. * return value from <code>SynthContext.getComponentState()</code> will at
  13. * least be one of <code>ENABLED</code>, <code>MOUSE_OVER</code>,
  14. * <code>PRESSED</code> or <code>DISABLED</code>, and may also contain
  15. * <code>FOCUSED</code>, <code>SELECTED</code> or <code>DEFAULT</code>.
  16. *
  17. * @version 1.7, 12/19/03
  18. * @since 1.5
  19. */
  20. public interface SynthConstants {
  21. /**
  22. * Primary state indicating the component is enabled.
  23. */
  24. public static final int ENABLED = 1 << 0;
  25. /**
  26. * Primary state indicating the mouse is over the region.
  27. */
  28. public static final int MOUSE_OVER = 1 << 1;
  29. /**
  30. * Primary state indicating the region is in a pressed state. Pressed
  31. * does not necessarily mean the user has pressed the mouse button.
  32. */
  33. public static final int PRESSED = 1 << 2;
  34. /**
  35. * Primary state indicating the region is not enabled.
  36. */
  37. public static final int DISABLED = 1 << 3;
  38. /**
  39. * Indicates the region has focus.
  40. */
  41. public static final int FOCUSED = 1 << 8;
  42. /**
  43. * Indicates the region is selected.
  44. */
  45. public static final int SELECTED = 1 << 9;
  46. /**
  47. * Indicates the region is the default. This is typically used for buttons
  48. * to indicate this button is somehow special.
  49. */
  50. public static final int DEFAULT = 1 << 10;
  51. }