|
|||||||||||
| 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.ComponentFigure
This figure represents a component inside a host in the View.
| Nested Class Summary | |
(package private) static class |
ComponentFigure.Dragger
This private class tells the Component 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 org.eclipse.swt.graphics.Color |
classColor
The Component background color. |
private int |
componentID
The ID of this component. |
private java.util.LinkedList |
connected_components
A linked list that contains ints. |
private DetailListener |
dListenter
|
private boolean |
is_movable
A boolean that says if the ComponentFigure can be Moved. |
private double |
memory
The amount of memory this component requires. |
private int |
parentHostID
The ID of the host that contains this component. |
| 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 | |
ComponentFigure(int id,
int host_id,
double Cmem,
int x_pos,
int y_pos,
int w,
int h)
Creates a new Component with the given properties. |
|
| Method Summary | |
void |
addDetailListener(DetailListener dl)
Sets the detail listener of this component to the one passed to it. |
void |
addToConnectedComponents(int com_id)
This method adds a component id to the connected_components linked list. |
boolean |
connectedToCom(int com_id)
Returns true if this component is connected to the component with the given id. |
int |
getComponentID()
Gets the ID of this component. |
double |
getComponentMemory()
Returns the amount of memory that this component requires. |
java.util.LinkedList |
getConnectedComponents()
|
DetailListener |
getDetailListener()
Gets the detail listener of this component. |
boolean |
getIsMovable()
Returns whether or not this ComponentFigure can be moved. |
int |
getParentHostID()
Get the ID of this component's host. |
void |
removeFromConnectedComponents(int com_id)
This method removes a component id from the connected_components linked list. |
void |
setComponentID(int id)
Set a id for this compoent. |
void |
setComponentMemory(double mem)
Set the amount of memory that this component requires. |
void |
setIsMovable(boolean b)
Sets whether or not the Component figure is movable. |
void |
setParentHostID(int id)
Set a new parent host id for this component. |
void |
setQuality(double quality)
This method will set the color of the component 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 componentID
private int parentHostID
private double memory
private boolean is_movable
private java.util.LinkedList connected_components
private DetailListener dListenter
| Constructor Detail |
public ComponentFigure(int id,
int host_id,
double Cmem,
int x_pos,
int y_pos,
int w,
int h)
id - The ID number of this component.host_id - The ID number of the host that contains this component.Cmem - The memory that this component takes up.x_pos - The x cordinate of the point where this figure should be placed.y_pos - The y cordinate of the point where this figure should be placed.w - The width of this figure.h - The height of this figure.| Method Detail |
public void setParentHostID(int id)
id - The new parent host id.public int getParentHostID()
public int getComponentID()
public void setComponentID(int id)
id - The new id of this component.public void setIsMovable(boolean b)
b - A boolean which says whether or not the Component can be moved.public boolean getIsMovable()
public double getComponentMemory()
public void setComponentMemory(double mem)
mem - The memory that this component will require.public void addDetailListener(DetailListener dl)
dl - The new Detail listener of this HostFigure.public DetailListener getDetailListener()
public java.util.LinkedList getConnectedComponents()
public void addToConnectedComponents(int com_id)
com_id - The id of the component that this component has connected to.public void removeFromConnectedComponents(int com_id)
com_id - The id of the component that this component is no longer conneced to.public boolean connectedToCom(int com_id)
com_id - The id of the component that you are checking for links with.
public void setQuality(double quality)
quality - A double between 0.0 and 1.0.
|
|||||||||||
| PREV CLASS | |||||||||||