src/java.desktop/unix/classes/sun/awt/X11/XMenuItemPeer.java

Print this page




  58     /*
  59      * Mapping to window
  60      */
  61 
  62     /**
  63      * Rectangle occupied by menu item in container's
  64      * coordinates. Filled by map(...) function from
  65      * XBaseMenuWindow.map()
  66      */
  67     private Rectangle bounds;
  68 
  69     /**
  70      * Point in container's coordinate system used as
  71      * origin by drawText.
  72      */
  73     private Point textOrigin;
  74 
  75     /*
  76      * Size constants
  77      */
  78     private final static int SEPARATOR_WIDTH = 20;
  79     private final static int SEPARATOR_HEIGHT = 5;
  80 
  81     /************************************************
  82      *
  83      * Text Metrics
  84      *
  85      ************************************************/
  86 
  87     /**
  88      * Text metrics are filled in calcTextMetrics function
  89      * and reset in resetTextMetrics function. Text metrics
  90      * contain calculated dimensions of various components of
  91      * menu item.
  92      */
  93     private TextMetrics textMetrics;
  94 
  95     static class TextMetrics implements Cloneable {
  96         /*
  97          * Calculated text size members
  98          */
  99         private Dimension textDimension;




  58     /*
  59      * Mapping to window
  60      */
  61 
  62     /**
  63      * Rectangle occupied by menu item in container's
  64      * coordinates. Filled by map(...) function from
  65      * XBaseMenuWindow.map()
  66      */
  67     private Rectangle bounds;
  68 
  69     /**
  70      * Point in container's coordinate system used as
  71      * origin by drawText.
  72      */
  73     private Point textOrigin;
  74 
  75     /*
  76      * Size constants
  77      */
  78     private static final int SEPARATOR_WIDTH = 20;
  79     private static final int SEPARATOR_HEIGHT = 5;
  80 
  81     /************************************************
  82      *
  83      * Text Metrics
  84      *
  85      ************************************************/
  86 
  87     /**
  88      * Text metrics are filled in calcTextMetrics function
  89      * and reset in resetTextMetrics function. Text metrics
  90      * contain calculated dimensions of various components of
  91      * menu item.
  92      */
  93     private TextMetrics textMetrics;
  94 
  95     static class TextMetrics implements Cloneable {
  96         /*
  97          * Calculated text size members
  98          */
  99         private Dimension textDimension;