|
|||||||||||
| 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.HostViewModel
A model of a Host which contains the information necessary to display this model onscreen.
| Nested Class Summary | |
private class |
HostViewModel.ConnectionPair
Private class, used only for the myMissingConnections hash table in the HostViewModel. |
| Field Summary | |
private java.util.HashMap |
myMissingConnections
|
private java.util.BitSet |
myPointBitSet
|
private HostDataModel |
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 | |
|
HostViewModel()
|
private |
HostViewModel(HostDataModel model)
|
|
HostViewModel(PropertyInitializer prop_init)
This will be a constructor that can be called if there is no preexisting data model. |
| Method Summary | |
void |
addComponent(ComponentViewModel comp)
This is the public version of add component and it will add a new component to this host. |
void |
addConnection(PhysicalLinkViewModel link)
This is the public version of addConnection and it will add a physical link to this host when the host is connected. |
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. |
HostDataModel |
getMyXADLModel()
|
void |
initialize(HostDataModel model)
Initialize is called when a view model object is created on a data model object. |
void |
layoutComponents()
Call this method and all the children will be put in their proper place in the layout. |
private void |
privateAddComponent(ComponentViewModel component)
Adds the component to the host if it is not already added to the host. |
private void |
privateAddConnection(PhysicalLinkViewModel link)
Adds a link to this host if the link is not already added. |
private void |
privateRemoveComponent(ComponentViewModel component)
Removes the component from the host if it has already been added to the host. |
private void |
privateRemoveConnection(PhysicalLinkViewModel link)
Removes the link from the host. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
On propertyChange, this class will respond to any additions or subtractions of components or connections by the HostDataModel. |
void |
reinitialize()
Reinitialize all sub-components and connections. |
void |
removeAllComponents()
Remove every component contained by this host. |
void |
removeComponent(ComponentViewModel comp)
This is the public version of removeComponent and it will remove a component from the host. |
void |
removeConnection(PhysicalLinkViewModel link)
This is teh public version of remove connection and it will remove a physical link from connecting this host. |
void |
setMyXADLModel(HostDataModel myXADLModel)
Set this property with a xADL model if you are running on top of a xADL file. |
void |
setPropertyValue(java.lang.String prop_name,
java.lang.Object value)
I overrode this method: |
| 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 |
private java.util.BitSet myPointBitSet
private java.util.HashMap myMissingConnections
private transient HostDataModel myXADLModel
| Constructor Detail |
public HostViewModel(PropertyInitializer prop_init)
public HostViewModel()
private HostViewModel(HostDataModel model)
| Method Detail |
public void initialize(HostDataModel model)
model - public void reinitialize()
reinitialize in class AbstractNodeViewModelAbstractDESIModel.reinitialize()public void setMyXADLModel(HostDataModel myXADLModel)
myXADLModel - The myXADLModel to set.public HostDataModel getMyXADLModel()
public void finalize()
throws java.lang.Throwable
java.lang.Throwablepublic void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerpropertyChange in class AbstractDESIModelprivate void privateAddConnection(PhysicalLinkViewModel link)
link - PhysicalLinkViewModelpublic void addConnection(PhysicalLinkViewModel link)
link - private void privateRemoveConnection(PhysicalLinkViewModel link)
link - PhysicalLinkViewModelpublic void removeConnection(PhysicalLinkViewModel link)
link -
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 layoutComponents()
public void colorLinksRed()
public void colorLinksBlack()
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 void removeAllComponents()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||