simulation
Class DetailWindow
java.lang.Object
simulation.DetailWindow
- public class DetailWindow
- extends java.lang.Object
- Author:
- Nels, Vivek, Gordon
Started Dec 1, 2003
|
Field Summary |
private org.eclipse.draw2d.Figure |
contents
|
private org.eclipse.swt.widgets.Display |
disp
|
private org.eclipse.draw2d.LightweightSystem |
lws
|
private org.eclipse.draw2d.IFigure |
panel
|
private org.eclipse.draw2d.ScrollPane |
scrollpane
|
private SelectionDetailFigure |
sdf
|
private org.eclipse.swt.widgets.Shell |
shell
|
|
Constructor Summary |
DetailWindow(org.eclipse.swt.widgets.Display d,
ComponentFigure com)
This constructor should be called when you want to display the
details for a component. |
DetailWindow(org.eclipse.swt.widgets.Display d,
HostFigure host)
This constructor should be called when you want to display the
details for a Host. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
shell
private org.eclipse.swt.widgets.Shell shell
disp
private org.eclipse.swt.widgets.Display disp
lws
private org.eclipse.draw2d.LightweightSystem lws
panel
private org.eclipse.draw2d.IFigure panel
scrollpane
private org.eclipse.draw2d.ScrollPane scrollpane
contents
private org.eclipse.draw2d.Figure contents
sdf
private SelectionDetailFigure sdf
DetailWindow
public DetailWindow(org.eclipse.swt.widgets.Display d,
HostFigure host)
- This constructor should be called when you want to display the
details for a Host.
- Parameters:
d - The Diplay that we are using.host - The HostFigure that you want to display detials on.
DetailWindow
public DetailWindow(org.eclipse.swt.widgets.Display d,
ComponentFigure com)
- This constructor should be called when you want to display the
details for a component.
- Parameters:
d - The Diplay that we are using.com - The ComponentFigure that you want to display detials on.
initHost
private void initHost(HostFigure original_host)
initH2HLinks
private void initH2HLinks(HostFigure host)
getH2HLinks
private java.util.LinkedList getH2HLinks(int id)
initComponentLinks
private void initComponentLinks(ComponentFigure old_com,
ComponentFigure new_com)
getAnchorPoint
private org.eclipse.draw2d.geometry.Point getAnchorPoint(int c_x,
org.eclipse.draw2d.Figure fig)
- This method will return a point located on a Figure (either
a Host or a Component) depending where in the entire perimeter
of the figure that connection should lie.
(This makes a lot more sense if you look at the methods that
call this method.)
- Parameters:
c_x - A distance from one side of the perimeter to the other.fig - The Figure that the point will be located on.
- Returns:
- The point where the anchor should be connected.
searchHostComponents
private ComponentFigure searchHostComponents(HostFigure host,
int id)
- Searches through all the children of this host figure and returns
the one with the given componentID. Should probably only be called if
this has been called with the Host version of the constructor, but
will still work otherwise. (Returns null if it cannont find this
component.)
- Parameters:
host - The HostFigure to search through.id - The id of the component we are looking for.
- Returns:
- The Component figure in the host with the given id, or null if it doesn't exisit.
initCom
private void initCom(ComponentFigure original_com)
initWindow
private void initWindow()
display
public void display()