|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.draw2d.Figure
org.eclipse.draw2d.Shape
org.eclipse.draw2d.RectangleFigure
simulation.HostFigure
The HostFigure class represents a host onscreen.
| Nested Class Summary | |
(package private) static class |
HostFigure.Dragger
This private class tells the HostFigure what to do when it is dragged. |
| Nested classes inherited from class org.eclipse.draw2d.Figure |
org.eclipse.draw2d.Figure.FigureIterator, org.eclipse.draw2d.Figure.IdentitySearch |
| Nested classes inherited from class org.eclipse.draw2d.IFigure |
org.eclipse.draw2d.IFigure.NoInsets |
| Field Summary | |
static int |
borderRoom
borderRoom contains the amount of excess room that will be placed around new components as they are added. |
static org.eclipse.swt.graphics.Color |
classColor
The Host background color. |
private DetailListener |
dListenter
|
private org.eclipse.draw2d.Figure |
host_contents
This Figure is the pane that contains all ComponentFigures that are to be added to the host. |
private int |
hostID
Host id number. |
private boolean |
is_movable
A boolean that says if the HostFigure can be Moved. |
private double |
memory
The total memory of the host. |
private int |
num_of_components
The number of components that the host contains. |
| Fields inherited from class org.eclipse.draw2d.Shape |
lineStyle, lineWidth |
| Fields inherited from class org.eclipse.draw2d.Figure |
bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip |
| Fields inherited from interface org.eclipse.draw2d.IFigure |
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS |
| Constructor Summary | |
HostFigure(int host_id,
double mem,
int x_pos,
int y_pos,
int width,
int height)
Creates a new HostFigure. |
|
| Method Summary | |
void |
addComponent(ComponentFigure com_fig)
This method will add the given function to this host's host_contents Figure. |
void |
addDetailListener(DetailListener dl)
Sets the detail listener of this Host to the one passed to it. |
void |
cleanupHostContents()
This method goes through all the components contained in this host, and rearranges them in to a pretty looking layout again. |
DetailListener |
getDetailListener()
Gets the detail listener of this Host. |
org.eclipse.draw2d.Figure |
getHostContents()
This method returns the host_contents Figure that contains all the components and links that are inside this host. |
int |
getHostID()
Returns the Host's ID number. |
boolean |
getIsMovable()
Returns whether or not this HostFigure can be moved. |
double |
getMemory()
Return the amount of memory that this host has. |
int |
getNumOfComponents()
Returns the number of components this host has. |
void |
setHostID(int id)
Set the host ID number. |
void |
setIsMovable(boolean b)
Sets whether or not the Host figure is movable. |
void |
setMemory(double hostmemory)
Sets a new amount of memory for the Host. |
void |
setNumOfComponents(int num)
Sets the number of components that this host has. |
void |
setQuality(double quality)
This method will set the color of the host based on its "quality" as determined by a double between 0.0 and 1.0. |
| Methods inherited from class org.eclipse.draw2d.RectangleFigure |
fillShape, outlineShape |
| Methods inherited from class org.eclipse.draw2d.Shape |
getLineStyle, getLineWidth, isOpaque, paintFigure, setFill, setFillXOR, setLineStyle, setLineWidth, setOutline, setOutlineXOR, setXOR |
| Methods inherited from class org.eclipse.draw2d.Figure |
add, add, add, add, addAncestorListener, addFigureListener, addFocusListener, addKeyListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isEnabled, isFocusTraversable, isMouseEventTarget, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, paint, paintBorder, paintChildren, paintClientArea, primTranslate, remove, removeAll, removeAncestorListener, removeFigureListener, removeFocusListener, removeKeyListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setConstraint, setCursor, setEnabled, setFlag, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static org.eclipse.swt.graphics.Color classColor
private int hostID
private double memory
private int num_of_components
private org.eclipse.draw2d.Figure host_contents
private boolean is_movable
public static int borderRoom
private DetailListener dListenter
| Constructor Detail |
public HostFigure(int host_id,
double mem,
int x_pos,
int y_pos,
int width,
int height)
host_id - The Host's ID number.mem - The Total host memory.x_pos - The x position of the HostFigure.y_pos - The y position of the HostFigure.width - The width of the HostFigure.height - The height of the HostFigure.| Method Detail |
public void addComponent(ComponentFigure com_fig)
com_fig - The ComponentFigure that is to be added to this Host.public void cleanupHostContents()
public void setHostID(int id)
id - New Host ID number.public boolean getIsMovable()
public void setIsMovable(boolean b)
b - A boolean which says whether or not the Host can be moved.public int getHostID()
public void addDetailListener(DetailListener dl)
dl - The new Detail listener of this HostFigure.public DetailListener getDetailListener()
public int getNumOfComponents()
public void setNumOfComponents(int num)
num - The new number of components.public void setMemory(double hostmemory)
hostmemory - New memory amount.public double getMemory()
public org.eclipse.draw2d.Figure getHostContents()
public void setQuality(double quality)
quality - A double between 0.0 and 1.0.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | |||||||||||