public class OpenStrategy extends Object
Usage:
OpenStrategy handler = new OpenStrategy(control); handler.addOpenListener(new IOpenEventListener() { public void handleOpen(SelectionEvent e) { ... // code to handle the open event. } });
Modifier and Type | Field and Description |
---|---|
static int |
ACTIVE_DESKTOP
Deprecated.
|
static int |
ARROW_KEYS_OPEN
Open item when using arrow keys
|
static int |
DOUBLE_CLICK
Default behavior.
|
static int |
FILE_EXPLORER
Deprecated.
|
static int |
NO_TIMER
Deprecated.
|
static int |
SELECT_ON_HOVER
Hover will select the item.
|
static int |
SINGLE_CLICK
Single click will open the item.
|
Constructor and Description |
---|
OpenStrategy(Control control) |
Modifier and Type | Method and Description |
---|---|
static boolean |
activateOnOpen() |
void |
addOpenListener(IOpenEventListener listener)
Adds an IOpenEventListener to the collection of openEventListeners
|
void |
addPostSelectionListener(SelectionListener listener)
Adds an SelectionListener to the collection of selectionEventListeners
|
void |
addSelectionListener(SelectionListener listener)
Adds an SelectionListener to the collection of selectionEventListeners
|
static int |
getOpenMethod()
This method is internal to the framework; it should not be implemented outside
the framework.
|
static int |
getPostSelectionDelay()
Returns the delay for post selection events.
|
void |
removeOpenListener(IOpenEventListener listener)
Removes an IOpenEventListener to the collection of openEventListeners
|
void |
removePostSelectionListener(SelectionListener listener)
Removes an SelectionListener to the collection of selectionEventListeners
|
void |
removeSelectionListener(SelectionListener listener)
Removes an SelectionListener to the collection of selectionEventListeners
|
static void |
setOpenMethod(int method)
Set the current used single/double-click method.
|
public static final int DOUBLE_CLICK
public static final int SINGLE_CLICK
public static final int SELECT_ON_HOVER
public static final int ARROW_KEYS_OPEN
@Deprecated public static final int NO_TIMER
@Deprecated public static final int FILE_EXPLORER
@Deprecated public static final int ACTIVE_DESKTOP
public OpenStrategy(Control control)
control
- the control the strategy is applied topublic static final int getPostSelectionDelay()
public void addOpenListener(IOpenEventListener listener)
listener
- the listener to addpublic void removeOpenListener(IOpenEventListener listener)
listener
- the listener to removepublic void addSelectionListener(SelectionListener listener)
listener
- the listener to addpublic void removeSelectionListener(SelectionListener listener)
listener
- the listener to removepublic void addPostSelectionListener(SelectionListener listener)
listener
- the listener to addpublic void removePostSelectionListener(SelectionListener listener)
listener
- the listener to removepublic static int getOpenMethod()
public static void setOpenMethod(int method)
method
- the method to be usedDOUBLE_CLICK
,
SINGLE_CLICK
,
SELECT_ON_HOVER
,
ARROW_KEYS_OPEN
public static boolean activateOnOpen()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.