com.bowstreet.editor.uitools
Interface IDesigner


public interface IDesigner


Nested Class Summary
static interface IDesigner.BuilderCallUpdater
           
 
Field Summary
static int JAVA_FILE
           
static int MODEL_FILE
           
static int SERVABLE_FILE
           
 
Method Summary
 void addBuilderCall(BuilderCall bc, BuilderCall after)
          this method can be called to add a BuilderCall that is created in a layout listener.
 void builderInputsChanged()
          this method should be called whenever the BuilderInputs to a BuilderCall is changed in a listener.
 java.lang.Object callMethod(java.lang.String className, java.lang.String methodName, java.lang.Object[] args)
          An ugly back door for getting whatever designer method you need called from in your coordinator
 com.bowstreet.editor.BuilderCallList getBuilderCallList()
          Get the same instance of BuilderCallList that the designer is using.
 SourceModel getSourceModel()
          Get the source Model.
 void handleException(java.lang.String message, java.lang.Throwable e)
          Call this method when you are holding an exception that you need to notify the user of (via a popup dialog).
 BuilderCall insertBuilderCall(BuilderDef bDef, BuilderCall insertBefore)
           
 BuilderCall insertBuilderCallUsingDialog(BuilderDef def, IDesigner.BuilderCallUpdater updater, GenElement modifee, BuilderCall insertBefore)
           
 void openBuilderCallDialog(BuilderCall builder)
          Convenience method to open a builder in a dialog.
 void openBuilders(BuilderCall[] builders, boolean setControlFocus)
           
 void openCheatSheet(java.lang.String cheatSheet)
          Cause the Designer to activate the cheat sheet view if it isn't activated, and open the specified cheat sheet in that view.
 boolean[] openCheckboxListMessageDialog(java.lang.String title, java.lang.String message, java.lang.String[] choices, boolean[] defaultSelection)
          Creates an input dialog with OK and Cancel buttons and a checkboxlist box.
 void openError(java.lang.String title, java.lang.String message)
          Convenience method to open a standard error dialog.
 void openFile(java.lang.String projectRelativePath, int type)
          Convenience method to open a file in an editor.
 void openInformation(java.lang.String title, java.lang.String message)
          Convenience method to open a standard information dialog.
 java.lang.String openInputQuestion(java.lang.String title, java.lang.String message, java.lang.String initialValue)
          Creates an input dialog with OK and Cancel buttons.
 int openPropertyDialog(IModelEditorPropertyListener pListener, java.lang.String pId)
          Convenience method to open a builder in a dialog.
 boolean openQuestion(java.lang.String title, java.lang.String message)
          Convenience method to open a simple Yes/No question dialog.
 int openRadioMessageDialog(java.lang.String title, java.lang.String message, java.lang.String[] choices, int defaultSelection)
          Creates an input dialog with OK and Cancel buttons and a radio choose box.
 java.lang.String[] openTextListMessageDialog(java.lang.String title, java.lang.String message, java.lang.String[] labels, java.lang.String[] defaultValues, java.lang.String[] validChars, java.lang.String[] invalidChars)
          Creates an input dialog with OK and Cancel buttons and some text edit fields.
 void openWarning(java.lang.String title, java.lang.String message)
          Convenience method to open a standard warning dialog.
 void refreshWorkspace(java.lang.String path)
          Call this if you have created or deleted a file.
 void removeBuilderCall(BuilderCall bc)
          this method can be called to delete a BuilderCall is changed in a layout listener.
 void replaceBuilderCall(BuilderCall bc)
          this method can be called to replace a BuilderCall that is changed in a layout listener.
 

Field Detail

JAVA_FILE

static final int JAVA_FILE
See Also:
Constant Field Values

MODEL_FILE

static final int MODEL_FILE
See Also:
Constant Field Values

SERVABLE_FILE

static final int SERVABLE_FILE
See Also:
Constant Field Values
Method Detail

addBuilderCall

void addBuilderCall(BuilderCall bc,
                    BuilderCall after)
                    throws java.lang.Exception
this method can be called to add a BuilderCall that is created in a layout listener.

Parameters:
BuilderCall - bc the builder call to add
BuilderCall - after the builder call to add this after if null it's added to the end of the list
Throws:
java.lang.Exception

builderInputsChanged

void builderInputsChanged()
                          throws java.lang.Exception
this method should be called whenever the BuilderInputs to a BuilderCall is changed in a listener.

Throws:
java.lang.Exception

callMethod

java.lang.Object callMethod(java.lang.String className,
                            java.lang.String methodName,
                            java.lang.Object[] args)
                            throws java.lang.Exception
An ugly back door for getting whatever designer method you need called from in your coordinator

Parameters:
className -
methodName -
args -
Returns:
method result
Throws:
java.lang.Exception

getBuilderCallList

com.bowstreet.editor.BuilderCallList getBuilderCallList()
Get the same instance of BuilderCallList that the designer is using.

Returns:
BuilderCallList

getSourceModel

SourceModel getSourceModel()
Get the source Model. Note that you should not use this to access the BuilderCallList. Use getBuilderCallList() instead, which will get you the same instance that the designer is using

