# com.bea.ide.control
DefaultDesignViewDriver Class

public class DefaultDesignViewDriver
extends `Object`
implements `IDesignViewDriver`

Hierarchy
  `Object`
  `DefaultDesignViewDriver`

All Implemented Interfaces
  `IDesignViewDriver`

## Field Summary

`protected `JavaDocument`` | `_doc` JavaDocument

## Constructor Summary

DefaultDesignViewDriver() Construct a driver for a placeholder.
DefaultDesignViewDriver(`JavaDocument` doc) Construct a DesignView driver for a java-like document.

## Method Summary

`public boolean` | `canContainControl`() Specify whether this designview should show controls and allow them to be added to the document.
`public `IDocument`` | `getCallbackDocument`() The document which contains callbacks for the current document.
`public int` | `getClientType`() Specify what type of client representation to show on this designview.
`public `String`` | `getControlInterfaceName`() Specifies the control interface for the ControlDescription that contains the attributes for this document.
`public `String`` | `getEditorLabel`() The type of file being edited.
`public `Object`[]` | `getPopupActions`(`IElement` element) Popup actions for a given element.
`public void` | `setCanAddControl`(boolean canAdd) Tell the driver whether to allow controls to be added or shown.
`public void` | `setClientType`(int clientType) Control what type of drawing to use to show the client.
`public void` | `setControlInterfaceName`(`String` name) Set the interfacename for this designview.
`public void` | `setEditorLabel`(`String` editorLabel) Tell the driver what to show as the file type at the top of the design.

Methods from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods from interface `com.bea.ide.control.`IDesignViewDriver``
``canContainControl`, `getCallbackDocument`, `getClientType`, `getControlInterfaceName`, `getEditorLabel`, `getPopupActions``

## Field Detail

### _doc

    protected JavaDocument _doc

## Constructor Detail

### DefaultDesignViewDriver

    public DefaultDesignViewDriver()

  Construct a driver for a placeholder. All values are set minimally.

### DefaultDesignViewDriver

    public DefaultDesignViewDriver(JavaDocument doc)

  Construct a DesignView driver for a java-like document.

## Method Detail

### canContainControl() Method

    public boolean canContainControl()

Description copied from `IDesignViewDriver.canContainControl()`
Specify whether this designview should show controls and allow them to be added to the document.

#### Returns

true if this document can have controls added to it.

### getCallbackDocument() Method

    public IDocument getCallbackDocument()

Description copied from `IDesignViewDriver.getCallbackDocument()`
The document which contains callbacks for the current document. In most cases, this is the current document.

### getClientType() Method

    public int getClientType()

Description copied from `IDesignViewDriver.getClientType()`
Specify what type of client representation to show on this designview.

#### Returns

one of the CLIENT_* constants.

### getControlInterfaceName() Method

    public String getControlInterfaceName()

Description copied from `IDesignViewDriver.getControlInterfaceName()`
Specifies the control interface for the ControlDescription that contains the attributes for this document. May not be null, but may be the empty string, in which case the superclasses of the document will be checked for matching types.

#### Returns

The interface name of the control which defines properties for this control.

### getEditorLabel() Method

    public String getEditorLabel()

Description copied from `IDesignViewDriver.getEditorLabel()`
The type of file being edited.

#### Returns

A label to display as part of the editor title.

### getPopupActions(IElement) Method

    public Object[] getPopupActions(IElement element)

Description copied from `IDesignViewDriver.getPopupActions(IElement)`
Popup actions for a given element. Objects in the returned array may be: - An IActionProxy to show on the menu. - The marker object STANDARD_MENU, which will put standard menu items into the array at that point (with seperators before and after if appropriate). - The marker object SEPARATOR to indicate a separator in the menu.

#### Parameters

element
  The element for which the menu should be shown.

#### Returns

An array of IActionProxy, STANDARD_MENU, and/or SEPARATOR objects for the popup menu to show. If this is zero-length, no menu will be shown. Returning null is equivalent to returning an array containing only STANDARD_MENU.

### setCanAddControl(boolean) Method

    public void setCanAddControl(boolean canAdd)

Tell the driver whether to allow controls to be added or shown.

#### Parameters

canAdd
  true if this document type can contain controls.

### setClientType(int) Method

    public void setClientType(int clientType)

Control what type of drawing to use to show the client.

#### Parameters

clientType
  of the CLIENT_* constants on IDesignViewDriver to specify how the client should be shown.

### setControlInterfaceName(String) Method

    public void setControlInterfaceName(String name)

Set the interfacename for this designview. For a control, this will be the interface class name. For other document types, it will be a string which identifies the docuement type, usually the document class name.

#### Parameters

name
  the name of the interface or document class.

### setEditorLabel(String) Method

    public void setEditorLabel(String editorLabel)

Tell the driver what to show as the file type at the top of the design.

#### Parameters

editorLabel
  the type of document, shown next to classname in the main drawing.