com.borland.jbuilder.designer
Class DesignerManager

java.lang.Object
  |
  +--com.borland.jbuilder.designer.DesignerManager
All Implemented Interfaces:
BuildListener, java.util.EventListener, java.beans.PropertyChangeListener

public class DesignerManager
extends java.lang.Object
implements java.beans.PropertyChangeListener, BuildListener

Manager class for Designers. The DesignerManager is responsible for dispatching DesignerEvents,

The DesignerManager is not instantiated directly. An object obtains the DesignerManager instance through the static method call:

  DesignerManager dm = DesignerManager.getInstance();

This will create a new instance of DesignerManager if one does not already exist.


Field Summary
static int ADD_MODE
           
static javax.swing.LookAndFeel designerLF
           
static javax.swing.LookAndFeel jbuilderLF
           
static int RUN_MODE
           
static int SELECT_MODE
           
static java.lang.Object TIMING_TRACE
           
 
Method Summary
static void addDesignerListener(DesignerListener listener)
          Adds the specified DesignerListener to receive DesignerEvents from registered Designers.
static void addDesignerReleaseListener(DesignerReleaseListener listener)
          Adds the specified DesignerReleaseListener to receive DesignerReleaseListener from registered Designers.
 void buildFinish(BuildProcess process)
          Notification that the build process has finished.
 void buildMessage(BuildProcess process, java.lang.String file, java.lang.String message)
          Handles build process messages.
 void buildProblem(BuildProcess process, Project project, Url url, boolean error, java.lang.String message, int line, int column, java.lang.String helpTopic)
          Handles notification of build process problems.
 void buildStart(BuildProcess process)
          Notification that the build process has begun.
 void buildStatus(BuildProcess process, java.lang.String message, boolean incrementFileCount)
          Handles notification of build process status.
 Designer getDesigner(com.borland.jbuilder.cmt.CmtModel model)
          Return the designer that owns a given model
static DesignerManager getInstance()
          Retrieves the DesignerManager instance.
static void initOpenTool(byte majorVersion, byte minorVersion)
          Registers this manager as an OpenTool.
 void lookupHelp(java.lang.String className, java.lang.String propertyName)
          Displays the requested help topic.
protected  void processDesignerEvent(DesignerEvent e)
          Dispatches the given DesignerEvent to registered listeners.
 void propertyChange(java.beans.PropertyChangeEvent evt)
          Handles a property change event.
static void registerDesigner(Designer designer)
          Registers the given designer by adding it to the list of current registered designers.
static void removeDesignerListener(DesignerListener listener)
          Removes the specified DesignerListener so that it no longer receives events from registered Designers.
static void removeDesignerReleaseListener(DesignerReleaseListener listener)
          Removes the specified DesignerReleaseListener so that it no longer receives events from registered Designers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIMING_TRACE

public static final java.lang.Object TIMING_TRACE

designerLF

public static javax.swing.LookAndFeel designerLF

jbuilderLF

public static javax.swing.LookAndFeel jbuilderLF

RUN_MODE

public static final int RUN_MODE

SELECT_MODE

public static final int SELECT_MODE

ADD_MODE

public static final int ADD_MODE
Method Detail

registerDesigner

public static void registerDesigner(Designer designer)
Registers the given designer by adding it to the list of current registered designers.

Parameters:
designer - designer to add to current designers list

initOpenTool

public static void initOpenTool(byte majorVersion,
                                byte minorVersion)
Registers this manager as an OpenTool.

Parameters:
majorVersion - the major version of the OpenTools
minorVersion - the minor version of the OpenTools

getInstance

public static DesignerManager getInstance()
Retrieves the DesignerManager instance.

Returns:
this DesignerManager instance

getDesigner

public Designer getDesigner(com.borland.jbuilder.cmt.CmtModel model)
Return the designer that owns a given model
Parameters:
model - the model

lookupHelp

public void lookupHelp(java.lang.String className,
                       java.lang.String propertyName)
Displays the requested help topic. Brings up the help topic viewer.

Parameters:
className - help class topic
propertyName - help property name topic

addDesignerListener

public static void addDesignerListener(DesignerListener listener)
Adds the specified DesignerListener to receive DesignerEvents from registered Designers.

Parameters:
listener - the DesignerListener to add

removeDesignerListener

public static void removeDesignerListener(DesignerListener listener)
Removes the specified DesignerListener so that it no longer receives events from registered Designers.

Parameters:
listener - the DesignerListener to remove

addDesignerReleaseListener

public static void addDesignerReleaseListener(DesignerReleaseListener listener)
Adds the specified DesignerReleaseListener to receive DesignerReleaseListener from registered Designers.

Parameters:
listener - the DesignerReleaseListener to add

removeDesignerReleaseListener

public static void removeDesignerReleaseListener(DesignerReleaseListener listener)
Removes the specified DesignerReleaseListener so that it no longer receives events from registered Designers.

Parameters:
listener - the DesignerReleaseListener to remove

processDesignerEvent

protected void processDesignerEvent(DesignerEvent e)
Dispatches the given DesignerEvent to registered listeners. Handles both DesignerEvents and DesignerReleaseEvents.

Parameters:
e - the DesignerEvent to dispatch

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Handles a property change event.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
evt - property change event to handle

buildStart

public void buildStart(BuildProcess process)
Notification that the build process has begun.

Specified by:
buildStart in interface BuildListener
Parameters:
process - the BuildProcess that has just begun

buildFinish

public void buildFinish(BuildProcess process)
Notification that the build process has finished.

Specified by:
buildFinish in interface BuildListener
Parameters:
process - the BuildProcess that has finished

buildStatus

public void buildStatus(BuildProcess process,
                        java.lang.String message,
                        boolean incrementFileCount)
Handles notification of build process status.

Specified by:
buildStatus in interface BuildListener
Parameters:
process - the build process
message - status message
incrementFileCount - current build file count

buildMessage

public void buildMessage(BuildProcess process,
                         java.lang.String file,
                         java.lang.String message)
Handles build process messages.

Specified by:
buildMessage in interface BuildListener
Parameters:
process - the build process
file - current file being built
message - build process message

buildProblem

public void buildProblem(BuildProcess process,
                         Project project,
                         Url url,
                         boolean error,
                         java.lang.String message,
                         int line,
                         int column,
                         java.lang.String helpTopic)
Handles notification of build process problems.

Specified by:
buildProblem in interface BuildListener
Parameters:
process - the build process
project - active JBuilder project
url - url location
error - boolean indication of whether problem is an error condition
message - build process problem description
line - line number location of build problem
column - column number location of build problem
helpTopic - relevant help topic