KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > TrimDragPreferences


1 /*******************************************************************************
2  * Copyright (c) 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  ******************************************************************************/

11
12 package org.eclipse.ui.internal;
13
14 /**
15  * Static class to contain the preferences used to manage the GUI during
16  * trim dragging.
17  * <p><b>
18  * NOTE: this is a test harness at this time. This class may be removed
19  * before the release of 3.2.
20  * </b></p>
21  *
22  * @since 3.2
23  *
24  */

25 public class TrimDragPreferences {
26
27     /**
28      * How close to a caret the cursor has to be to be 'valid'
29      */

30
31     private static int thresholdPref = 50;
32     
33     /**
34      * 'true' means that each trim element can have a different 'height'
35      */

36     private static boolean raggedTrim = true;
37
38     /*
39      * Accessor Methods
40      */

41     /**
42      * @return Returns the threshold.
43      */

44     public static int getThreshold() {
45         return thresholdPref;
46     }
47
48     /**
49      * @param threshold The threshold to set.
50      */

51     public static void setThreshold(int threshold) {
52         thresholdPref = threshold;
53     }
54
55     /**
56      * @return Returns the raggedTrim.
57      */

58     public static boolean showRaggedTrim() {
59         return raggedTrim;
60     }
61
62     /**
63      * @param raggedTrim The raggedTrim to set.
64      */

65     public static void setRaggedTrim(boolean raggedTrim) {
66         TrimDragPreferences.raggedTrim = raggedTrim;
67     }
68 }
69
Popular Tags