]> gitweb.fperrin.net Git - Dictionary.git/blob - jars/icu4j-4_2_1-src/src/com/ibm/richtext/awtui/MTabRulerComponent.java
icu4jsrc
[Dictionary.git] / jars / icu4j-4_2_1-src / src / com / ibm / richtext / awtui / MTabRulerComponent.java
1 /*\r
2  * (C) Copyright IBM Corp. 1998-2004.  All Rights Reserved.\r
3  *\r
4  * The program is provided "as is" without any warranty express or\r
5  * implied, including the warranty of non-infringement and the implied\r
6  * warranties of merchantibility and fitness for a particular purpose.\r
7  * IBM will not be liable for any damages suffered by you as a result\r
8  * of using the Program. In no event will IBM be liable for any\r
9  * special, indirect or consequential damages or lost profits even if\r
10  * IBM has been advised of the possibility of their occurrence. IBM\r
11  * will not be liable for any third party claims against you.\r
12  */\r
13 package com.ibm.richtext.awtui;\r
14 \r
15 import java.awt.Color;\r
16 import com.ibm.richtext.styledtext.MTabRuler;\r
17 import com.ibm.richtext.textpanel.MTextPanel;\r
18 \r
19 /**\r
20  * MTabRulerComponent is implemented by components which provide a tab-ruler\r
21  * interface for interacting with an MTextPanel.\r
22  * <p>\r
23  * Users interact with MTabRulerComponent implementations as follows:\r
24  * <ul>\r
25  * <li>The leading margin can be set by dragging the bottom half\r
26  * of the leftmost triangle.  The first-line indent will "stick" with\r
27  * the leading margin.</li>\r
28  * <li>The first-line indent can be set by dragging the top half of the\r
29  * leftmost triangle.  The first-line indent applies to the first line of\r
30  * a paragraph.</li>\r
31  * <li>The trailing margin can be set by dragging the rightmost triangle.</li>\r
32  * <li>Tabs can be added to the ruler by clicking the mouse on the ruler with the\r
33  * control key pressed.  Four kinds of tabs are provided:  leading, trailing, center,\r
34  * and decimal.  The type of a tab can be changed by double-clicking the tab.</li>\r
35  * <li>Tabs can be repositioned by dragging them with the mouse.</li>\r
36  * </ul>\r
37  * <p>\r
38  * MTabRulerComponent's appearance will reflect the paragraph styles in the\r
39  * first selected paragraph.  Style changes performed with an \r
40  * MTabRulerComponent will apply to all selected paragraphs.\r
41  */\r
42 public interface MTabRulerComponent {\r
43     \r
44     static final String COPYRIGHT =\r
45                 "(C) Copyright IBM Corp. 1998-1999 - All Rights Reserved";\r
46 \r
47     /**\r
48      * Listen to the given MTextPanel and reflect its changes,\r
49      * and update its paragraph styles when TabRuler is\r
50      * manipulated.\r
51      * @param textPanel the MTextPanel to listen to\r
52      */\r
53     public void listenToTextPanel(MTextPanel textPanel);\r
54 \r
55     /**\r
56      * Return the background color of this TabRuler.\r
57      * @return the background color of this TabRuler\r
58      */\r
59     public Color getBackColor();\r
60 \r
61     /**\r
62      * Set the background color of this TabRuler.\r
63      * @param backColor the new background color of this TabRuler\r
64      */\r
65     public void setBackColor(Color backColor);\r
66 \r
67     /**\r
68      * Return the MTabRuler represented by this TabRuler.\r
69      * @return the MTabRuler represented by this TabRuler\r
70      */\r
71     public MTabRuler getRuler();\r
72 \r
73     /**\r
74      * Return the leading margin of this TabRuler.\r
75      * @return the leading margin of this TabRuler\r
76      */\r
77     public int getLeadingMargin();\r
78 \r
79     /**\r
80      * Return the first line indent of this TabRuler.\r
81      * @return the first line indent of this TabRuler\r
82      */\r
83     public int getFirstLineIndent();\r
84 \r
85     /**\r
86      * Return the trailing margin of this TabRuler.\r
87      * @return the trailing margin of this TabRuler\r
88      */\r
89     public int getTrailingMargin();\r
90 }\r