1 package fr.ove.openmath.jome.ctrlview.bidim;
2
3 import java.awt.*;
4 import fr.ove.openmath.jome.ctrlview.bidim.*;
5 import fr.ove.openmath.jome.model.*;
6
7 /***
8 * Layout manager that lays the display of the operator whose symbol is located over its operand.<BR>
9 * The symbol is represented as a simple string
10 *
11 * @author © 1999 DIRAT Laurent
12 * @version 2.0 15/12/1999
13 */
14 public class ImageOverOperatorLayout extends OverOperatorLayout {
15 /***
16 * The symbol we have to insert between each component if necessary.
17 */
18 private ImageSymbol symbolOperator = null;
19
20 /***
21 * Returns the display of the operator
22 */
23 public Display createOperatorDisplay() {
24 if (symbolOperator == null) {
25 Operator fts = (Operator) displayToLay.getListener();
26
27 symbolOperator = new ImageSymbol(fts.getResourceIdentifier(), displayToLay);
28 }
29
30
31 SymbolDisplay operatorDisplay = new SymbolDisplay(displayToLay.getGraphicContext(), symbolOperator);
32 operatorDisplay.setIsSymbolOperatorDisplay(true);
33
34 return operatorDisplay;
35 }
36 }