Remote Systems
v6.4.1

com.ibm.etools.systems.core.ui.open
Class SystemQuickOpenDialog

java.lang.Object
  extended byDialog
      extended bycom.ibm.etools.systems.core.ui.open.SystemQuickOpenDialog
All Implemented Interfaces:
ISystemQuickOpenPageContainer

public class SystemQuickOpenDialog
extends Dialog
implements ISystemQuickOpenPageContainer

See Also:
Serialized Form

Constructor Summary
SystemQuickOpenDialog(Shell shell, ISelection selection, String pageId)
          The constructor for the quick open dialog.
 
Method Summary
protected  HashMap aboutToStart(boolean enableCancelButton)
          About to start a long running operation tiggered through the dialog.
protected  void cancelPressed()
          Calls the super class method if there are no running operations.
protected  void configureShell(Shell shell)
           
 void create()
           
protected  Control createDialogArea(Composite parent)
          Creates a page area, a progress monitor and a separator.
protected  Control createPageArea(Composite parent)
          Creates the page area.
protected  IProgressMonitor getProgressMonitor()
          Returns the progress monitor.
 IRunnableContext getRunnableContext()
          Returns the context for the search operation.
 ISelection getSelection()
          Returns the selection with which this container was opened.
protected  void handleShellCloseEvent()
          Checks to see if there are any long running operations.
protected  void okPressed()
          Calls performAction.
 boolean okToClose()
          Checks if any operations are running.
protected  boolean performAction()
          Returns whether ok to close.
protected  void restoreEnableState(Control w, HashMap h, String key)
          Restores the enable state of a control.
 void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable)
           
 void setPerformActionEnabled(boolean state)
          Sets the enable state of the perform action button of this container.
protected  void stopped(HashMap state)
          A long running operation triggered through the wizard was stopped either by user input or by normal end.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemQuickOpenDialog

public SystemQuickOpenDialog(Shell shell,
                             ISelection selection,
                             String pageId)
The constructor for the quick open dialog.

Parameters:
shell - the shell.
selection - the current selection.
pageId - the initial page id.
Method Detail

create

public void create()
See Also:
Window

configureShell

protected void configureShell(Shell shell)
See Also:
Window

createDialogArea

protected Control createDialogArea(Composite parent)
Creates a page area, a progress monitor and a separator.

See Also:
Dialog

createPageArea

protected Control createPageArea(Composite parent)
Creates the page area.

Parameters:
parent - the parent composite.
Returns:
the page area control.

cancelPressed

protected void cancelPressed()
Calls the super class method if there are no running operations.

See Also:
Dialog

okPressed

protected void okPressed()
Calls performAction. If the result of calling this method is true

See Also:
Dialog

performAction

protected boolean performAction()
Returns whether ok to close. Asks the current page, if any, whether it is ok to close.

Returns:
true if the dialog can be closed, false otherwise.

getRunnableContext

public IRunnableContext getRunnableContext()
Description copied from interface: ISystemQuickOpenPageContainer
Returns the context for the search operation. This context allows progress to be shown inside the search dialog.

Specified by:
getRunnableContext in interface ISystemQuickOpenPageContainer
Returns:
the IRunnableContext for the search operation
See Also:
ISystemQuickOpenPageContainer.getRunnableContext()

getSelection

public ISelection getSelection()
Description copied from interface: ISystemQuickOpenPageContainer
Returns the selection with which this container was opened.

Specified by:
getSelection in interface ISystemQuickOpenPageContainer
Returns:
the selection passed to this container when it was opened
See Also:
ISystemQuickOpenPageContainer.getSelection()

setPerformActionEnabled

public void setPerformActionEnabled(boolean state)
Description copied from interface: ISystemQuickOpenPageContainer
Sets the enable state of the perform action button of this container.

Specified by:
setPerformActionEnabled in interface ISystemQuickOpenPageContainer
Parameters:
state - true to enable the button which performs the action
See Also:
ISystemQuickOpenPageContainer.setPerformActionEnabled(boolean)

run

public void run(boolean fork,
                boolean cancelable,
                IRunnableWithProgress runnable)
         throws InvocationTargetException,
                InterruptedException
Throws:
InvocationTargetException
InterruptedException
See Also:
IRunnableContext

getProgressMonitor

protected IProgressMonitor getProgressMonitor()
Returns the progress monitor. If the dialog doesn't have a progress monitor, null is returned.


aboutToStart

protected HashMap aboutToStart(boolean enableCancelButton)
About to start a long running operation tiggered through the dialog. Shows the progress monitor and disables the dialog.

Parameters:
enableCancelButton - true if cancel button should be enabled, false otherwise.
Returns:
the saved UI state.
See Also:
#stopped(HashMap);

stopped

protected void stopped(HashMap state)
A long running operation triggered through the wizard was stopped either by user input or by normal end.

See Also:
aboutToStart(boolean)

restoreEnableState

protected void restoreEnableState(Control w,
                                  HashMap h,
                                  String key)
Restores the enable state of a control.

Parameters:
w - the control whose state needs to be restored.
h - the hashmap containing the enable state of the control.
key - the key to use to retrieve the enable state.

handleShellCloseEvent

protected void handleShellCloseEvent()
Checks to see if there are any long running operations. If there are, a dialog is shown

See Also:
Window

okToClose

public boolean okToClose()
Checks if any operations are running. If so, shows a message dialog alerting the user, and returns false indicating the dialog should not be closed.


Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.