|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.gef.editparts.AbstractEditPart
org.eclipse.gef.editparts.AbstractGraphicalEditPart
net.officefloor.eclipse.common.editparts.AbstractOfficeFloorEditPart<M,E,F>
public abstract class AbstractOfficeFloorEditPart<M extends Model,E extends Enum<E>,F extends OfficeFloorFigure>
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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
|---|
org.eclipse.gef.editparts.AbstractGraphicalEditPart.AccessibleGraphicalEditPart, org.eclipse.gef.editparts.AbstractGraphicalEditPart.DefaultAccessibleAnchorProvider |
| Nested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractEditPart |
|---|
org.eclipse.gef.editparts.AbstractEditPart.EditPolicyIterator |
| Field Summary |
|---|
| Fields inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
|---|
figure, sourceConnections, targetConnections |
| Fields inherited from class org.eclipse.gef.editparts.AbstractEditPart |
|---|
children, FLAG_ACTIVE, FLAG_FOCUS, MAX_FLAG |
| Fields inherited from interface org.eclipse.gef.EditPart |
|---|
SELECTED, SELECTED_NONE, SELECTED_PRIMARY |
| Fields inherited from interface org.eclipse.gef.RequestConstants |
|---|
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 Summary | |
|---|---|
AbstractOfficeFloorEditPart()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
|---|
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 |
| Methods inherited from class org.eclipse.gef.editparts.AbstractEditPart |
|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.gef.GraphicalEditPart |
|---|
addNodeListener, getFigure, getSourceConnections, getTargetConnections, removeNodeListener, setLayoutConstraint |
| Methods inherited from interface org.eclipse.gef.EditPart |
|---|
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 |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
|---|
getAdapter |
| Constructor Detail |
|---|
public AbstractOfficeFloorEditPart()
| Method Detail |
|---|
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 PropertyChangeListenerprotected 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.EditPartgetRoot in class org.eclipse.gef.editparts.AbstractEditPartprotected void createEditPolicies()
createEditPolicies in class org.eclipse.gef.editparts.AbstractEditPartprotected 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.EditPartsetModel in class org.eclipse.gef.editparts.AbstractEditPartprotected org.eclipse.draw2d.IFigure createFigure()
createFigure in class org.eclipse.gef.editparts.AbstractGraphicalEditPartpublic 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.GraphicalEditPartgetContentPane in class org.eclipse.gef.editparts.AbstractGraphicalEditPartprotected List<?> getModelChildren()
getModelChildren in class org.eclipse.gef.editparts.AbstractEditPartprotected void populateModelChildren(List<Object> childModels)
childModels - List to be populated with the children models.protected List<?> getModelSourceConnections()
getModelSourceConnections in class org.eclipse.gef.editparts.AbstractGraphicalEditPartprotected 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.AbstractGraphicalEditPartprotected 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.AbstractEditPartpublic M getCastedModel()
protected void executeCommand(OfficeFloorCommand command)
Command.
command - Command.public void performRequest(org.eclipse.gef.Request req)
performRequest in interface org.eclipse.gef.EditPartperformRequest in class org.eclipse.gef.editparts.AbstractEditPartpublic void activate()
activate in interface org.eclipse.gef.EditPartactivate in class org.eclipse.gef.editparts.AbstractGraphicalEditPartpublic void deactivate()
deactivate in interface org.eclipse.gef.EditPartdeactivate in class org.eclipse.gef.editparts.AbstractGraphicalEditPartpublic org.eclipse.draw2d.ConnectionAnchor getSourceConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
getSourceConnectionAnchor in interface org.eclipse.gef.NodeEditPartpublic org.eclipse.draw2d.ConnectionAnchor getSourceConnectionAnchor(org.eclipse.gef.Request request)
getSourceConnectionAnchor in interface org.eclipse.gef.NodeEditPartpublic org.eclipse.draw2d.ConnectionAnchor getTargetConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
getTargetConnectionAnchor in interface org.eclipse.gef.NodeEditPartpublic org.eclipse.draw2d.ConnectionAnchor getTargetConnectionAnchor(org.eclipse.gef.Request request)
getTargetConnectionAnchor in interface org.eclipse.gef.NodeEditPart
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||