net.refractions.udig.printing.model
Interface Connection

All Superinterfaces:
Element

public interface Connection
extends Element

A Connection represents some sort of relation between two Boxes. For example, a scalebar needs to be related to a map in order to draw itself properly. A Connection can be used to visualize this relation in the PageEditor.

Since:
0.6.0
Author:
rgould

Method Summary
 void disconnect()
          Disconnects this connection from its source and target
 Box getSource()
          The Box returned represents a object that uses the target of the connection somehow.
 Box getTarget()
          This represents a link between a Box and this class.
 boolean isConnected()
           
 void reconnect()
          Reconnects this connection to its target and source, as if it was just created.
 void reconnect(Box source, Box target)
          Reconnects this connection to a new source Box and a new target Box this is the same as:
 void setConnected(boolean value)
          Sets the value of the 'Connected' attribute.
 void setSource(Box value)
          Sets the value of the 'Source' reference.
 void setTarget(Box value)
          Sets the value of the 'Target' reference.
 
Methods inherited from interface net.refractions.udig.printing.model.Element
getLocation, getSize, setLocation, setSize
 

Method Detail

isConnected

boolean isConnected()
Returns:
true if this connection is actually connected, false otherwise

setConnected

void setConnected(boolean value)
Sets the value of the 'Connected' attribute. Sets the connected state of this connection to the value provided

Parameters:
value - the new value of the 'Connected' attribute.
See Also:
isConnected()

getSource

Box getSource()
The Box returned represents a object that uses the target of the connection somehow.

Returns:
the Box that is the source of this connection
See Also:
Box

setSource

void setSource(Box value)
Sets the value of the 'Source' reference. Sets this connection's source Box This will affect the connection by notifying any listeners of the change.

Parameters:
value - the new value of the 'Source' reference.
See Also:
getSource()

getTarget

Box getTarget()
This represents a link between a Box and this class. The target of a connection is often used by the source to retrieve information, or maybe for manipulation.

Returns:
the Box that is the target of this connection
See Also:
Box

setTarget

void setTarget(Box value)
Sets the value of the 'Target' reference. Sets this connection's source Box This represents a link between a Box and this class. The target of a connection is often used by the source to retrieve information, or maybe for manipulation.

Parameters:
value - the new value of the 'Target' reference.
See Also:
getTarget()

disconnect

void disconnect()
Disconnects this connection from its source and target


reconnect

void reconnect()
Reconnects this connection to its target and source, as if it was just created.


reconnect

void reconnect(Box source,
               Box target)
Reconnects this connection to a new source Box and a new target Box this is the same as:
 
 {
        setSource(source);
        setTarget(target);
        reconnect();
 }
 

Parameters:
source - the Connection's new source
target - the Connection's new target