?? swt.java
字號:
/******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/package org.eclipse.swt;import org.eclipse.swt.internal.*;/** * This class provides access to a small number of SWT system-wide * methods, and in addition defines the public constants provided * by SWT. * <p> * By defining constants like UP and DOWN in a single class, SWT * can share common names and concepts at the same time minimizing * the number of classes, names and constants for the application * programmer. * </p><p> * Note that some of the constants provided by this class represent * optional, appearance related aspects of widgets which are available * either only on some window systems, or for a differing set of * widgets on each window system. These constants are marked * as <em>HINT</em>s. The set of widgets which support a particular * <em>HINT</em> may change from release to release, although we typically * will not withdraw support for a <em>HINT</em> once it is made available. * </p> */ /* NOTE: * Good javadoc coding style is to put the values of static final * constants in the comments. This reinforces the fact that * consumers are allowed to rely on the value (and they must * since the values are compiled inline in their code). We * can <em>not</em> change the values of these constants between * releases. */public class SWT { /* Initialize the class */// static {// /* NOTE: the static initialization is at the end of file */// } /* Widget Event Constants */ /** * The null event type (value is 0). * * @since 3.0 */ public static final int None = 0; /** * The key down event type (value is 1). */ public static final int KeyDown = 1; /** * The key up event type (value is 2). */ public static final int KeyUp = 2; /** * mouse down event type (value is 3) */ public static final int MouseDown = 3; /** * The mouse up event type (value is 4). */ public static final int MouseUp = 4; /** * The mouse move event type (value is 5). */ public static final int MouseMove = 5; /** * The mouse enter event type (value is 6). */ public static final int MouseEnter = 6; /** * The mouse exit event type (value is 7). */ public static final int MouseExit = 7; /** * The mouse double click event type (value is 8). */ public static final int MouseDoubleClick = 8; /** * The paint event type (value is 9). */ public static final int Paint = 9; /** * The move event type (value is 10). */ public static final int Move = 10; /** * The resize event type (value is 11). */ public static final int Resize = 11; /** * The dispose event type (value is 12). */ public static final int Dispose = 12; /** * The selection event type (value is 13). */ public static final int Selection = 13; /** * The default selection event type (value is 14). */ public static final int DefaultSelection = 14; /** * The focus in event type (value is 15). */ public static final int FocusIn = 15; /** * The focus out event type (value is 16). */ public static final int FocusOut = 16; /** * The expand event type (value is 17). */ public static final int Expand = 17; /** * The collapse event type (value is 18). */ public static final int Collapse = 18; /** * The iconify event type (value is 19). */ public static final int Iconify = 19; /** * The de-iconify event type (value is 20). */ public static final int Deiconify = 20; /** * The close event type (value is 21). */ public static final int Close = 21; /** * The show event type (value is 22). */ public static final int Show = 22; /** * The hide event type (value is 23). */ public static final int Hide = 23; /** * The modify event type (value is 24). */ public static final int Modify = 24; /** * The verify event type (value is 25). */ public static final int Verify = 25; /** * The activate event type (value is 26). */ public static final int Activate = 26; /** * The deactivate event type (value is 27). */ public static final int Deactivate = 27; /** * The help event type (value is 28). */ public static final int Help = 28; /** * The drag detect event type (value is 29). */ public static final int DragDetect = 29; /** * The arm event type (value is 30). */ public static final int Arm = 30; /** * The traverse event type (value is 31). */ public static final int Traverse = 31; /** * The mouse hover event type (value is 32). */ public static final int MouseHover = 32; /** */ public static final int HardKeyDown = 33; /** * The hardware key up event type (value is 34). */ public static final int HardKeyUp = 34; /** * The menu detect event type (value is 35). * * @since 3.0 */ public static final int MenuDetect = 35; /** * The set data event type (value is 36). * * @since 3.0 */ public static final int SetData = 36; /* Event Details */ /** * A constant known to be zero (0), used in operations which * take bit flags to indicate that "no bits are set". */ public static final int NONE = 0; /** * Indicates that a user-interface component is being dragged, * for example dragging the thumb of a scroll bar (value is 1). */ public static final int DRAG = 1; /** * A constant known to be zero (0), used in operations which * take pointers to indicate a null argument. */ public static final int NULL = 0; /** * Indicates that a default should be used (value is -1). */ public static final int DEFAULT = -1; /** * Style constant for menu bar behavior (value is 1<<1). * <p><b>Used By:</b><ul> * <li><code>Menu</code></li> * </ul></p> */ public static final int BAR = 1 << 1; /** * Style constant for drop down menu/list behavior (value is 1<<2). * <p><b>Used By:</b><ul> * <li><code>Menu</code></li> * <li><code>ToolItem</code></li> * <li><code>CoolItem</code></li> * <li><code>Combo</code></li> * </ul></p> */ public static final int DROP_DOWN = 1 << 2; /** * Style constant for pop up menu behavior (value is 1<<3). * <p><b>Used By:</b><ul> * <li><code>Menu</code></li> * </ul></p> */ public static final int POP_UP = 1 << 3; /** * Style constant for line separator behavior (value is 1<<1). * <p><b>Used By:</b><ul> * <li><code>MenuItem</code></li> * <li><code>ToolItem</code></li> * </ul></p> */ public static final int SEPARATOR = 1 << 1; /** * Style constant for toggle button behavior (value is 1<<1). * <p><b>Used By:</b><ul> * <li><code>Button</code></li> * </ul></p> */ public static final int TOGGLE = 1 << 1; /** * Style constant for arrow button behavior (value is 1<<2). * <p><b>Used By:</b><ul> * <li><code>Button</code></li> * </ul></p> */ public static final int ARROW = 1 << 2; /** * Style constant for push button behavior (value is 1<<3). * <p><b>Used By:</b><ul> * <li><code>Button</code></li> * <li><code>MenuItem</code></li> * <li><code>ToolItem</code></li> * </ul></p> */ public static final int PUSH = 1 << 3; /** * Style constant for radio button behavior (value is 1<<4). * <p><b>Used By:</b><ul> * <li><code>Button</code></li> * <li><code>MenuItem</code></li> * <li><code>ToolItem</code></li> * </ul></p> */ public static final int RADIO = 1 << 4; /** * Style constant for check box behavior (value is 1<<5). * <p><b>Used By:</b><ul> * <li><code>Button</code></li> * <li><code>MenuItem</code></li> * <li><code>ToolItem</code></li> * <li><code>Table</code></li> * <li><code>Tree</code></li> * </ul></p> */ public static final int CHECK = 1 << 5; /** * Style constant for cascade behavior (value is 1<<6). * <p><b>Used By:</b><ul> * <li><code>MenuItem</code></li> * </ul></p> */ public static final int CASCADE = 1 << 6; /** * Style constant for multi-selection behavior in lists * and multiple line support on text fields (value is 1<<1). * <p><b>Used By:</b><ul> * <li><code>Text</code></li> * <li><code>List</code></li> * <li><code>FileDialog</code></li> * </ul></p> */ public static final int MULTI = 1 << 1; /** * Style constant for single selection behavior in lists * and single line support on text fields (value is 1<<2). * <p><b>Used By:</b><ul> * <li><code>Text</code></li> * <li><code>List</code></li> * <li><code>Table</code></li> * <li><code>Tree</code></li> * </ul></p> */ public static final int SINGLE = 1 << 2; /** * Style constant for read-only behavior (value is 1<<3). * <p><b>Used By:</b><ul> * <li><code>Combo</code></li> * <li><code>Text</code></li> * </ul></p> */ public static final int READ_ONLY = 1 << 3; /** * Style constant for automatic line wrap behavior (value is 1<<6). * <p><b>Used By:</b><ul> * <li><code>Label</code></li> * <li><code>Text</code></li> * <li><code>ToolBar</code></li> * </ul></p> */ public static final int WRAP = 1 << 6; /** * Style constant for simple (not drop down) behavior (value is 1<<6). * <p><b>Used By:</b><ul> * <li><code>Combo</code></li> * </ul></p> */ public static final int SIMPLE = 1 << 6; /** * Style constant for password behavior (value is 1<<22). * <p><b>Used By:</b><ul> * <li><code>Text</code></li> * </ul></p> * * @since 3.0 */ public static final int PASSWORD = 1 << 22; /** * Style constant for shadow in behavior (value is 1<<2). * <br>Note that this is a <em>HINT</em>. * <p><b>Used By:</b><ul> * <li><code>Label</code></li> * <li><code>Group</code></li> * </ul></p> */ public static final int SHADOW_IN = 1 << 2; /** * Style constant for shadow out behavior (value is 1<<3). * <br>Note that this is a <em>HINT</em>. * <p><b>Used By:</b><ul> * <li><code>Label</code></li> * <li><code>Group</code></li> * <li><code>ToolBar</code></li> * </ul></p> */ public static final int SHADOW_OUT = 1 << 3; /** * Style constant for shadow etched in behavior (value is 1<<4). * <br>Note that this is a <em>HINT</em>. It is ignored on all platforms except Motif. * <p><b>Used By:</b><ul> * <li><code>Group</code></li> * </ul></p> */ public static final int SHADOW_ETCHED_IN = 1 << 4; /** * Style constant for shadow etched out behavior (value is 1<<6). * <br>Note that this is a <em>HINT</em>. It is ignored on all platforms except Motif. * <p><b>Used By:</b><ul> * <li><code>Group</code></li> * </ul></p> */ public static final int SHADOW_ETCHED_OUT = 1 << 6; /** * Style constant for no shadow behavior (value is 1<<5). * <br>Note that this is a <em>HINT</em>. * <p><b>Used By:</b><ul> * <li><code>Label</code></li> * <li><code>Group</code></li> * </ul></p> */ public static final int SHADOW_NONE = 1 << 5; /** * Style constant for progress bar behavior (value is 1<<1). * <p><b>Used By:</b><ul> * <li><code>ProgressBar</code></li> * </ul></p> */ public static final int INDETERMINATE = 1 << 1; /** * Style constant for tool window behavior (value is 1<<2). * <p> * A tool window is a window intended to be used as a floating toolbar. * It typically has a title bar that is shorter than a normal title bar, * and the window title is typically drawn using a smaller font. * <br>Note that this is a <em>HINT</em>. * </p><p><b>Used By:</b><ul> * <li><code>Decorations</code> and subclasses</li> * </ul></p> */ public static final int TOOL = 1 << 2;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -