public abstract class AbstractOfficeFloorEditPart<M extends Model,E extends Enum<E>,F extends OfficeFloorFigure> extends org.eclipse.gef.editparts.AbstractGraphicalEditPart implements PropertyChangeListener, org.eclipse.gef.NodeEditPart
Abstract EditPart
for the Office.
This provides the implementation of a NodeEditPart
but does not
implement the interface. Subclasses may therefore choose to implement the
interface if it requires this functionality.
figure, sourceConnections, targetConnections
children, FLAG_ACTIVE, FLAG_FOCUS, MAX_FLAG
REQ_ADD, REQ_ALIGN, REQ_ALIGN_CHILDREN, REQ_CLONE, REQ_CONNECTION_END, REQ_CONNECTION_START, REQ_CREATE, REQ_CREATE_BENDPOINT, REQ_DELETE, REQ_DELETE_DEPENDANT, REQ_DIRECT_EDIT, REQ_MOVE, REQ_MOVE_BENDPOINT, REQ_MOVE_CHILDREN, REQ_OPEN, REQ_ORPHAN, REQ_ORPHAN_CHILDREN, REQ_RECONNECT_SOURCE, REQ_RECONNECT_TARGET, REQ_RESIZE, REQ_RESIZE_CHILDREN, REQ_SELECTION, REQ_SELECTION_HOVER
Constructor and Description |
---|
AbstractOfficeFloorEditPart() |
Modifier and Type | Method and Description |
---|---|
void |
activate() |
BeanDialog |
createBeanDialog(Object bean,
String... ignoreProperties)
Creates the
BeanDialog for the input bean. |
protected void |
createEditPolicies() |
protected org.eclipse.draw2d.IFigure |
createFigure() |
protected abstract F |
createOfficeFloorFigure()
Creates the
OfficeFloorFigure for this EditPart . |
void |
deactivate() |
protected void |
executeCommand(OfficeFloorCommand command)
Executes the input
Command . |
M |
getCastedModel()
Obtains the model casted to its specific type.
|
org.eclipse.draw2d.IFigure |
getContentPane() |
AbstractOfficeFloorEditor<?,?> |
getEditor()
Obtains the Editor for this.
|
protected List<?> |
getModelChildren() |
protected List<?> |
getModelSourceConnections() |
protected List<?> |
getModelTargetConnections() |
F |
getOfficeFloorFigure()
Obtains the
OfficeFloorFigure for this EditPart . |
protected abstract Class<E> |
getPropertyChangeEventType()
Obtains the
Enum type for the property change events. |
org.eclipse.gef.RootEditPart |
getRoot() |
org.eclipse.draw2d.ConnectionAnchor |
getSourceConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection) |
org.eclipse.draw2d.ConnectionAnchor |
getSourceConnectionAnchor(org.eclipse.gef.Request request) |
org.eclipse.draw2d.ConnectionAnchor |
getTargetConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection) |
org.eclipse.draw2d.ConnectionAnchor |
getTargetConnectionAnchor(org.eclipse.gef.Request request) |
protected abstract void |
handlePropertyChange(E property,
PropertyChangeEvent evt)
Handles the
PropertyChangeEvent . |
protected void |
init()
Sub classes may override this method to initialise various state.
|
protected boolean |
isFreeformFigure()
Override to indicate that
IFigure needs a
FreeformWrapperFigure . |
void |
messageError(org.eclipse.core.runtime.IStatus status)
Displays the
IStatus error. |
void |
messageError(String message)
Displays the message as an error
MessageDialog . |
void |
messageError(String message,
Throwable cause)
Displays the message and its cause as an error
MessageDialog . |
void |
messageError(Throwable error)
Displays the
Throwable error details as an error
MessageDialog . |
void |
messageWarning(String message)
Displays the message as a warning
MessageDialog . |
void |
performRequest(org.eclipse.gef.Request req) |
protected void |
populateConnectionSourceModels(List<Object> models)
Populates the Models that are sources of connections.
|
protected void |
populateConnectionTargetModels(List<Object> models)
Populates the Models that are targets of connections.
|
protected void |
populateModelChildren(List<Object> childModels)
Override to populate the children of this model.
|
protected void |
populateOfficeFloorDirectEditPolicy(OfficeFloorDirectEditPolicy<M> policy)
Sub classes may override to populate the
OfficeFloorDirectEditPolicy . |
protected void |
populateOfficeFloorOpenEditPolicy(OfficeFloorOpenEditPolicy<M> policy)
Sub classes may override to populate the
OfficeFloorOpenEditPolicy . |
void |
propertyChange(PropertyChangeEvent evt) |
protected void |
refreshVisuals()
Refresh the visuals.
|
void |
setLocation(org.eclipse.draw2d.geometry.Point location)
Specifies the location for the figure.
|
void |
setModel(Object model) |
void |
setOfficeFloorEditor(AbstractOfficeFloorEditor<?,?> editor)
Specifies the
AbstractOfficeFloorEditor that contains this
EditPart . |
addChildVisual, addNodeListener, addNotify, addSourceConnection, addTargetConnection, createConnection, createOrFindConnection, fireRemovingSourceConnection, fireRemovingTargetConnection, fireSourceConnectionAdded, fireTargetConnectionAdded, getAdapter, getDragTracker, getFigure, getLayer, getSourceConnections, getTargetConnections, isSelectable, primAddSourceConnection, primAddTargetConnection, primRemoveSourceConnection, primRemoveTargetConnection, refresh, refreshSourceConnections, refreshTargetConnections, registerVisuals, removeChildVisual, removeNodeListener, removeNotify, removeSourceConnection, removeTargetConnection, reorderChild, reorderSourceConnection, reorderTargetConnection, setFigure, setLayoutConstraint, unregisterVisuals
activateEditPolicies, addChild, addEditPartListener, createChild, deactivateEditPolicies, debug, debugFeedback, eraseSourceFeedback, eraseTargetFeedback, fireActivated, fireChildAdded, fireDeactivated, fireRemovingChild, fireSelectionChanged, getAccessibleEditPart, getChildren, getCommand, getEditPolicy, getEditPolicyIterator, getEventListeners, getFlag, getModel, getParent, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, refreshChildren, register, registerAccessibility, registerModel, removeChild, removeEditPartListener, removeEditPolicy, setFlag, setFocus, setParent, setSelected, showSourceFeedback, showTargetFeedback, toString, understandsRequest, unregister, unregisterAccessibility, unregisterModel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addNodeListener, getFigure, getSourceConnections, getTargetConnections, removeNodeListener, setLayoutConstraint
addEditPartListener, addNotify, eraseSourceFeedback, eraseTargetFeedback, getChildren, getCommand, getDragTracker, getEditPolicy, getModel, getParent, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, refresh, removeEditPartListener, removeEditPolicy, removeNotify, setFocus, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest
public void setOfficeFloorEditor(AbstractOfficeFloorEditor<?,?> editor)
AbstractOfficeFloorEditor
that contains this
EditPart
.editor
- Editor containing this.public AbstractOfficeFloorEditor<?,?> getEditor()
public void setLocation(org.eclipse.draw2d.geometry.Point location)
Specifies the location for the figure.
This is utilised by MovePositionalModelCommand
.
location
- Location for the figure.public BeanDialog createBeanDialog(Object bean, String... ignoreProperties)
BeanDialog
for the input bean.bean
- Bean.ignoreProperties
- Properties to not be populated.BeanDialog
for the bean.public void messageError(String message)
MessageDialog
.message
- Error message.public void messageError(Throwable error)
Throwable
error details as an error
MessageDialog
.error
- Error.public void messageError(String message, Throwable cause)
MessageDialog
.message
- Error message.cause
- Cause of error.public void messageError(org.eclipse.core.runtime.IStatus status)
IStatus
error.status
- IStatus
error.public void messageWarning(String message)
MessageDialog
.message
- Warning messagepublic void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
protected abstract Class<E> getPropertyChangeEventType()
Enum
type for the property change events.Enum
type for the property change events.protected abstract void handlePropertyChange(E property, PropertyChangeEvent evt)
PropertyChangeEvent
.property
- Enum
property change event.evt
- PropertyChangeEvent
.public org.eclipse.gef.RootEditPart getRoot()
getRoot
in interface org.eclipse.gef.EditPart
getRoot
in class org.eclipse.gef.editparts.AbstractEditPart
protected void createEditPolicies()
createEditPolicies
in class org.eclipse.gef.editparts.AbstractEditPart
protected void populateOfficeFloorDirectEditPolicy(OfficeFloorDirectEditPolicy<M> policy)
OfficeFloorDirectEditPolicy
.policy
- OfficeFloorDirectEditPolicy
to populate.protected void populateOfficeFloorOpenEditPolicy(OfficeFloorOpenEditPolicy<M> policy)
OfficeFloorOpenEditPolicy
.policy
- OfficeFloorOpenEditPolicy
to populate.protected void init()
public void setModel(Object model)
setModel
in interface org.eclipse.gef.EditPart
setModel
in class org.eclipse.gef.editparts.AbstractEditPart
protected org.eclipse.draw2d.IFigure createFigure()
createFigure
in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
public F getOfficeFloorFigure()
Obtains the OfficeFloorFigure
for this EditPart
.
This will lazy create the OfficeFloorFigure
.
OfficeFloorFigure
.protected boolean isFreeformFigure()
Override to indicate that IFigure
needs a
FreeformWrapperFigure
.
By default this will return true
only if the parent
EditPart
is a AbstractOfficeFloorDiagramEditPart
.
Typically this default behaviour will cover most scenarios.
true
if IFigure
needs a
FreeformWrapperFigure
.protected abstract F createOfficeFloorFigure()
OfficeFloorFigure
for this EditPart
.OfficeFloorFigure
.public org.eclipse.draw2d.IFigure getContentPane()
getContentPane
in interface org.eclipse.gef.GraphicalEditPart
getContentPane
in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
protected List<?> getModelChildren()
getModelChildren
in class org.eclipse.gef.editparts.AbstractEditPart
protected void populateModelChildren(List<Object> childModels)
childModels
- List to be populated with the children models.protected List<?> getModelSourceConnections()
getModelSourceConnections
in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
protected void populateConnectionSourceModels(List<Object> models)
models
- List to be populated with Models that are the sources of
connections.protected List<?> getModelTargetConnections()
getModelTargetConnections
in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
protected void populateConnectionTargetModels(List<Object> models)
models
- List to be populated with Models that are the targets of
connections.protected void refreshVisuals()
refreshVisuals
in class org.eclipse.gef.editparts.AbstractEditPart
public M getCastedModel()
protected void executeCommand(OfficeFloorCommand command)
Command
.command
- Command
.public void performRequest(org.eclipse.gef.Request req)
performRequest
in interface org.eclipse.gef.EditPart
performRequest
in class org.eclipse.gef.editparts.AbstractEditPart
public void activate()
activate
in interface org.eclipse.gef.EditPart
activate
in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
public void deactivate()
deactivate
in interface org.eclipse.gef.EditPart
deactivate
in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
public org.eclipse.draw2d.ConnectionAnchor getSourceConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
getSourceConnectionAnchor
in interface org.eclipse.gef.NodeEditPart
public org.eclipse.draw2d.ConnectionAnchor getSourceConnectionAnchor(org.eclipse.gef.Request request)
getSourceConnectionAnchor
in interface org.eclipse.gef.NodeEditPart
public org.eclipse.draw2d.ConnectionAnchor getTargetConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
getTargetConnectionAnchor
in interface org.eclipse.gef.NodeEditPart
public org.eclipse.draw2d.ConnectionAnchor getTargetConnectionAnchor(org.eclipse.gef.Request request)
getTargetConnectionAnchor
in interface org.eclipse.gef.NodeEditPart
Copyright © 2005–2016. All rights reserved.