Class com.symantec.itools.vcafe.openapi.plugin.PlugInView
All Packages Class Hierarchy This Package Previous Next Index
Class com.symantec.itools.vcafe.openapi.plugin.PlugInView
Object
|
+----com.symantec.itools.vcafe.openapi.plugin.PlugInView
- public abstract class PlugInView
- extends Object
PlugInView is the base class containing methods required to integrate a plug in view
into Visual Cafe environment. A plug in view should always subclass from this class and
provide its own information for atleast the getPlugInUI
method.
-
com.symantec.itools.vcafe.openapi.plugin.PlugInView()
- This method is called by the framework to construct an instance of the plug in view.
-
addPropertyChangeListener(PropertyChangeListener)
- Register a listener for the PropertyChange event.
-
automationPerform(int, String)
- Automation Testing:
This method is for automation testing.
-
firePropertyChange(String, Object, Object)
- Report a property update to any registered listeners.
-
getCompLocation(int, String)
- Automation Testing:
This method gets the location of a component.
-
getPlugInUI()
- This method is called by the framework to obtain the user interface component
to display from the Visual Cafe environment.
-
getTitle()
- This method is called by the framework to obtain the title to display for
the plug in view.
-
getWinHelpId()
- This method is called by the framework to obtain the help id.
-
onWindowClosing()
- This method is called by the framework before the host window is destroyed.
-
removePropertyChangeListener(PropertyChangeListener)
- Remove a listener for the PropertyChange event.
-
setParentFrame(Frame)
- This method is called by the framework giving the frame which holds the
Component
returned by getPlugInUI
method.
-
setProject(VisualProject)
- This method is called by the framework with the currently active project in
Visual Cafe.
-
setTitle(String)
- Sets the title of the plug in view.
-
setVisible(boolean)
- This method is called by the framework specifying whether the host window is being shown
or hidden.
PlugInView
public PlugInView()
- This method is called by the framework to construct an instance of the plug in view.
The default implementation of this method is empty. A plug in view might perform some
initialization tasks by overriding this method.
addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
- Register a listener for the PropertyChange event. The plug in view
should fire a PropertyChange event whenever it changes properties of a plug in view
- Parameters:
- listener - An object to be invoked when a PropertyChange event is fired.
automationPerform
public java.lang.String automationPerform(int iFunc,
String sArg)
- Automation Testing:
This method is for automation testing. If you are returning a list,
use '\n' as a delimiter between items. This gets called from CustomFrame.cpp
and CustomDialog.cpp.
- Parameters:
- iFunc - the function which corresponds to the object we are verifying
- sArg - Any arguments that the function takes
- Returns:
- Everything has to be converted to a string.
firePropertyChange
protected void firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
- Report a property update to any registered listeners.
No event is fired if old and new are equal and non-null.
- Parameters:
- propertyName - The programmatic name of the property that was changed.
- oldValue - The old value of the property.
- newValue - The new value of the property.
getCompLocation
public java.lang.String getCompLocation(int iMask,
String sName)
- Automation Testing:
This method gets the location of a component.
Used for automation testing, since we can't see java objects
inside of C++ windows.
- Parameters:
- sName - Name of the component either by object-name or label-name;
object-name is set by initCompNames()
label-name is what is returned by getText()
- iMask - 0001 - By label(0) or object(1) name as given with initCompNames()
0010 - Location relative(0) to the frame; absolute(1) location on screen
0100 - Refresh(1) Component names and list before finding Component
1000 - Print verbose messages to screen(1); Don't print anything(0)
- Returns:
- X1,Y1,X2,Y2 - X1,Y1:upper left corner; X2,Y2:X-width to the right; Y-length down
getPlugInUI
public java.awt.Component getPlugInUI()
- This method is called by the framework to obtain the user interface component
to display from the Visual Cafe environment. If the plug in view involves any
JFC components, then the resultant component should be put in a DoubleBuffer panel
to reduce the flicker during painting and resizing. The default implementation of
this method return a
null
as component.
- Returns:
- the component to display in frame window of Visual Cafe environment
getTitle
public java.lang.String getTitle()
- This method is called by the framework to obtain the title to display for
the plug in view. The default implementation of this method returns PlugInView with
numbered sequence.
- Returns:
- a
String
containing the title for this view
getWinHelpId
public int getWinHelpId()
- This method is called by the framework to obtain the help id. Pressing F1 on an
active plug in view window will invoke online help displaying the link specified
by the given id. The default implementation of this method returns 0, meaning no
help is available.
- Returns:
- the help id to use for this view
onWindowClosing
public void onWindowClosing()
- This method is called by the framework before the host window is destroyed.
A plug in view may free up any resources at this point.
removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
- Remove a listener for the PropertyChange event.
- Parameters:
- listener - The PropertyChange listener to be removed.
setParentFrame
public void setParentFrame(Frame f)
- This method is called by the framework giving the frame which holds the
Component
returned by getPlugInUI
method. A plug in view may use this object as
the parent for any dialog boxes it might create.
- Parameters:
- f - the frame object used to hold the plug in UI
setProject
public void setProject(VisualProject jPrj)
- This method is called by the framework with the currently active project in
Visual Cafe. A plug in view should implement this method to obtain data from
the current project.
- Parameters:
- jPrj - the current active project in Visual Cafe. This value will be
null if there is no active project open.
setTitle
public void setTitle(String newTitle)
- Sets the title of the plug in view. The default implementation fires a property change
event on "title" property.
- Parameters:
- newTitle - a
String
containing the new title for this view
setVisible
public void setVisible(boolean bShow)
- This method is called by the framework specifying whether the host window is being shown
or hidden.
- Parameters:
- bShow - It is
true
if the window is being shown
It is false
if the window is being hidden.
All Packages Class Hierarchy This Package Previous Next Index