Returns:
the source model

handleException

void handleException(java.lang.String message,
                     java.lang.Throwable e)
Call this method when you are holding an exception that you need to notify the user of (via a popup dialog). Method will show an error dialog. Assumption is that the severity is ERROR.

Parameters:
message - - optional message to display. If null, use the message in the Exception.
e - - exception. May be a CoreException if coming from Eclipse code.

insertBuilderCall

BuilderCall insertBuilderCall(BuilderDef bDef,
                              BuilderCall insertBefore)

insertBuilderCallUsingDialog

BuilderCall insertBuilderCallUsingDialog(BuilderDef def,
                                         IDesigner.BuilderCallUpdater updater,
                                         GenElement modifee,
                                         BuilderCall insertBefore)

openBuilderCallDialog

void openBuilderCallDialog(BuilderCall builder)
Convenience method to open a builder in a dialog.

Parameters:
builder - the buildercall to open

openBuilders

void openBuilders(BuilderCall[] builders,
                  boolean setControlFocus)

openCheatSheet

void openCheatSheet(java.lang.String cheatSheet)
Cause the Designer to activate the cheat sheet view if it isn't activated, and open the specified cheat sheet in that view.

Parameters:
cheatSheet -

openCheckboxListMessageDialog

boolean[] openCheckboxListMessageDialog(java.lang.String title,
                                        java.lang.String message,
                                        java.lang.String[] choices,
                                        boolean[] defaultSelection)
Creates an input dialog with OK and Cancel buttons and a checkboxlist box.

Parameters:
title - the dialog title, or null if none
message - the dialog message, or null if none
choices - an array of strings that are the choices
defaultSelection - a boolean array that identifies the default choices
Returns:
the array of the state of the selected check boxes

openError

void openError(java.lang.String title,
               java.lang.String message)
Convenience method to open a standard error dialog.

Parameters:
title - the dialog's title, or null if none
message - the message

openFile

void openFile(java.lang.String projectRelativePath,
              int type)
Convenience method to open a file in an editor.

Parameters:
projectRelativePath - the relative path to the file to open
type - of file JAVA_FILE, MODEL_FILE, SERVABLE_FILE

openInformation

void openInformation(java.lang.String title,
                     java.lang.String message)
Convenience method to open a standard information dialog.

Parameters:
title - the dialog's title, or null if none
message - the message

openInputQuestion

java.lang.String openInputQuestion(java.lang.String title,
                                   java.lang.String message,
                                   java.lang.String initialValue)
Creates an input dialog with OK and Cancel buttons.

Parameters:
title - the dialog title, or null if none
message - the dialog message, or null if none
initialValue - the initial input value, or null if none (equivalent to the empty string)
Returns:
the input string

openPropertyDialog

int openPropertyDialog(IModelEditorPropertyListener pListener,
                       java.lang.String pId)
Convenience method to open a builder in a dialog.

Parameters:
listener - the property listener that provides the data
Id - of the property

openQuestion

boolean openQuestion(java.lang.String title,
                     java.lang.String message)
Convenience method to open a simple Yes/No question dialog.

Parameters:
title - the dialog's title, or null if none
message - the message
Returns:
true if the user presses the OK button, false otherwise

openRadioMessageDialog

int openRadioMessageDialog(java.lang.String title,
                           java.lang.String message,
                           java.lang.String[] choices,
                           int defaultSelection)
Creates an input dialog with OK and Cancel buttons and a radio choose box.

Parameters:
title - the dialog title, or null if none
message - the dialog message, or null if none
choices - an array of strings that are the choices
defaultSelection - the 0 based index of the default selected choice
Returns:
the index of the selected radio button

openTextListMessageDialog

java.lang.String[] openTextListMessageDialog(java.lang.String title,
                                             java.lang.String message,
                                             java.lang.String[] labels,
                                             java.lang.String[] defaultValues,
                                             java.lang.String[] validChars,
                                             java.lang.String[] invalidChars)
Creates an input dialog with OK and Cancel buttons and some text edit fields.

Parameters:
title - the dialog title, or null if none
message - the dialog message, or null if none
labels - an array of strings that are the choices
defaultValues - a String array that identifies the default value
validChars - a String array that identifies the valid chars for entry, null means all are valid
invalidChars - a String array that identifies the invalid chars for entry, null means all are valid
Returns:
the array of the values entered

openWarning

void openWarning(java.lang.String title,
                 java.lang.String message)
Convenience method to open a standard warning dialog.

Parameters:
title - the dialog's title, or null if none
message - the message

refreshWorkspace

void refreshWorkspace(java.lang.String path)
Call this if you have created or deleted a file. It will update the workspace to show the change.

Parameters:
path -

removeBuilderCall

void removeBuilderCall(BuilderCall bc)
                       throws java.lang.Exception
this method can be called to delete a BuilderCall is changed in a layout listener.

Throws:
java.lang.Exception

replaceBuilderCall

void replaceBuilderCall(BuilderCall bc)
                        throws java.lang.Exception
this method can be called to replace a BuilderCall that is changed in a layout listener.

Throws:
java.lang.Exception


Copyright © 2009 IBM. All Rights Reserved.