Class com.symantec.itools.vcafe.openapi.VisualCafe
All Packages Class Hierarchy This Package Previous Next Index
Class com.symantec.itools.vcafe.openapi.VisualCafe
Object
|
+----com.symantec.itools.vcafe.openapi.VisualCafe
- public abstract class VisualCafe
- extends Object
The VisualCafe
class provides the initial and primary interface used by Visual Cafe
plug-ins. Using this class a plug-in can obtain access to Visual Cafe projects,
project files, source files, environment options, the clipboard, component library
and more.
Use the getVisualCafe()
method to access the one-and-only instance of this class.
- Version:
- 1.0
- Author:
- Symantec Internet Tools Division
- Since:
- VCafe 3.0
- See Also:
- getVisualCafe
-
CLASS_BROWSER_CLASSES_PANE_POPUP
- The popup menu that appears upon right-mouse click in classes pane of class browser
-
CLASS_BROWSER_EDITOR_PANE_POPUP
- The popup menu that appears upon right-mouse click in editor pane of class browser
-
CLASS_BROWSER_MEMBERS_PANE_POPUP
- The popup menu that appears upon right-mouse click in members pane of class browser
-
COMP_LIBRARY_POPUP
- The popup menu that appears upon right-mouse click in component library window
-
ENVIRONMENT_OPTIONS
- Environment options
-
FILE_VIEW_TAB_POPUP
- The popup menu that appears upon right-mouse click in files tab of project window
-
FORM_EDITOR_POPUP
- The popup menu that appears upon right-mouse click in form editor window
-
OBJECT_VIEW_TAB_POPUP
- The popup menu that appears upon right-mouse click in objects tab of project window
-
PACKAGE_VIEW_TAB_POPUP
- The popup menu that appears upon right-mouse click in packages tab of project window
-
PROJECT_OPTIONS
- Project options
-
SOURCE_EDITOR_POPUP
- The popup menu that appears upon right-mouse click in source code editor window
-
UNDOCUT
- The menu text for undoing a cut operation.
-
UNDODELETE
- The menu text for undoing a delete operation.
-
UNDODRAGDROP
- The menu text for undoing a drag-n-drop operation.
-
UNDOINSERT
- The menu text for undoing an insert operation.
-
UNDOPASTE
- The menu text for undoing a paste operation.
-
UNDOPROPERTYEDIT
- The menu text for undoing a property edit operation.
-
visualCafe
- Instance of a
VisualCafe
object, created at startup and always available.
-
com.symantec.itools.vcafe.openapi.VisualCafe()
-
-
activatePropertySheet()
- Activates the Property List, showing it as needed.
-
activatePropertySheet(char)
- Activates the Property List, showing it as needed, and sends the typed character to it.
-
addActiveVisualObjectListener(ActiveVisualObjectListener)
- Adds an
ActiveVisualObjectListener
.
-
addDTListener(DTListener)
- Start listening to when classes' design time information is reparsed.
-
addJarToLibrary(String)
- Adds a jar file to the Component Library in Visual Cafe.
-
addOptionsMenuItemListener(int, ActionListener)
- Adds an
ActionListener
.
-
addProjectSystemListener(ProjectSystemListener)
- Start listening to changes to Visual Cafe's project system.
-
addPropertyChangeListener(PropertyChangeListener)
- Starts listening for
PropertyChangeEvents
generated by Visual Cafe.
-
addSourceFileListener(SourceFileListener)
- Adds a
SourceFileListener
to all SourceFiles
.
-
beginUndo(String)
- Call before starting an undoable operation.
-
clearUndo()
- Call when starting an operation that can't be undone.
-
createDefaultProject()
- Creates a new project in Visual Cafe, using the default Project Template.
-
createEmptyProject()
- Creates a new project in Visual Cafe, using the Empty Project Template.
-
createProject(VisualObject)
- Creates a new project in Visual Cafe, using the specified
projectTemplate
.
-
createVisualObject(Class)
- Creates a new
VisualObject
that represents an object of the given class.
-
createVisualObjectByName(String)
- Create a new
VisualObject
that represents an object of the given class.
-
endUndo()
- Call when done with an undoable operation.
-
getActiveObjects()
- Gets an array of
VisualObjects
that are active in the Property List of Visual Cafe.
-
getAttributes()
- Get the
Attributes
object that global (program-wide) named value storage.
-
getClientAreaBounds()
- Returns the dimensions of the client area of Visual Cafe's main frame window.
-
getClipboard()
- Gets Visual Cafe's clipboard object.
-
getComponentLibrary()
- Gets the Visual Repository object that allows access to Visual Cafe's Component Library.
-
getContextualMenu(int)
- Returns a popup menu in Visual Cafe
-
getDesignTimeLookAndFeel()
- Gets the current design time look-and-feel.
-
getDirectory()
- Gets Visual Cafe's "current directory".
-
getEnvironmentOptionSet()
- Gets the
EnvironmentOptionSet
object which allows access to Visual Cafe's environment options.
-
getFrontmostSourceFile()
- Returns an object that represents the frontmost SourceFile window.
-
getFrontmostWindow()
- Returns an object that represents the frontmost window.
-
getInstallDirectory()
- Gets the installation (bin) directory of Visual Cafe.
-
getMainFrameBounds()
- Returns the dimensions of Visual Cafe's main frame window.
-
getMenuBar()
- Gets the top level menubar in Visual Cafe.
-
getOptionsWindow()
- Returns the options window being opened in Visual Cafe.
-
getProductEdition()
- Returns an object that provides information about which edition of Visual Cafe is running.
-
getProject(String)
- Gets the open project with the given name in Visual Cafe.
-
getProjectTemplates()
- Returns an array of all of the installed Project Templates (as appearing
in the Project Templates group of the Component Library).
-
getProjects()
- Returns an array of all of the open projects in Visual Cafe.
-
getSourceFile(String)
- Gets the
SourceFile
with the specified name.
-
getSourceFile(File)
- Returns a
SourceFile
for the given File
.
-
getSourceFiles()
- Returns an array of all of the open source files in Visual Cafe.
-
getTargetProject()
- Gets the target or current project in Visual Cafe.
-
getVisualCafe()
- Gets the object that implements the
VisualCafe
API.
-
invokeHelp(int)
- Activates online help displaying the link specified by the given help id.
-
invokeHelp(File, int)
- Activates online help displaying the link specified by the given help id, in
the specified help file.
-
invokeHelp(String, int)
- Activates online help displaying the link specified by the given help id, in
the help file with the specified name.
-
isMDIEnabled()
- Determines the current environment mode (MDI/SDI) of Visual Cafe.
-
openProject(String)
- Opens the project with the given name in Visual Cafe.
-
registerEditor(String[], ActionListener)
- Register an editor to edit an object of type class.
-
removeActiveVisualObjectListener(ActiveVisualObjectListener)
- Removes an
ActiveVisualObjectListener
.
-
removeDTListener(DTListener)
- Stop listening to when classes' design time information is reparsed.
-
removeOptionsMenuItemListener(int, ActionListener)
- Removes a
ActionListener
.
-
removeProjectSystemListener(ProjectSystemListener)
- Stop listening to changes to Visual Cafe's project system.
-
removePropertyChangeListener(PropertyChangeListener)
- Stops the specified listener from listening for
PropertyChangeEvents
generated by Visual Cafe.
-
removeSourceFileListener(SourceFileListener)
- Removes a
SourceFileListener
from all SourceFiles
.
-
removeVisualObjectListener(VisualObjectListener)
- Removes a
VisualObjectListener
from all VisualObjects
.
-
runInMainUIThread(Runnable)
- Executes a
Runnable
object in Visual Cafe's main UI thread.
-
runInMainUIThreadAndWait(Runnable)
- Executes a
Runnable
object in Visual Cafe's main UI thread and wait for completion.
-
setActiveObjects(VisualObject[])
- Sets an array of
VisualObjects
as active in the Property List of Visual Cafe.
-
setActiveObjects(VisualObject[], boolean)
- Sets an array of
VisualObjects
as active in the Property List of Visual Cafe.
-
setDesignTimeLookAndFeel(LookAndFeel)
- Set the current design time look-and-feel.
-
setDesignTimeLookAndFeel(String)
- Set the current design time look-and-feel.
-
setDirectory(String)
- Sets Visual Cafe's "current directory".
-
setMessageText(String)
- Displays a message on Visual Cafe status bar.
-
setUndoCommandName(String)
- Sets the undo menu item to the specified text.
-
startWaitCursor()
- Indicate to the user that a lengthy operation is starting.
-
stopWaitCursor()
- Indicate that a lengthy operation has ended.
-
updateDesignTimeLookAndFeelUI(Component)
- Changes the look-and-feel of a JComponent to match the current design time look-and-feel.
CLASS_BROWSER_CLASSES_PANE_POPUP
public static final int CLASS_BROWSER_CLASSES_PANE_POPUP
- The popup menu that appears upon right-mouse click in classes pane of class browser
- See Also:
- getContextualMenu
CLASS_BROWSER_EDITOR_PANE_POPUP
public static final int CLASS_BROWSER_EDITOR_PANE_POPUP
- The popup menu that appears upon right-mouse click in editor pane of class browser
- See Also:
- getContextualMenu
CLASS_BROWSER_MEMBERS_PANE_POPUP
public static final int CLASS_BROWSER_MEMBERS_PANE_POPUP
- The popup menu that appears upon right-mouse click in members pane of class browser
- See Also:
- getContextualMenu
COMP_LIBRARY_POPUP
public static final int COMP_LIBRARY_POPUP
- The popup menu that appears upon right-mouse click in component library window
- See Also:
- getContextualMenu
ENVIRONMENT_OPTIONS
public static final int ENVIRONMENT_OPTIONS
- Environment options
- See Also:
- getOptionsWindow
FILE_VIEW_TAB_POPUP
public static final int FILE_VIEW_TAB_POPUP
- The popup menu that appears upon right-mouse click in files tab of project window
- See Also:
- getContextualMenu
FORM_EDITOR_POPUP
public static final int FORM_EDITOR_POPUP
- The popup menu that appears upon right-mouse click in form editor window
- See Also:
- getContextualMenu
OBJECT_VIEW_TAB_POPUP
public static final int OBJECT_VIEW_TAB_POPUP
- The popup menu that appears upon right-mouse click in objects tab of project window
- See Also:
- getContextualMenu
PACKAGE_VIEW_TAB_POPUP
public static final int PACKAGE_VIEW_TAB_POPUP
- The popup menu that appears upon right-mouse click in packages tab of project window
- See Also:
- getContextualMenu
PROJECT_OPTIONS
public static final int PROJECT_OPTIONS
- Project options
- See Also:
- getOptionsWindow
SOURCE_EDITOR_POPUP
public static final int SOURCE_EDITOR_POPUP
- The popup menu that appears upon right-mouse click in source code editor window
- See Also:
- getContextualMenu
UNDOCUT
public static java.lang.String UNDOCUT
- The menu text for undoing a cut operation.
- See Also:
- beginUndo, setUndoCommandName
UNDODELETE
public static java.lang.String UNDODELETE
- The menu text for undoing a delete operation.
- See Also:
- beginUndo, setUndoCommandName
UNDODRAGDROP
public static java.lang.String UNDODRAGDROP
- The menu text for undoing a drag-n-drop operation.
- See Also:
- beginUndo, setUndoCommandName
UNDOINSERT
public static java.lang.String UNDOINSERT
- The menu text for undoing an insert operation.
- See Also:
- beginUndo, setUndoCommandName
UNDOPASTE
public static java.lang.String UNDOPASTE
- The menu text for undoing a paste operation.
- See Also:
- beginUndo, setUndoCommandName
UNDOPROPERTYEDIT
public static java.lang.String UNDOPROPERTYEDIT
- The menu text for undoing a property edit operation.
- See Also:
- beginUndo, setUndoCommandName
visualCafe
protected static com.symantec.itools.vcafe.openapi.VisualCafe visualCafe
- Instance of a
VisualCafe
object, created at startup and always available.
VisualCafe
public VisualCafe()
activatePropertySheet
public abstract void activatePropertySheet()
- Activates the Property List, showing it as needed.
- See Also:
- activatePropertySheet(char)
activatePropertySheet
public abstract void activatePropertySheet(char typedCharacter)
- Activates the Property List, showing it as needed, and sends the typed character to it.
- Parameters:
- typedCharacter - the character to send to the property sheet.
- See Also:
- activatePropertySheet()
addActiveVisualObjectListener
public abstract void addActiveVisualObjectListener(ActiveVisualObjectListener listener)
- Adds an
ActiveVisualObjectListener
. After this call, the listener will be notified
when a VisualObject
is selected into the Property List.
- Parameters:
- listener - the object that receives notifications.
- See Also:
- removeActiveVisualObjectListener(), setActiveObjects(VisualObject[])
addDTListener
public abstract void addDTListener(DTListener listener)
- Start listening to when classes' design time information is reparsed.
- Parameters:
- listener - the object that receives notifications.
- See Also:
- removeDTListener, addDTListener, DTListener
addJarToLibrary
public abstract void addJarToLibrary(String jarFile)
- Adds a jar file to the Component Library in Visual Cafe.
This performs the same action as using the Visual Cafe menus to insert a Component into
the library (Insert -> Component into Library).
Errors are reported in Visual Cafe's message window.
- Parameters:
- jarFile - the full path of the jar file to be added.
addOptionsMenuItemListener
public abstract void addOptionsMenuItemListener(int optionType,
ActionListener l)
- Adds an
ActionListener
. After this call, the listener will be notified
when the user chooses to open Environment Options or Project Options window.
- Parameters:
- optionType - the type of options window. One of:
- PROJECT_OPTIONS - the project options window
- ENVIRONMENT_OPTIONS - the environment options window
- listener - the object that receives notifications.
addProjectSystemListener
public abstract void addProjectSystemListener(ProjectSystemListener listener)
- Start listening to changes to Visual Cafe's project system.
- Parameters:
- listener - the object that receives notifications.
- See Also:
- removeProjectSystemListener
addPropertyChangeListener
public abstract void addPropertyChangeListener(PropertyChangeListener listener)
- Starts listening for
PropertyChangeEvents
generated by Visual Cafe. These occur when the
bound property "design time look-and-feel" is changed.
- Parameters:
- listener - the object that receives notifications.
- See Also:
- removePropertyChangeListener, setDesignTimeLookAndFeel(LookAndFeel), setDesignTimeLookAndFeel(String)
addSourceFileListener
public abstract void addSourceFileListener(SourceFileListener listener)
- Adds a
SourceFileListener
to all SourceFiles
. After this call, the listener will be
listening to changes to any SourceFile
.
A SourceFileListener
can listen to a specific SourceFile
by calling that SourceFile
's
addSourceFileListener()
method.
- Parameters:
- listener - the object that receives notifications
- See Also:
- removeSourceFileListener, addSourceFileListener
beginUndo
public abstract void beginUndo(String commandName)
- Call before starting an undoable operation.
- Parameters:
- commandName - the command text for the undo menu, one of:
- UNDOCUT - menu text for undoing a cut,
- UNDOPASTE - menu text for undoing a paste,
- UNDODELETE - menu text for undoing a delete,
- UNDODRAGDROP - menu text for undoing a drag-n-drop,
- UNDOPROPERTYEDIT - menu text for undoing a property edit,
- UNDOINSERT - menu text for undoing an insert, or
- any other text that specifies a different action.
clearUndo
public abstract void clearUndo()
- Call when starting an operation that can't be undone.
Disables the "undo" menu selection.
createDefaultProject
public abstract com.symantec.itools.vcafe.openapi.VisualProject createDefaultProject()
- Creates a new project in Visual Cafe, using the default Project Template.
The project becomes the target project.
- Returns:
- the new project, or
null
if it cannot be created.
- See Also:
- getProjectTemplates, createProject, createEmptyProject, getTargetProject
createEmptyProject
public abstract com.symantec.itools.vcafe.openapi.VisualProject createEmptyProject()
- Creates a new project in Visual Cafe, using the Empty Project Template.
The project becomes the target project.
- Returns:
- the new project, or
null
if it cannot be created.
- See Also:
- getProjectTemplates, createProject, createDefaultProject, getTargetProject
createProject
public abstract com.symantec.itools.vcafe.openapi.VisualProject createProject(VisualObject projectTemplate)
- Creates a new project in Visual Cafe, using the specified
projectTemplate
.
The project becomes the target project.
- Parameters:
- projectTemplate - a Project Template describing the initial state of the project.
- Returns:
- the new project, or
null
if it cannot be created.
- See Also:
- getProjectTemplates, createEmptyProject, createDefaultProject, getTargetProject
createVisualObject
public abstract com.symantec.itools.vcafe.openapi.VisualObject createVisualObject(Class clazz)
- Creates a new
VisualObject
that represents an object of the given class. The Class
must
already have an entry in the ComponentLibrary
.
- Parameters:
- clazz - the
Class
of the new VisualObject
.
- Returns:
- a new
VisualObject
.
- See Also:
- createVisualObjectByName
createVisualObjectByName
public abstract com.symantec.itools.vcafe.openapi.VisualObject createVisualObjectByName(String className)
- Create a new
VisualObject
that represents an object of the given class. The class must
already have an entry in the ComponentLibrary
.
- Parameters:
- className - the class name of the new
VisualObject
.
- Returns:
- a new
VisualObject
.
- See Also:
- createVisualObject
endUndo
public abstract void endUndo()
- Call when done with an undoable operation.
getActiveObjects
public abstract com.symantec.itools.vcafe.openapi.VisualObject[] getActiveObjects()
- Gets an array of
VisualObjects
that are active in the Property List of Visual Cafe.
If there are no active VisualObjects
, a zero-length array is returned.
- Returns:
- an array containing objects of type
VisualObject
.
getAttributes
public abstract com.symantec.itools.vcafe.openapi.Attributes getAttributes()
- Get the
Attributes
object that global (program-wide) named value storage.
The values stored in the returned Attributes
object are associated with the Visual Cafe
program (are global), not with a specific project. To associate named values with a
specific project, use that VisualProject
's getAttributes()
method.
- Returns:
- the global
Attributes
storage object.
- See Also:
- getAttributes
getClientAreaBounds
public abstract java.awt.Rectangle getClientAreaBounds()
- Returns the dimensions of the client area of Visual Cafe's main frame window.
- Returns:
- the bounds of the client area of the main frame window.
getClipboard
public abstract com.symantec.itools.vcafe.openapi.datatransfer.VisualCafeClipboard getClipboard()
- Gets Visual Cafe's clipboard object.
- Returns:
- the clipboard object that allows datatransfer between
Java and Visual Cafe.
getComponentLibrary
public abstract com.symantec.itools.vcafe.openapi.ComponentLibrary getComponentLibrary()
- Gets the Visual Repository object that allows access to Visual Cafe's Component Library.
- Returns:
- the
ComponentLibrary
.
- See Also:
- VisualRepository, ComponentLibrary
getContextualMenu
public abstract com.symantec.itools.vcafe.openapi.VisualMenu getContextualMenu(int popupType)
- Returns a popup menu in Visual Cafe
- Parameters:
- popupType - the type of popup menu, one of:
- OBJECT_VIEW_TAB_POPUP - popup menu in objects tab of project window,
- PACKAGE_VIEW_TAB_POPUP - popup menu in packages tab of project window,
- FILE_VIEW_TAB_POPUP - popup menu in files tab of project window,
- SOURCE_EDITOR_POPUP - popup menu in source code editor window,
- FORM_EDITOR_POPUP - popup menu in form editor window,
- COMP_LIBRARY_POPUP - popup menu in component library window
- CLASS_BROWSER_CLASSES_PANE_POPUP - popup menu in classes pane of class browser
- CLASS_BROWSER_MEMBERS_PANE_POPUP - popup menu in members pane of class browser
- CLASS_BROWSER_EDITOR_PANE_POPUP - popup menu in editor pane of class browser
- Returns:
- the requested menu
- See Also:
- VisualMenu
getDesignTimeLookAndFeel
public abstract com.sun.java.swing.LookAndFeel getDesignTimeLookAndFeel()
- Gets the current design time look-and-feel.
- Returns:
- the current design time look-and-feel.
- See Also:
- setDesignTimeLookAndFeel(LookAndFeel), setDesignTimeLookAndFeel(String), updateDesignTimeLookAndFeelUI
getDirectory
public abstract java.lang.String getDirectory()
- Gets Visual Cafe's "current directory". This is the directory that would be displayed in
the open file dialog.
- Returns:
- path to the current directory.
- See Also:
- setDirectory
getEnvironmentOptionSet
public abstract com.symantec.itools.vcafe.openapi.options.EnvironmentOptionSet getEnvironmentOptionSet()
- Gets the
EnvironmentOptionSet
object which allows access to Visual Cafe's environment options.
- Returns:
- the environment's options access API object.
getFrontmostSourceFile
public abstract com.symantec.itools.vcafe.openapi.SourceFile getFrontmostSourceFile()
- Returns an object that represents the frontmost SourceFile window.
- Returns:
- the topmost SourceFile object.
getFrontmostWindow
public abstract java.lang.Object getFrontmostWindow()
- Returns an object that represents the frontmost window.
Currently, can return objects of type:
VisualProject
(for active project windows), SourceFile
(for active source editor windows),
and VisualRepository
(for the Component Library).
If the frontmost window is not one of these, null
is returned.
- Returns:
- the topmost window object.
getInstallDirectory
public abstract java.lang.String getInstallDirectory()
- Gets the installation (bin) directory of Visual Cafe.
- Returns:
- path to the install directory.
getMainFrameBounds
public abstract java.awt.Rectangle getMainFrameBounds()
- Returns the dimensions of Visual Cafe's main frame window.
- Returns:
- the bounds of the main frame window.
getMenuBar
public abstract java.awt.MenuBar getMenuBar()
- Gets the top level menubar in Visual Cafe.
- Returns:
- a
MenuBar
object that represents the menu bar in Visual Cafe.
getOptionsWindow
public abstract com.symantec.itools.vcafe.openapi.pluginapi.OptionsWindow getOptionsWindow()
- Returns the options window being opened in Visual Cafe.
One of:
- PROJECT_OPTIONS - the project options window
- ENVIRONMENT_OPTIONS - the environment options window
- Returns:
- the environment/project Options window
- See Also:
- OptionsWindow
getProductEdition
public abstract com.symantec.itools.vcafe.openapi.ProductEdition getProductEdition()
- Returns an object that provides information about which edition of Visual Cafe is running.
- Returns:
- the object providing edition information.
- See Also:
- ProductEdition
getProject
public abstract com.symantec.itools.vcafe.openapi.VisualProject getProject(String projectName)
- Gets the open project with the given name in Visual Cafe.
- Parameters:
- projectName - the name of the open project.
- Returns:
- the named project, or
null
if it cannot be found.
- See Also:
- getTargetProject, getProjects
getProjectTemplates
public abstract com.symantec.itools.vcafe.openapi.VisualObject[] getProjectTemplates()
- Returns an array of all of the installed Project Templates (as appearing
in the Project Templates group of the Component Library).
- Returns:
- array of
VisualObjects
representing the installed Project Templates.
- See Also:
- createProject, createEmptyProject, createDefaultProject
getProjects
public abstract com.symantec.itools.vcafe.openapi.VisualProject[] getProjects()
- Returns an array of all of the open projects in Visual Cafe.
If no projects are open, a zero-length array is returned.
- Returns:
- an array of
VisualProjects
- See Also:
- getProject, getTargetProject
getSourceFile
public abstract com.symantec.itools.vcafe.openapi.SourceFile getSourceFile(String filename)
- Gets the
SourceFile
with the specified name.
Note: unlike getSourceFiles()
, this method will return a SourceFile
even if it isn't currently open in Visual Cafe.
- Parameters:
- filename - name of the file to get.
- Returns:
- the named
SourceFile
, or null
if not found.
- See Also:
- getSourceFiles, getSourceFile(File)
getSourceFile
public abstract com.symantec.itools.vcafe.openapi.SourceFile getSourceFile(File file)
- Returns a
SourceFile
for the given File
.
Note: unlike getSourceFiles()
, this method will return a SourceFile
even if it isn't currently open in Visual Cafe.
- Parameters:
- file - the file to get.
- Returns:
- the
SourceFile
, or null
if not found.
- See Also:
- getSourceFiles, getSourceFile(String)
getSourceFiles
public abstract com.symantec.itools.vcafe.openapi.SourceFile[] getSourceFiles()
- Returns an array of all of the open source files in Visual Cafe.
If no source files are open, a zero-length array is returned.
- Returns:
- an array of open source files.
- See Also:
- getSourceFile(String), getSourceFile(File)
getTargetProject
public abstract com.symantec.itools.vcafe.openapi.VisualProject getTargetProject()
- Gets the target or current project in Visual Cafe.
- Returns:
- the current
VisualProject
, or null
if no projects are open.
- See Also:
- getProject, getProjects
getVisualCafe
public static com.symantec.itools.vcafe.openapi.VisualCafe getVisualCafe()
- Gets the object that implements the
VisualCafe
API. There is only one instance of this
class. This method never returns null
.
- Returns:
- the
VisualCafe
object.
invokeHelp
public abstract void invokeHelp(int helpId)
- Activates online help displaying the link specified by the given help id.
- Parameters:
- helpId - the help id to use. (Note: HID_BASE_RESOURCE is added before WinHelp() is invoked).
invokeHelp
public abstract void invokeHelp(File helpFile,
int helpId)
- Activates online help displaying the link specified by the given help id, in
the specified help file.
- Parameters:
- helpFile - the (WinHelp) help file to use.
- helpId - the help id to use. (Note: HID_BASE_RESOURCE is added before WinHelp() is invoked).
invokeHelp
public abstract void invokeHelp(String helpFileName,
int helpId)
- Activates online help displaying the link specified by the given help id, in
the help file with the specified name. If the
helpFileName
doesn't contain
a path, the "help" directory is assumed.
- Parameters:
- helpFileName - the name of the help file to use.
- helpId - the help id to use. (Note: HID_BASE_RESOURCE is added before WinHelp() is invoked).
isMDIEnabled
public abstract boolean isMDIEnabled()
- Determines the current environment mode (MDI/SDI) of Visual Cafe.
This method is valid only on the Windows platform. On the Macintosh
platform, it returns false.
- Returns:
-
true
for MDI, false
for SDI.
openProject
public abstract com.symantec.itools.vcafe.openapi.VisualProject openProject(String projectName)
- Opens the project with the given name in Visual Cafe.
The project becomes the target project.
- Parameters:
- projectName - the name of the project to open.
- Returns:
- the newly opened project, or
null
if it cannot be found.
- See Also:
- getTargetProject
registerEditor
public abstract void registerEditor(String[] targetClassNames,
ActionListener l)
- Register an editor to edit an object of type class. After this call, the listener will be
notified when the user chooses to edit an object of the given class, from anywhere in the
environment.
- Parameters:
- targetClassNames - array of strings denoting the type of objects for editing
- listener - the object that receives notifications.
example usage:
// Register an object editor for SoftBevelBorder
String[] objectType = { "com.symantec.itools.swing.borders.SoftBevelBorder" };
VisualCafe.getVisualCafe().registerEditor(objectType, new SymObjectEditorAction());
removeActiveVisualObjectListener
public abstract void removeActiveVisualObjectListener(ActiveVisualObjectListener listener)
- Removes an
ActiveVisualObjectListener
. After this call, the listener will no longer be notified
when a VisualObject
is selected into the Property List.
- Parameters:
- listener - the object that was receiving notifications.
- See Also:
- addActiveVisualObjectListener, setActiveObjects(VisualObject[])
removeDTListener
public abstract void removeDTListener(DTListener listener)
- Stop listening to when classes' design time information is reparsed.
.
- Parameters:
- listener - the object that was receiving notifications.
- See Also:
- addDTListener, removeDTListener, DTListener
removeOptionsMenuItemListener
public abstract void removeOptionsMenuItemListener(int optionType,
ActionListener l)
- Removes a
ActionListener
. After this call, the listener will not
be notified when the user chooses to open Environment Options or Project Options window.
- Parameters:
- optionType - the type of options window. One of:
- PROJECT_OPTIONS - the project options window
- ENVIRONMENT_OPTIONS - the environment options window
- listener - the object that was receiving notifications.
removeProjectSystemListener
public abstract void removeProjectSystemListener(ProjectSystemListener listener)
- Stop listening to changes to Visual Cafe's project system.
- Parameters:
- listener - the object that was receiving notifications.
- See Also:
- addProjectSystemListener
removePropertyChangeListener
public abstract void removePropertyChangeListener(PropertyChangeListener listener)
- Stops the specified listener from listening for
PropertyChangeEvents
generated by Visual Cafe.
- Parameters:
- listener - the object that was receiving notifications.
- See Also:
- addPropertyChangeListener
removeSourceFileListener
public abstract void removeSourceFileListener(SourceFileListener listener)
- Removes a
SourceFileListener
from all SourceFiles
. After this call, the listener will not
be listening to changes to any SourceFile
.
A SourceFileListener
can stop listenening to a specific SourceFile
by calling that SourceFile
's
removeSourceFileListener()
method.
- Parameters:
- listener - the object that was receiving notifications.
- See Also:
- addSourceFileListener, removeSourceFileListener
removeVisualObjectListener
public abstract void removeVisualObjectListener(VisualObjectListener listener)
- Removes a
VisualObjectListener
from all VisualObjects
. After this call, the listener will
not be listening to changes to any VisualObject
.
A VisualObjectListener
can stop listening to a specific VisualObject
by calling that
VisualObject
's removeVisualObjectListener()
method.
- Parameters:
- listener - the object that was receiving notifications
- See Also:
- addVisualObjectListener, removeVisualObjectListener
runInMainUIThread
public abstract void runInMainUIThread(Runnable runnable)
- Executes a
Runnable
object in Visual Cafe's main UI thread.
If the caller is already running in the main UI thread,
the Runnable's run()
method is invoked immediately and
runInMainUIThread()
does not return until the run()
method returns. If the caller is running in any other
thread, the runnable is queued for later execution in
the main UI thread and the caller returns immediately.
This method can help performance when calling several
openapi methods that individually execute in the main UI thread (for
example, most of the com.symantec.itools.vcafe.openapi.dtreflect
methods)
runInMainUIThreadAndWait
public abstract void runInMainUIThreadAndWait(Runnable runnable)
- Executes a
Runnable
object in Visual Cafe's main UI thread and wait for completion.
runInMainUIThreadAndWait()
does not return
until the runnable's run()
method has completed.
This method can help performance when calling several
openapi methods that individually execute in the main UI thread (for
example, most of the com.symantec.itools.vcafe.openapi.dtreflect
methods)
setActiveObjects
public void setActiveObjects(VisualObject[] visualObjects)
- Sets an array of
VisualObjects
as active in the Property List of Visual Cafe. The
previously selected property remains selected if it exists for the list of objects.
- Parameters:
- visualObjects - an array containing objects of type
VisualObject
.
- See Also:
- setActiveObjects(VisualObject[], boolean)
setActiveObjects
public abstract void setActiveObjects(VisualObject[] visualObjects,
boolean forceDefaultProperty)
- Sets an array of
VisualObjects
as active in the Property List of Visual Cafe.
- Parameters:
- visualObjects - an array containing objects of type
VisualObject
.
- forceDefaultProperty - if true, forces the default property for the object[s] to be selected.
if false, the previously selected property remains selected (if it exists).
- See Also:
- setActiveObjects(VisualObject[])
setDesignTimeLookAndFeel
public abstract void setDesignTimeLookAndFeel(LookAndFeel newDesignTimeLookAndFeel)
- Set the current design time look-and-feel.
The new look-and-feel is applied to both new and existing Components.
This is a JavaBeans bound property.
- Parameters:
- newDesignTimeLookAndFeel - an object defining the UI's new look-and-feel.
- See Also:
- setDesignTimeLookAndFeel(String), getDesignTimeLookAndFeel, updateDesignTimeLookAndFeelUI
setDesignTimeLookAndFeel
public abstract void setDesignTimeLookAndFeel(String newDesignTimeLookAndFeelClassName) throws ClassNotFoundException, InstantiationException, IllegalAccessException
- Set the current design time look-and-feel.
The new look-and-feel is applied to both new and existing Components.
This is a JavaBeans bound property.
- Parameters:
- newDesignTimeLookAndFeelClassName - class name of an object defining the UI's new look-and-feel.
- Throws: ClassNotFoundException
- if the specified class cannot be located.
- Throws: InstantiationException
- if the specified class could not be constructed.
- Throws: IllegalAccessException
- if the specified class definition cannot be
accessed (it's not public).
- See Also:
- setDesignTimeLookAndFeel(LookAndFeel), getDesignTimeLookAndFeel, updateDesignTimeLookAndFeelUI
setDirectory
public abstract boolean setDirectory(String newDirectory)
- Sets Visual Cafe's "current directory". This is the directory that would be displayed in
the open file dialog.
- Parameters:
- path - to the new directory.
- Returns:
- true if success, false otherwise.
setMessageText
public abstract void setMessageText(String message)
- Displays a message on Visual Cafe status bar.
- Parameters:
- the - text to display.
setUndoCommandName
public abstract void setUndoCommandName(String commandName)
- Sets the undo menu item to the specified text.
- Parameters:
- commandName - the command text for the undo menu, one of:
- UNDOCUT - menu text for undoing a cut,
- UNDOPASTE - menu text for undoing a paste,
- UNDODELETE - menu text for undoing a delete,
- UNDODRAGDROP - menu text for undoing a drag-n-drop,
- UNDOPROPERTYEDIT - menu text for undoing a property edit,
- UNDOINSERT - menu text for undoing an insert, or
- any other text that specifies a different action.
startWaitCursor
public abstract void startWaitCursor()
- Indicate to the user that a lengthy operation is starting. The Wait cursor is
displayed until a matching call to
stopWaitCursor()
.
This method must be matched by a call to stopWaitCursor()
.
example usage:
VisualCafe.getVisualCafe().startWaitCursor();
try {
...
... lots of time consuming processing here ...
...
} finally {
VisualCafe.getVisualCafe().stopWaitCursor();
}
- See Also:
- stopWaitCursor()
stopWaitCursor
public abstract void stopWaitCursor()
- Indicate that a lengthy operation has ended. The cursor is restored to
its appearance before
startWaitCursor()
was called.
- See Also:
- startWaitCursor();
updateDesignTimeLookAndFeelUI
public abstract void updateDesignTimeLookAndFeelUI(Component component)
- Changes the look-and-feel of a JComponent to match the current design time look-and-feel.
- Parameters:
- component - the component whose look-and-feel needs updating.
- See Also:
- setDesignTimeLookAndFeel(LookAndFeel), setDesignTimeLookAndFeel(String), getDesignTimeLookAndFeel
All Packages Class Hierarchy This Package Previous Next Index