View Javadoc

1   package fr.ove.openmath.jome.ctrlview.bidim;
2   
3   import java.awt.*;
4   import fr.ove.openmath.jome.ctrlview.bidim.DisplayLayout;
5   import fr.ove.openmath.jome.ctrlview.bidim.Display;
6   import fr.ove.openmath.jome.ctrlview.bidim.StringDisplay;
7   import fr.ove.openmath.jome.ctrlview.bidim.selection.events.SelectionEvent;
8   
9   /***
10  * A layout manager that lays strings.
11  *
12  * @author © 1998 DIRAT Laurent
13  * @version 1.0  23/06/98
14  */
15  public class StringLayout extends AbstractStringLayout {
16      /***
17      * Returns <CODE>true</CODE> if during the selection, the display which is located
18      * to the left of the display that lays the instance, must be selected too.
19      * <CODE>false</CODE> otherwise.
20      */
21      public boolean selectLeftDisplay() {
22          if (displayToLay.isSelected() && displayToLay.isSymbolOperatorDisplay())
23              return true;
24          else
25              return false;
26      }
27      
28      /***
29      * Returns <CODE>true</CODE> if during the selection, the display which is located
30      * to the right of the display that lays the instance, must be selected too.
31      * <CODE>false</CODE> otherwise.
32      */
33      public boolean selectRightDisplay() {
34          if (displayToLay.isSelected() && displayToLay.isSymbolOperatorDisplay())
35              return true;
36          else
37              return false;
38      }
39  
40      /***
41      * Checks the validity of the selection.
42      */
43      public void validateSelection() {
44      }
45      
46      /***
47      * Checks the validity of the deselection.
48      * @param display the display to deselect.
49      */
50      public void validateDeselection(Display display) {
51      }
52  }