View Javadoc

1   package fr.ove.openmath.jome.ctrlview.bidim;
2   
3   import java.awt.Dimension;
4   
5   /***
6   * Interface that must implement all objects that want to be sized.
7   *
8   * @author © 1999 DIRAT Laurent
9   * @version 2.0 29/06/1999
10  */
11  public interface Sizable {
12      /***
13      * Returns the width of the instance.
14      */
15      public int getWidth();
16      
17      /***
18      * Sets the width of the instance.
19      * @param width the width of the instance
20      */
21      public void setWidth(int width);
22      
23      /***
24      * Returns the height of the instance.
25      */
26      public int getHeight();
27      
28      /***
29      * Sets the height of the instance.
30      * @param height the height of the instance
31      */
32      public void setHeight(int height);
33      
34      /***
35      * Returns the size of the instance.
36      */
37      public Dimension getSize();
38      
39      /***
40      * Sets the size of the instance.
41      * @param width the width of the instance.
42      * @param height the height of the instance
43      */
44      public void setSize(int width, int height);
45      
46      /***
47      * Sets the size of the instance.
48      * @param size the size of the instance.
49      */
50      public void setSize(Dimension size);
51      
52      /***
53      * Returns the preferred size of the instance.
54      */
55      public Dimension getPreferredSize();
56  }