com.pvx.ooadide.views
Class UIManager

java.lang.Object
  extended by com.pvx.ooadide.views.UIManager

public class UIManager
extends java.lang.Object

Provides an Interface to the Eclipse GUI for ProvideX programs

Since:
1.0
Version:
1.0, 01/01/2007
Author:
Jarett Smith

Field Summary
static java.lang.String CONSOLE_VIEW_ID
           
static java.lang.String IOLIST_VIEW_ID
           
static java.lang.String NOMADS_VIEW_ID
           
static java.lang.String PVCOUTLINE_VIEW_ID
           
 
Constructor Summary
UIManager()
           
 
Method Summary
 void addRowToView(java.lang.String id, java.lang.String text)
           
 void clearView(java.lang.String id)
           
 void closeAllEditors(boolean save)
          Closes all open editors
static void createDialProgressMonitor(java.lang.String taskName, int toComplete, MonitorState mState)
          This method should not be called directly by ProvideX programs.
 void editFile(java.lang.String filePath, java.lang.String projectName)
          Opens the file specified in the ProvideX Editor
 int getNumberOfColumns(java.lang.String id)
           
 int getNumberOfRows(java.lang.String id)
           
static MonitorState getProgressMonitor(java.lang.String taskName, int toComplete)
          Creates a progress monitor dialog.
 java.lang.String getRegisteredEditors(java.lang.String fileName)
          Get a list of all of the editors associated with the specified file
 java.lang.String getRegisteredViews()
          Return a list of views defined in the Eclipse registry.
static void hideView(java.lang.String id)
          Hides the view identified
static boolean isPvxProgressMonitorDialogVisible()
           
static boolean isViewVisible(java.lang.String id)
          Returns whether the specified Eclipse part is visible.
 void printLnToConsole(java.lang.String text)
          Prints a line of text to the Console view
static void setPvxProgressMonitorDialogVisible(boolean vis)
           
static void showView(java.lang.String id)
          Shows the view identified by the given view id in this Eclipse page and gives it focus.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONSOLE_VIEW_ID

public static java.lang.String CONSOLE_VIEW_ID

PVCOUTLINE_VIEW_ID

public static java.lang.String PVCOUTLINE_VIEW_ID

IOLIST_VIEW_ID

public static java.lang.String IOLIST_VIEW_ID

NOMADS_VIEW_ID

public static java.lang.String NOMADS_VIEW_ID
Constructor Detail

UIManager

public UIManager()
Method Detail

editFile

public void editFile(java.lang.String filePath,
                     java.lang.String projectName)
Opens the file specified in the ProvideX Editor

Parameters:
filePath - The file to edit
projectName - The project containing the file

closeAllEditors

public void closeAllEditors(boolean save)
Closes all open editors

Parameters:
save - If true save dirty files prior to closes

printLnToConsole

public void printLnToConsole(java.lang.String text)
Prints a line of text to the Console view

Parameters:
text - String to print

getRegisteredEditors

public java.lang.String getRegisteredEditors(java.lang.String fileName)
Get a list of all of the editors associated with the specified file

Parameters:
fileName - The file to
Returns:
an 0x8a (ProvideX sep) delimited list of all of the editors associated with the specified file

getRegisteredViews

public java.lang.String getRegisteredViews()
Return a list of views defined in the Eclipse registry.

Returns:
the views or ""

clearView

public void clearView(java.lang.String id)

isViewVisible

public static boolean isViewVisible(java.lang.String id)
Returns whether the specified Eclipse part is visible.

Parameters:
id - The id of the Eclipse part
Returns:
boolean true if part is visible

showView

public static void showView(java.lang.String id)
Shows the view identified by the given view id in this Eclipse page and gives it focus. If there is a view identified by the given view id is already open in this page, it is given focus.

Parameters:
id - The id of the view to show

addRowToView

public void addRowToView(java.lang.String id,
                         java.lang.String text)

getNumberOfRows

public int getNumberOfRows(java.lang.String id)

getNumberOfColumns

public int getNumberOfColumns(java.lang.String id)

hideView

public static void hideView(java.lang.String id)
Hides the view identified

Parameters:
id - The id of the view to hide

getProgressMonitor

public static MonitorState getProgressMonitor(java.lang.String taskName,
                                              int toComplete)
Creates a progress monitor dialog. Retrieves an active progress monitor.

Parameters:
taskName -
toComplete -
Returns:
MonitorState object to interface with the dialog

createDialProgressMonitor

public static void createDialProgressMonitor(java.lang.String taskName,
                                             int toComplete,
                                             MonitorState mState)
This method should not be called directly by ProvideX programs. Use the getProgressMonitor instead

Parameters:
taskName - The title for the dialog
toComplete - The amount of work to be done
mState - The Monitor state object
See Also:
getProgressMonitor(String, int)

isPvxProgressMonitorDialogVisible

public static boolean isPvxProgressMonitorDialogVisible()

setPvxProgressMonitorDialogVisible

public static void setPvxProgressMonitorDialogVisible(boolean vis)