|
|||||||||
| 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.NwInterface
public abstract class NwInterface
This class offers standard implementations of methods that every interface must contain. An interface must know its node and its bindings. It also computes positions for new bindings for that interface.
| Nested Class Summary |
|---|
| 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 | |
|---|---|
protected PCNode |
owner
The node this interface belongs to. |
protected int |
side
The side of the node this interface is on. |
| 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 | |
|---|---|
protected |
NwInterface(Element config,
Point pos,
PCNode owner,
VerinecStudio gui)
Initializes the interface. |
| Method Summary | |
|---|---|
abstract void |
addBinding(NwBinding nwBinding)
Adds a binding to the interface. |
protected static Element |
createElement(int type,
int side)
Get a minimal configuration of an interface, including one binding. |
protected static Element |
createInterfaceInfo(Element config,
int side)
Create the interface layout information and add it to the config. |
void |
delete()
Delete the interface: Remove it from owner and let super class handle the rest. |
abstract Vector |
getBindings()
Get all bindings owned by this interface. |
protected Element |
getLayoutChild(Element config)
Extract the node gui information child from the configuration, add a default if necessary. |
PCNode |
getOwner()
Get the owner of this interface. |
int |
getSide()
Find out on which side of the node this interface is situated. |
abstract void |
removeBinding(NwBinding nwBinding)
Removes a binding from the interface. |
void |
setSide(int side)
Set the side of the node this interface is on. |
| Methods inherited from class verinec.gui.core.NwComponent |
|---|
addContextMenu, addContextMenuSeparator, changeIcon, getAbsX, getAbsY, getConfig, getDefaultSize, getRandomId, getType, initialize, isSelected, moveComponent, resizeComponent, resizeDefaultSize, setBounds, setBounds, setLocation, setLocation, setSelected, showIcon |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected PCNode owner
protected int side
| Constructor Detail |
|---|
protected NwInterface(Element config,
Point pos,
PCNode owner,
VerinecStudio gui)
config - The config element of the component.pos - The position of the interface.owner - The node which this interface is part of.gui - The main application.| Method Detail |
|---|
public void delete()
delete in class NwComponentpublic void setSide(int side)
side - The new side of the interface, one of PCNode.IF_RIGHT/LEFT/ABOVE/BELOW.public int getSide()
public PCNode getOwner()
public abstract Vector getBindings()
public abstract void removeBinding(NwBinding nwBinding)
nwBinding - The binding to remove.public abstract void addBinding(NwBinding nwBinding)
nwBinding - The new binding.protected Element getLayoutChild(Element config)
getLayoutChild in class NwComponentconfig - The network xml object.
protected static Element createInterfaceInfo(Element config,
int side)
config - The interface configuration the info will be attached to.side - Side of the node.
protected static Element createElement(int type,
int side)
type - Network type of the element.side - The side of the node this interface is on.
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||