com.borland.jbuilder.designer
Interface Designer


public interface Designer

The interface that Designers must implement. In addition, Designers must register with the DesignerManager.


Method Summary
 boolean activate(com.borland.jbuilder.cmt.CmtComponentSource componentSource, com.borland.jbuilder.cmt.CmtModelNode root, com.borland.jbuilder.cmt.CmtModelNode node, DesignerViewer dc)
          Activates or reactivates a view on a given model node, creating UI as needed.
 void annotate(com.borland.jbuilder.cmt.CmtComponentSource componentSource, com.borland.jbuilder.cmt.CmtComponents components)
          Have a designer annotate a component source with design model specific tree(s).
 void close(com.borland.jbuilder.cmt.CmtComponentSource componentSource, DesignerViewer dc)
          Finishes edit of a given component source, and cleanup view-related allocation.
 java.lang.String getModelName()
          Gets the name of the designer's model.
 void open(com.borland.jbuilder.cmt.CmtComponentSource componentSource, DesignerViewer dc)
          Opens a view on a given component source.
 

Method Detail

getModelName

public java.lang.String getModelName()
Gets the name of the designer's model. This name must match the name that the model returns in the getName method. The name may be seen by the user, so it should be localized.

Returns:
designer model name in String format

annotate

public void annotate(com.borland.jbuilder.cmt.CmtComponentSource componentSource,
                     com.borland.jbuilder.cmt.CmtComponents components)
Have a designer annotate a component source with design model specific tree(s). This method is called the first time the component source is opened, and every subsequent time it is changed on reopen.

This method is not called if the component source has previous annotations available.

No view related work should be done in this method.

Parameters:
componentSource - component source to be annotated
components -  

open

public void open(com.borland.jbuilder.cmt.CmtComponentSource componentSource,
                 DesignerViewer dc)
Opens a view on a given component source. Called sometimes after the annotate method, usually the first time the user tries to activate the designer. Also called on re-opens, event if the annotate method is skipped.

Parameters:
componentSource - component source to be annotated
dc - active designer viewer

activate

public boolean activate(com.borland.jbuilder.cmt.CmtComponentSource componentSource,
                        com.borland.jbuilder.cmt.CmtModelNode root,
                        com.borland.jbuilder.cmt.CmtModelNode node,
                        DesignerViewer dc)
Activates or reactivates a view on a given model node, creating UI as needed. Called right after open the first time, and then again every time user tries to activate the designer. The designer should return true if it is OK to activate, false to refuse.

Parameters:
componentSource - component source to be activated
root - target model root node
node - target model node
dc - active designer viewer
Returns:
True if activate proceeds, otherwise false to refuse to activate.

close

public void close(com.borland.jbuilder.cmt.CmtComponentSource componentSource,
                  DesignerViewer dc)
Finishes edit of a given component source, and cleanup view-related allocation. Annotations should be left in place and will be available for the next edit session.

Parameters:
componentSource - component source to be activated
dc - active designer viewer