01: /*******************************************************************************
02: * Copyright (c) 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: ******************************************************************************/package org.eclipse.ui.internal;
11:
12: /**
13: * Static class to contain the preferences used to manage the GUI during
14: * trim dragging.
15: * <p><b>
16: * NOTE: this is a test harness at this time. This class may be removed
17: * before the release of 3.2.
18: * </b></p>
19: *
20: * @since 3.2
21: *
22: */
23: public class TrimDragPreferences {
24:
25: /**
26: * How close to a caret the cursor has to be to be 'valid'
27: */
28:
29: private static int thresholdPref = 50;
30:
31: /**
32: * 'true' means that each trim element can have a different 'height'
33: */
34: private static boolean raggedTrim = true;
35:
36: /*
37: * Accessor Methods
38: */
39: /**
40: * @return Returns the threshold.
41: */
42: public static int getThreshold() {
43: return thresholdPref;
44: }
45:
46: /**
47: * @param threshold The threshold to set.
48: */
49: public static void setThreshold(int threshold) {
50: thresholdPref = threshold;
51: }
52:
53: /**
54: * @return Returns the raggedTrim.
55: */
56: public static boolean showRaggedTrim() {
57: return raggedTrim;
58: }
59:
60: /**
61: * @param raggedTrim The raggedTrim to set.
62: */
63: public static void setRaggedTrim(boolean raggedTrim) {
64: TrimDragPreferences.raggedTrim = raggedTrim;
65: }
66: }
|