|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
verinec.gui.core.NwComponent
verinec.gui.core.NwNode
verinec.gui.core.NwHub
public class NwHub
A hub connects a collection of interfaces together.
To add a new hub to the network within the gui, use the NwHub(int,int,int,VerinecStudio) method.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class verinec.gui.core.NwNode |
|---|
NwNode.MoveKeyListener |
| Nested classes/interfaces inherited from class verinec.gui.core.NwComponent |
|---|
NwComponent.Mouse |
| Nested classes/interfaces inherited from class javax.swing.JLabel |
|---|
JLabel.AccessibleJLabel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
private Vector |
wireVector
The wires of this hub. |
| Fields inherited from class verinec.gui.core.NwNode |
|---|
dragged |
| Fields inherited from class verinec.gui.core.NwComponent |
|---|
componentIcon, componentIconNeg, config, drawPanel, gui, pos, selection, type |
| Fields inherited from class javax.swing.JLabel |
|---|
labelFor |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
NwHub(Element config,
VerinecStudio gui)
Initializes the hub from XML, but does not add it to the gui. |
|
NwHub(int posX,
int posY,
int type,
VerinecStudio gui)
Create a new hub at posX/posY. |
|
| Method Summary | |
|---|---|
void |
addWire(NwWire cable)
Connect a wire to the hub. |
protected static Element |
createElement(int posX,
int posY,
int type)
Create a minimal XML configuration for a hub. |
void |
delete()
Deletes the hub and all the wires connected to it, removes the XML from the configuration tree. |
void |
removeWire(NwWire cable)
Deconnects a wire from the hub. |
void |
setBounds(int dx,
int dy,
int w,
int h)
Notifies the wires about the changed coordinates. |
| Methods inherited from class verinec.gui.core.NwNode |
|---|
addNodeinfoElement, createNodeInfo, getLayoutChild, initialize, resizeComponent |
| Methods inherited from class verinec.gui.core.NwComponent |
|---|
addContextMenu, addContextMenuSeparator, changeIcon, getAbsX, getAbsY, getConfig, getDefaultSize, getRandomId, getType, isSelected, moveComponent, resizeDefaultSize, setBounds, setLocation, setLocation, setSelected, showIcon |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Vector wireVector
| Constructor Detail |
|---|
public NwHub(int posX,
int posY,
int type,
VerinecStudio gui)
NetworkTypes.
This constructor registers its XML definition into the verinec studio
and displays the hub in the gui.
posX - The horizontal position of this hub.posY - The vertical position of this hub.type - Network type of the hub, one provided by NetworkTypes.gui - The main application.
public NwHub(Element config,
VerinecStudio gui)
config - The config element of the component.gui - The main application.| Method Detail |
|---|
public final void delete()
delete in class NwComponentpublic final void addWire(NwWire cable)
cable - The wire to be added.public final void removeWire(NwWire cable)
cable - the wire that shall be removed.
public final void setBounds(int dx,
int dy,
int w,
int h)
setBounds in class NwNodedx - Top left corner x coordinate.dy - Top left corner y coordinate.w - New width.h - New height.
protected static Element createElement(int posX,
int posY,
int type)
posX - the x postition of the hub.posY - the y postition of the hub.type - Network type of the hub, one provided by NetworkTypes.
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||