org.eclipse.graphiti.pattern
Interface IPattern

All Superinterfaces:
IAdd, ICreate, ICreateInfo, IDelete, IDirectEditing, ILayout, IMoveShape, IRemove, IResizeShape, IUpdate
All Known Implementing Classes:
AbstractPattern

public interface IPattern
extends ICreate, IAdd, IDelete, IRemove, IUpdate, ILayout, IResizeShape, IMoveShape, IDirectEditing

The Interface IPattern.


Field Summary
 
Fields inherited from interface org.eclipse.graphiti.func.ICreate
EMPTY
 
Fields inherited from interface org.eclipse.graphiti.func.IDirectEditing
TYPE_CHECK, TYPE_COLOR, TYPE_DIALOG, TYPE_DROPDOWN, TYPE_DROPDOWN_READ_ONLY, TYPE_MULTILINETEXT, TYPE_NONE, TYPE_TEXT
 
Method Summary
 PictogramElement add(IAddContext context)
          Executes the add.
 boolean canAdd(IAddContext context)
          Checks, if the add can be executed.
 void completeInfo(IDirectEditingInfo info, Object bo)
          Complete the directEditing info.
 void completeInfo(IDirectEditingInfo info, Object bo, String keyProperty)
          Complete the directEditing info.
 String getCreateDescription()
          Gets the create description.
 String getCreateName()
          Gets the create name.
 IResizeConfiguration getResizeConfiguration(IResizeShapeContext context)
          Provides configuration object, which describes the resize behavior.
 boolean isMainBusinessObjectApplicable(Object mainBusinessObject)
          This method must be implemented by the pattern user.
 boolean isPaletteApplicable()
          Determines whether the pattern supports the creation of new business objects from the palette.
 void setFeatureProvider(IFeatureProvider fp)
          Sets the feature provider.
 
Methods inherited from interface org.eclipse.graphiti.func.ICreate
canCreate, create
 
Methods inherited from interface org.eclipse.graphiti.func.ICreateInfo
getCreateImageId, getCreateLargeImageId
 
Methods inherited from interface org.eclipse.graphiti.func.IDelete
canDelete, delete, postDelete, preDelete
 
Methods inherited from interface org.eclipse.graphiti.func.IRemove
canRemove, postRemove, preRemove, remove
 
Methods inherited from interface org.eclipse.graphiti.func.IUpdate
canUpdate, update, updateNeeded
 
Methods inherited from interface org.eclipse.graphiti.func.ILayout
canLayout, layout
 
Methods inherited from interface org.eclipse.graphiti.func.IResizeShape
canResizeShape, resizeShape
 
Methods inherited from interface org.eclipse.graphiti.func.IMoveShape
canMoveShape, moveShape
 
Methods inherited from interface org.eclipse.graphiti.func.IDirectEditing
canDirectEdit, checkValueValid, completeValue, getEditingType, getInitialValue, getPossibleValues, getProposalSupport, getValueProposals, isAutoCompletionEnabled, isCompletionAvailable, setValue, stretchFieldToFitText
 

Method Detail

isPaletteApplicable

boolean isPaletteApplicable()
Determines whether the pattern supports the creation of new business objects from the palette. Setting this to false will suppress the creation of a palette item for this pattern.

Returns:
true if the pattern supports the ICreate methods and a palette item should be generated

getCreateName

String getCreateName()
Gets the create name.

Specified by:
getCreateName in interface ICreateInfo
Returns:
name for UI representation

getCreateDescription

String getCreateDescription()
Gets the create description.

Specified by:
getCreateDescription in interface ICreateInfo
Returns:
description for UI representation

setFeatureProvider

void setFeatureProvider(IFeatureProvider fp)
Sets the feature provider.

Parameters:
fp - the new feature provider

isMainBusinessObjectApplicable

boolean isMainBusinessObjectApplicable(Object mainBusinessObject)
This method must be implemented by the pattern user. The main pictogram element of the pattern is linked with the main business object.

Parameters:
mainBusinessObject - the main business object
Returns:
True, if this pattern is responsible for the main business object

completeInfo

void completeInfo(IDirectEditingInfo info,
                  Object bo)
Complete the directEditing info. This information is needed to switch automatically into the direct editing mode. (e.g. after creation of a new object)

Parameters:
info - the directEditing info
bo - the business object

completeInfo

void completeInfo(IDirectEditingInfo info,
                  Object bo,
                  String keyProperty)
Complete the directEditing info. This information is needed to switch automatically into the direct editing mode. (e.g. after creation of a new object)

Parameters:
info - the directEditing info
bo - the business object
keyProperty - the key property

add

PictogramElement add(IAddContext context)
Description copied from interface: IAdd
Executes the add.

Specified by:
add in interface IAdd
Parameters:
context - the context needed to execute the add
Returns:
the added pictogram element

canAdd

boolean canAdd(IAddContext context)
Description copied from interface: IAdd
Checks, if the add can be executed.

Specified by:
canAdd in interface IAdd
Parameters:
context - the context needed to execute the add
Returns:
true, if the add can be executed

getResizeConfiguration

IResizeConfiguration getResizeConfiguration(IResizeShapeContext context)
Provides configuration object, which describes the resize behavior.

Parameters:
context - the resizing context
Returns:
the resize configuration object


Copyright (c) SAP AG 2005, 2010.