View Javadoc

1   package fr.ove.openmath.jome.ctrlview.bidim;
2   
3   import fr.ove.openmath.jome.ctrlview.bidim.*;
4   import fr.ove.openmath.jome.model.*;
5   
6   /***
7   * A layout manager for a binary infix operator which symbol can be rendered as an image (e.g. the in operator which
8   * rendered as a kind of big E, which will be an image)
9   *
10  * @author © 1999 DIRAT Laurent
11  * @version 2.0  14/12/1999
12  */
13  public class ImageBinaryInfixOperatorLayout extends BinaryInfixOperatorLayout {    
14      /***
15      * The symbol we have to insert between each component if necessary.
16      */
17      private ImageSymbol symbolOperator = null;
18      
19      /***
20      * Returns the display of the operator
21      */
22      public Display createOperatorDisplay() {
23          if (symbolOperator == null) {
24              Operator fts = (Operator) displayToLay.getListener();
25              //symbolOperator = new ImageSymbol(fts.getTheOperator(), displayToLay);
26              symbolOperator = new ImageSymbol(fts.getResourceIdentifier(), displayToLay);
27          }
28          
29          // On crÈÈ un display pour l'opÈrateur.
30          SymbolDisplay operatorDisplay = new SymbolDisplay(displayToLay.getGraphicContext(), symbolOperator);
31          operatorDisplay.setIsSymbolOperatorDisplay(true);
32          
33          return operatorDisplay;
34      }
35  }