|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.usc.cse.desi.model.AbstractDESIModel
edu.usc.cse.desi.model.view.AbstractViewModel
edu.usc.cse.desi.model.view.AbstractNodeViewModel
edu.usc.cse.desi.model.view.ComponentViewModel
| Field Summary | |
(package private) int |
myNumExternalConnections
|
(package private) AbstractNodeViewModel |
myParent
|
private ComponentDataModel |
myXADLModel
|
| Fields inherited from class edu.usc.cse.desi.model.view.AbstractNodeViewModel |
C_DISPLAY_IMAGEDATA, C_DISPLAY_MODELDATA, myBGColor, myBorderWidth, myChildren, myConnections, myFigPosX, myFigPosY, myFigSizeH, myFigSizeW, P_DISPLAY_FIGLOCATION_X, P_DISPLAY_FIGLOCATION_Y, P_DISPLAY_FIGSIZE_H, P_DISPLAY_FIGSIZE_W, P_DISPLAY_NUMCHILDREN, P_DISPLAY_NUMCONNECTIONS, P_ID_FIGLOCATION_X, P_ID_FIGLOCATION_Y, P_ID_FIGSIZE_H, P_ID_FIGSIZE_W, P_ID_NUMCHILDREN, P_ID_NUMCONNECTIONS |
| Fields inherited from class edu.usc.cse.desi.model.view.AbstractViewModel |
myDataModel |
| Fields inherited from class edu.usc.cse.desi.model.AbstractDESIModel |
listeners |
| Constructor Summary | |
ComponentViewModel()
|
|
ComponentViewModel(PropertyInitializer prop_init)
THis constructor is for use when a data model does not already exist and you want to create one. |
|
| Method Summary | |
void |
addComponent(ComponentViewModel comp)
This is the public version of addComponent which adds a Sub Component to this component. |
void |
addConnection(LogicalLinkViewModel link)
The public version of addConnection, this method should be called to when a logical link is connected. |
void |
addForbiddenCoLocationConstraint(ComponentViewModel comp)
|
void |
addForbiddenLocationConstraint(HostViewModel host)
|
void |
addRequiredCoLocationConstraint(ComponentViewModel comp)
|
void |
colorLinksBlack()
When called, this method will change the color of all attached links to black. |
void |
colorLinksRed()
When called, this method will change the color of all attached links to red. |
void |
finalize()
Just to make sure that nothing keeps this class as a listener after the object has been eliminated. |
java.util.List |
getForbiddenCoLocationComponents()
|
java.util.List |
getForbiddenLocationHosts()
|
AbstractNodeViewModel |
getMyParent()
Gets the parent that contains this component. |
ComponentDataModel |
getMyXADLModel()
|
java.util.List |
getRequiredCoLocationComponents()
|
HostViewModel |
getRequiredLocationHost()
|
void |
initialize(ComponentDataModel model)
Initialize is to be called after the constuctor when a view model is being created on top of an existing data model. |
private void |
privateAddComponent(ComponentViewModel component)
Adds a sub-component to this component, if it has not already been added. |
private void |
privateAddConnection(LogicalLinkViewModel link)
Adds a new logical link to this component. |
private void |
privateRemoveComponent(ComponentViewModel component)
Removes a sub-component from this component, if sub-component has not already been added. |
private void |
privateRemoveConnection(LogicalLinkViewModel link)
Removes a connection from this component, if connection has already been added. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
On propertyChange, this class will respond to any additions or subtractions of components or connections by the ComponentDataModel. |
void |
reinitialize()
Reinitialize all sub-components and connections. |
void |
removeComponent(ComponentViewModel comp)
This is the public version of removeComponent which removes a Sub Component from this component. |
void |
removeConnection(LogicalLinkViewModel link)
The public version of removeConnection, this method should be called to when a logical link is disconnected. |
void |
removeForbiddenCoLocationConstraint(ComponentViewModel comp)
|
void |
removeForbiddenLocationConstraint(HostViewModel host)
|
void |
removeRequiredCoLocationConstraint(ComponentViewModel comp)
|
void |
removeRequiredLocationConstraint()
|
void |
setMyParent(AbstractNodeViewModel model)
Sets the parent of this component; the host or the super-component. |
void |
setMyXADLModel(ComponentDataModel myXADLModel)
Set the xADL ComponentDataModel that is associated with this component. |
void |
setPropertyValue(java.lang.String prop_name,
java.lang.Object value)
I overrode this method: |
void |
setRequiredLocationConstraint(HostViewModel host)
|
| Methods inherited from class edu.usc.cse.desi.model.view.AbstractViewModel |
getMyDataModel |
| Methods inherited from class edu.usc.cse.desi.model.AbstractDESIModel |
addPropertyChangeListener, firePropertyChange, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
AbstractNodeViewModel myParent
int myNumExternalConnections
private transient ComponentDataModel myXADLModel
| Constructor Detail |
public ComponentViewModel(PropertyInitializer prop_init)
prop_init - public ComponentViewModel()
| Method Detail |
public void initialize(ComponentDataModel model)
model - public void reinitialize()
reinitialize in class AbstractNodeViewModelAbstractDESIModel.reinitialize()
public void finalize()
throws java.lang.Throwable
java.lang.Throwablepublic void colorLinksRed()
public void colorLinksBlack()
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerpropertyChange in class AbstractDESIModelprivate void privateAddConnection(LogicalLinkViewModel link)
link - LogicalLinkViewModelpublic void addConnection(LogicalLinkViewModel link)
link - private void privateRemoveConnection(LogicalLinkViewModel link)
link - LogicalLinkViewModelpublic void removeConnection(LogicalLinkViewModel link)
link - private void privateAddComponent(ComponentViewModel component)
component - ComponentViewModelpublic void addComponent(ComponentViewModel comp)
comp - private void privateRemoveComponent(ComponentViewModel component)
component - ComponentViewModelpublic void removeComponent(ComponentViewModel comp)
comp - public AbstractNodeViewModel getMyParent()
public void setMyParent(AbstractNodeViewModel model)
model - AbstractNodeViewModelpublic void setMyXADLModel(ComponentDataModel myXADLModel)
myXADLModel - The myXADLModel to set.public ComponentDataModel getMyXADLModel()
public void setPropertyValue(java.lang.String prop_name,
java.lang.Object value)
throws PropertyNotFoundException,
java.lang.ClassCastException
setPropertyValue in class AbstractNodeViewModelPropertyNotFoundException
java.lang.ClassCastExceptionAbstractViewModel.setPropertyValue(java.lang.String, java.lang.Object)public void addForbiddenCoLocationConstraint(ComponentViewModel comp)
public void addRequiredCoLocationConstraint(ComponentViewModel comp)
public void addForbiddenLocationConstraint(HostViewModel host)
public java.util.List getForbiddenCoLocationComponents()
public java.util.List getForbiddenLocationHosts()
public java.util.List getRequiredCoLocationComponents()
public HostViewModel getRequiredLocationHost()
public void setRequiredLocationConstraint(HostViewModel host)
public void removeForbiddenCoLocationConstraint(ComponentViewModel comp)
public void removeRequiredCoLocationConstraint(ComponentViewModel comp)
public void removeForbiddenLocationConstraint(HostViewModel host)
public void removeRequiredLocationConstraint()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||