Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.util
Class OpenStrategy


java.lang.Object
  extended by 
org.eclipse.jface.util.OpenStrategy

public class OpenStrategy
extends Object

Implementation of single-click and double-click strategies.

Usage:

        OpenStrategy handler = new OpenStrategy(control);
        handler.addOpenListener(new IOpenEventListener() {
                public void handleOpen(SelectionEvent e) {
                        ... // code to handle the open event.
                }
        });
 


Field Summary
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 Summary
OpenStrategy ( Control control)
           
 
Method Summary
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.
 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.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOUBLE_CLICK

public static final int DOUBLE_CLICK
Default behavior. Double click to open the item.

See Also:
Constant Field Values

SINGLE_CLICK

public static final int SINGLE_CLICK
Single click will open the item.

See Also:
Constant Field Values

SELECT_ON_HOVER

public static final int SELECT_ON_HOVER
Hover will select the item.

See Also:
Constant Field Values

ARROW_KEYS_OPEN

public static final int ARROW_KEYS_OPEN
Open item when using arrow keys

See Also:
Constant Field Values

NO_TIMER

public static final int NO_TIMER
Deprecated. 
A single click will generate an open event but key arrows will not do anything.

See Also:
Constant Field Values

FILE_EXPLORER

public static final int FILE_EXPLORER
Deprecated. 
A single click will generate an open event and key arrows will generate an open event after a small time.

See Also:
Constant Field Values

ACTIVE_DESKTOP

public static final int ACTIVE_DESKTOP
Deprecated. 
Pointing to an item will change the selection and a single click will gererate an open event

See Also:
Constant Field Values
Constructor Detail

OpenStrategy

public OpenStrategy(
Control control)
Parameters:
control - the control the strategy is applied to
Method Detail

addOpenListener

public void addOpenListener(
IOpenEventListener listener)
Adds an IOpenEventListener to the collection of openEventListeners

Parameters:
listener - the listener to add

removeOpenListener

public void removeOpenListener(
IOpenEventListener listener)
Removes an IOpenEventListener to the collection of openEventListeners

Parameters:
listener - the listener to remove

addSelectionListener

public void addSelectionListener(
SelectionListener listener)
Adds an SelectionListener to the collection of selectionEventListeners

Parameters:
listener - the listener to add

removeSelectionListener

public void removeSelectionListener(
SelectionListener listener)
Removes an SelectionListener to the collection of selectionEventListeners

Parameters:
listener - the listener to remove

addPostSelectionListener

public void addPostSelectionListener(
SelectionListener listener)
Adds an SelectionListener to the collection of selectionEventListeners

Parameters:
listener - the listener to add

removePostSelectionListener

public void removePostSelectionListener(
SelectionListener listener)
Removes an SelectionListener to the collection of selectionEventListeners

Parameters:
listener - the listener to remove

getOpenMethod

public static int getOpenMethod()
This method is internal to the framework; it should not be implemented outside the framework.

Returns:
the current used single/double-click method

setOpenMethod

public static void setOpenMethod(int method)
Set the current used single/double-click method. This method is internal to the framework; it should not be implemented outside the framework.

Parameters:
method - the method to be used
See Also:
DOUBLE_CLICK, SINGLE_CLICK, SELECT_ON_HOVER, ARROW_KEYS_OPEN

activateOnOpen

public static boolean activateOnOpen()
Returns:
true if editors should be activated when opened.

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire