Package se.conciliate.extensions.store
Interface MTCompleteVertex
- All Superinterfaces:
Comparable<MTNamedObject>
,MTHistoryEnabled
,MTNamedObject
,MTVertex
,MTVertexHeader
Part of a
MTCompleteModel
, which can be obtained by
calling loadCompleteModel()
on a MTModelHeader
.
Note that the interface extends MTVertex
and that using
the "find" methods in this interface will still access the database.-
Method Summary
Modifier and TypeMethodDescriptioncopy
(MTCompleteModel model) Copies this vertex and returns the result.copy
(MTCompleteModel model, boolean keepIdentity) Copies the vertex to another model in the same way as copy(model), but keeping the identity (UUID) and history of the vertex.copy
(MTCompleteModel model, MTCompleteSymbol symbol) Copies this vertex and returns the result.void
copyAttributes
(MTVertex vertex) getCachedImage
(boolean block) Returns a drawable for rendering the vertex.getLayer()
Returns the layer that this vertex is in.getModel()
Returns the symbol that this vertex represents.void
queueRemove
(MTRemoteChangeHandler exceptionHandler) Puts this vertex up for removal at some future point in time, making this call safe to do from the event dispatch thread.void
remove()
Removes this vertex.Methods inherited from interface se.conciliate.extensions.store.MTHistoryEnabled
getHistory, getID, getUUID
Methods inherited from interface se.conciliate.extensions.store.MTNamedObject
compareTo, getID, getParentRevisionID, getUUID
Methods inherited from interface se.conciliate.extensions.store.MTVertex
getColorTransformer, getProperty, getPropertyKeys, getPropertyProviders, getTitle, getTitle, prepareSave, queueSave, removeProperty, save, setBorderColor, setBorderStroke, setBounds, setBounds, setCenterLabel, setColorTransformer, setDefaultLabelBounds, setDefaultLabelBounds, setDefaultLabelBounds, setFrozen, setHolder, setImageURL, setLabelBounds, setLabelBounds, setLabelColor, setLabelFont, setLockedProportions, setOwningSymbol, setOwningSymbol, setProperty, setShowLabel, setSize, setSize, setSizeRatio, setSymbol, setZOrder
Methods inherited from interface se.conciliate.extensions.store.MTVertexHeader
expand, getBorderColor, getBorderStroke, getBounds, getID, getImageURL, getLabelBounds, getLabelBounds, getLabelColor, getLabelFont, getLanguages, getModelID, getSizeRatio, getSymbolID, getType, getUUID, getVariant, getZOrder, isBreakdownSymbol, isCenterLabel, isFrozen, isHolder, isLockedProportions, isManualLabelColor, isOwningSymbol, isShowLabel
-
Method Details
-
getCachedImage
BufferedImage getCachedImage() -
getCachedImage
-
getModel
MTCompleteModel getModel() -
getSymbol
MTCompleteSymbol getSymbol()Description copied from interface:MTVertex
Returns the symbol that this vertex represents. -
getLayer
MTCompleteLayer getLayer()Description copied from interface:MTVertex
Returns the layer that this vertex is in. -
getInEdges
Collection<MTCompleteEdge> getInEdges() -
getOutEdges
Collection<MTCompleteEdge> getOutEdges() -
copy
MTCompleteVertex copy(MTCompleteModel model, MTCompleteSymbol symbol) throws IllegalArgumentException, NullPointerException Copies this vertex and returns the result. The copy will have it's model reference set to the model parameter and it's symbol reference set to the symbol parameter. If any layer has a rule concerning this vertex's symbol type, the vertex will be placed in that layer of the supplied model.
The resulting copy will be added to the model parameter.
NOTE: This method will not persist the vertex to storage. The returned value must be saved in a separate call. Implementations that create other persistable entities must however make sure that these are persisted asynchronously or persisted by the next call to #save(). Callers must thus always persist the returned value by calling save on the returned value, but should never have to figure out what other possible things that might need a #save(). NOTE: The copy will be a new, unique, copy of this vertex. It will not have the same identity in storage (new id, new uuid). This means that the returned value will NOT be equal to this. It is thus NOT a clone.- Parameters:
model
- The model that the copy should be a part of. May be the same model as this vertex's model.symbol
- The symbol- Returns:
- The new unique copy of this vertex
- Throws:
IllegalArgumentException
- if thesymbol
's SymbolType is not equals to this vertex's symbol's symbol type. This can be check by callingsymbol.getType().equals(vertexToCopy.getSymbol().getType());
NullPointerException
- if any of the arguments are null
-
copy
Copies this vertex and returns the result. The copy will have it's model reference set to the model parameter. If any layer has a rule concerning this vertex's symbol type, the vertex will be placed in that layer of the supplied model.
The resulting copy will be added to the model parameter.
NOTE: This method will not persist the vertex to storage. The returned value must be saved in a separate call. Implementations that create other persistable entities must however make sure that these are persisted asynchronously or persisted by the next call to #save(). Callers must thus always persist the returned value by calling save on the returned value, but should never have to figure out what other possible things that might need a #save(). NOTE: The copy will be a new, unique, copy of this vertex. It will not have the same identity in storage (new id, new uuid). This means that the returned value will NOT be equal to this. It is thus NOT a clone.- Parameters:
model
- The model that the copy should be a part of. May be the same model as this vertex's model.- Returns:
- a new unique copy of this vertex.
-
copy
Copies the vertex to another model in the same way as copy(model), but keeping the identity (UUID) and history of the vertex. This should generally only be used for revision management where the same vertex exists in different revisions of the model. In all other cases different vertices should have different UUID:s even when referring to the same symbol. -
copyAttributes
-
queueRemove
Puts this vertex up for removal at some future point in time, making this call safe to do from the event dispatch thread.- Parameters:
exceptionHandler
- an exception handler that is called if an exception is raised during remove, or null to let the saving thread's own exception handler deal with an uncaught (wrapping) runtime exception.- Since:
- 3.2
- See Also:
-
remove
Removes this vertex. This will not remove the symbol that the vertex is showing, nor will it remove any edges connected to the vertex.- Throws:
MTAccessException
MTRemoteChangeException
- Since:
- 3.0
-
getDrawable
Drawable getDrawable()Returns a drawable for rendering the vertex.- Returns:
- A drawable for the vertex.
-