- All Superinterfaces:
AbstractModelComponent
,AbstractModelComponent
,AbstractVisibleComponent
,AbstractVisibleComponent
,Compartment
,ReadOnlyInterface
,WritableInterface
public interface Compartment extends AbstractVisibleComponent, Compartment
-
Method Summary
Modifier and Type Method Description void
addPublicIdentifier(PublicIdentifier publicIdentifier)
Adds a public identifier to the item.default void
addSynonym(String synonym)
Adds a synonym to the item.void
addSynonym(String synonym, String htmlSynonym)
Adds a synonym to the item.void
exchangeSynonyms(int index1, int index2)
Exchanges the position of two synonyms.List<? extends CompartmentItem>
getDiagramItems()
List<? extends CompartmentItem>
getDiagramItems(Diagram diagram)
Metabolite
getMetabolite(String name)
Returns the metabolite node of the given name if available in the compartment, otherwise null.Compartment
getSubCompartment(String name)
Returns a sub compartment of the given name if available in the compartment, otherwise null.List<? extends Metabolite>
metabolites()
Returns an unchangeableList
of all metabolites that occur in this compartment.Compartment
outside()
Returns the outside compartment if available otherwise null.void
removePublicIdentifier(PublicIdentifier publicIdentifier)
Removes the public identifier from the item.void
removeSynonym(int synonymIndex)
Removes the synonym from the item.void
removeSynonym(String synonym)
Removes the synonym from the item.void
setBrushDefault()
Sets the fill brush of the item's shape to default.void
setFont(Font font)
Changes the font of the text label of the item.void
setFontDefault()
Changes the font of the text label of the item.void
setFormattedLabel(String html)
Set items visible label in html.void
setHidden(boolean hidden)
Changes the visibility of the item in the diagram.void
setIdentifier(String identifier)
Changes identifier of the item.void
setPaint(Paint paint)
Sets the fill brush of the item's shape.void
setPublicIdentifiers(Collection<? extends PublicIdentifier> publicIdentifiers)
Set the public identifiers of the item.void
setShape(Shape shape)
Sets the item's shape.void
setShapeDefault()
Sets the item's shape.void
setStrokeColor(Color strokeColor)
Changes the color for the stroke of the item's shape.void
setStrokeColorDefault()
Changes the color for the stroke of the item's shape.void
setStrokeStyle(StrokeStyle strokeStyle)
Changes the paint style for the stroke of the item's shape.void
setStrokeStyleDefault()
Changes the paint style for the stroke of the item's shape.void
setStrokeWidth(double strokeWidth)
Changes the stroke width of the item's shape.void
setStrokeWidthDefault()
Changes the stroke width of the item's shape.default void
setSynonym(int index, String synonymPlain)
Sets the synonym at the given position.void
setSynonym(int index, String synonymPlain, String synonymRichText)
Sets the synonym at the given position.void
setTextBrush(Brush textBrush)
Changes the fill brush of the item's text label.void
setTextBrushDefault()
Changes the fill brush of the item's text label.void
setTextStrokeColor(Color textStrokeColor)
Changes the color for the stroke of the item's text label.void
setTextStrokeColorDefault()
Changes the color for the stroke of the item's text label.void
setTextStrokeWidth(double textStrokeWidth)
Changes the stroke width of the item's text label.void
setTextStrokeWidthDefault()
Changes the stroke width of the item's text label.void
setTransparency(double transparency)
Changes the transparency of the item's shape.void
setTransparencyDefault()
Changes the transparency of the item's shape to default.List<? extends Compartment>
subCompartments()
Returns an unchangeableList
of all sub compartments.Compartment
toReadOnly()
Methods inherited from interface omix.plugin.model.AbstractModelComponent
addChangeListener, addPropertyChangeListener, fieldExists, removeChangeListener, removePropertyChangeListener
Methods inherited from interface omix.plugin.model.writable.AbstractModelComponent
getField, getField, isChangeable, model
Methods inherited from interface omix.plugin.model.AbstractVisibleComponent
accessoryExists, getAccessory, getAccessory, hasDiagramItems, hasDiagramItems
Methods inherited from interface omix.plugin.model.writable.AbstractVisibleComponent
getAccessories, getAccessories, getAccessory, getAccessory, getAllAccessories, getCustomProperty, getMethod, getMethod, getMethod, setCustomProperty, setTmpCustomProperty
Methods inherited from interface omix.plugin.model.Compartment
blur, font, getCustomProperty, getIdentifier, getPublicIdentifiers, hidden, name, paint, setCustomProperty, setTmpCustomProperty, shape, strokeColor, strokeStyle, strokeWidth, synonyms, textBlur, textBrush, textShadow, textStrokeColor, textStrokeWidth, textTransparency, transparency
-
Method Details
-
setIdentifier
Changes identifier of the item.- Parameters:
identifier
- the new name of the item. CAUTION, the name must be unique in the network.- Throws:
ComponentExistsException
IllegalChangeException
-
setFormattedLabel
Set items visible label in html.- Parameters:
html
- item's label in HTML- Throws:
IllegalChangeException
-
setHidden
Changes the visibility of the item in the diagram.- Parameters:
hidden
-- Throws:
IllegalChangeException
-
setPaint
Sets the fill brush of the item's shape.- Parameters:
paint
- the new paint- Throws:
IllegalChangeException
- See Also:
Compartment.paint()
-
setShape
Sets the item's shape.- Parameters:
shape
- the new shape- Throws:
IllegalChangeException
- See Also:
Compartment.shape()
-
setTextStrokeWidth
Changes the stroke width of the item's text label. The text transparency of graphics nodes does not accept null.- Parameters:
textStrokeWidth
-- Throws:
IllegalChangeException
- See Also:
Compartment.textStrokeWidth()
-
setStrokeWidth
Changes the stroke width of the item's shape. The stroke width of graphics nodes does not accept null.- Parameters:
strokeWidth
-- Throws:
IllegalChangeException
- See Also:
Compartment.strokeWidth()
-
setTextBrush
Changes the fill brush of the item's text label.- Parameters:
textBrush
-- Throws:
IllegalChangeException
- See Also:
Compartment.textBrush()
-
setFont
Changes the font of the text label of the item.- Parameters:
font
-- Throws:
IllegalChangeException
- See Also:
Compartment.font()
-
setStrokeStyle
Changes the paint style for the stroke of the item's shape.- Parameters:
strokeStyle
-- Throws:
IllegalChangeException
- See Also:
Compartment.strokeStyle()
-
setTextStrokeColor
Changes the color for the stroke of the item's text label.- Parameters:
textStrokeColor
-- Throws:
IllegalChangeException
- See Also:
Compartment.textStrokeColor()
-
setStrokeColor
Changes the color for the stroke of the item's shape.- Parameters:
strokeColor
-- Throws:
IllegalChangeException
- See Also:
Compartment.strokeColor()
-
setTransparency
Changes the transparency of the item's shape.- Parameters:
transparency
-- Throws:
IllegalChangeException
- See Also:
Compartment.transparency()
-
setBrushDefault
Sets the fill brush of the item's shape to default.- Parameters:
brush
- the new brush- Throws:
IllegalChangeException
- See Also:
Compartment.brush()
-
setShapeDefault
Sets the item's shape.- Throws:
IllegalChangeException
- See Also:
Compartment.shape()
-
setTextStrokeWidthDefault
Changes the stroke width of the item's text label.- Throws:
IllegalChangeException
- See Also:
Compartment.textStrokeWidth()
-
setStrokeWidthDefault
Changes the stroke width of the item's shape.- Throws:
IllegalChangeException
- See Also:
Compartment.strokeWidth()
-
setTextBrushDefault
Changes the fill brush of the item's text label.- Throws:
IllegalChangeException
- See Also:
Compartment.textBrush()
-
setFontDefault
Changes the font of the text label of the item.- Throws:
IllegalChangeException
- See Also:
Compartment.font()
-
setStrokeStyleDefault
Changes the paint style for the stroke of the item's shape.- Throws:
IllegalChangeException
- See Also:
Compartment.strokeStyle()
-
setTextStrokeColorDefault
Changes the color for the stroke of the item's text label.- Throws:
IllegalChangeException
- See Also:
Compartment.textStrokeColor()
-
setStrokeColorDefault
Changes the color for the stroke of the item's shape.- Throws:
IllegalChangeException
- See Also:
Compartment.strokeColor()
-
setTransparencyDefault
Changes the transparency of the item's shape to default.- Throws:
IllegalChangeException
- See Also:
Compartment.transparency()
-
addSynonym
Adds a synonym to the item.- Parameters:
synonym
-- Throws:
IllegalChangeException
-
addSynonym
Adds a synonym to the item.- Parameters:
synonym
-html
-- Throws:
IllegalChangeException
-
removeSynonym
Removes the synonym from the item.- Parameters:
synonym
-- Throws:
IllegalChangeException
-
removeSynonym
Removes the synonym from the item.- Parameters:
synonym
- index- Throws:
IllegalChangeException
-
exchangeSynonyms
Exchanges the position of two synonyms.- Parameters:
index1
-index2
-- Throws:
IllegalChangeException
-
setSynonym
Sets the synonym at the given position.- Parameters:
index
-synonymPlain
- plain text- Throws:
IllegalChangeException
-
setSynonym
void setSynonym(int index, String synonymPlain, String synonymRichText) throws IllegalChangeExceptionSets the synonym at the given position.- Parameters:
index
-synonymPlain
- plain textsynonymRichText
- rich text- Throws:
IllegalChangeException
-
addPublicIdentifier
Adds a public identifier to the item.- Parameters:
publicIdentifier
-- Throws:
IllegalChangeException
-
setPublicIdentifiers
void setPublicIdentifiers(Collection<? extends PublicIdentifier> publicIdentifiers) throws IllegalChangeExceptionSet the public identifiers of the item.- Parameters:
publicIdentifiers
-- Throws:
IllegalChangeException
-
removePublicIdentifier
Removes the public identifier from the item.- Parameters:
publicIdentifier
-- Throws:
IllegalChangeException
-
subCompartments
List<? extends Compartment> subCompartments()Returns an unchangeableList
of all sub compartments.- Specified by:
subCompartments
in interfaceCompartment
- Returns:
- sub compartments
-
outside
Compartment outside()Returns the outside compartment if available otherwise null.- Specified by:
outside
in interfaceCompartment
- Returns:
- outside compartment
-
metabolites
List<? extends Metabolite> metabolites()Returns an unchangeableList
of all metabolites that occur in this compartment.- Specified by:
metabolites
in interfaceCompartment
- Returns:
- all metabolites
-
getMetabolite
Returns the metabolite node of the given name if available in the compartment, otherwise null.- Specified by:
getMetabolite
in interfaceCompartment
- Parameters:
name
- of metabolite node- Returns:
- found metabolite node
-
getSubCompartment
Returns a sub compartment of the given name if available in the compartment, otherwise null.- Specified by:
getSubCompartment
in interfaceCompartment
- Parameters:
name
- of sub compartment- Returns:
- found sub compartment
-
getDiagramItems
List<? extends CompartmentItem> getDiagramItems()- Specified by:
getDiagramItems
in interfaceAbstractVisibleComponent
- Specified by:
getDiagramItems
in interfaceAbstractVisibleComponent
- Specified by:
getDiagramItems
in interfaceCompartment
-
getDiagramItems
- Specified by:
getDiagramItems
in interfaceAbstractVisibleComponent
- Specified by:
getDiagramItems
in interfaceAbstractVisibleComponent
- Specified by:
getDiagramItems
in interfaceCompartment
-
toReadOnly
Compartment toReadOnly()- Specified by:
toReadOnly
in interfaceAbstractModelComponent
- Specified by:
toReadOnly
in interfaceAbstractVisibleComponent
- Specified by:
toReadOnly
in interfaceWritableInterface
-