net.refractions.udig.printing.model
Interface Box

All Superinterfaces:
Element
All Known Subinterfaces:
DecoratorBox

public interface Box
extends Element

A Box is a conceptual object that can appear on a page. It is an extension of an Element and provides methods that allow a Box to draw itself and support connections to other boxes. Implementors should directly implement this interface or one of its implementations. DecoratorBox in particular.

Since:
0.3
Author:
Richard Gould
See Also:
Element

Method Summary
 void add(Connection connection)
          Adds a Connection to this Box
 void addPropertyChangeListener(IPropertyChangeListener l)
          Adds a listener to the box.
 BoxPrinter getBoxPrinter()
          Gets the object responsible for drawing the preview and printing the contents of this box.
 java.lang.String getID()
          Gets the id for the box.
 java.util.List getSourceConnections()
          This is used by the GEF system to access the source connections on this Box
 java.util.List getTargetConnections()
          This is used by the GEF system to access the target connections on this Box
 void notifyPropertyChange(PropertyChangeEvent event)
          Can be called to notify listeners that a event has occurred.
 void remove(Connection connection)
          Removes a Connection to this Box
 void removePropertyChangeListener(IPropertyChangeListener l)
          removes a listener from the box.
 void setBoxPrinter(BoxPrinter value)
          Sets the value of the 'Box Printer' attribute.
 void setID(java.lang.String value)
          Sets the value of the 'ID' attribute.
 
Methods inherited from interface net.refractions.udig.printing.model.Element
getLocation, getSize, setLocation, setSize
 

Method Detail

getSourceConnections

java.util.List getSourceConnections()
This is used by the GEF system to access the source connections on this Box

Returns:
a List of Connections that use this Box as a source

getTargetConnections

java.util.List getTargetConnections()
This is used by the GEF system to access the target connections on this Box

Returns:
a List of Connectoins that use this Box as a target

add

void add(Connection connection)
Adds a Connection to this Box

Parameters:
connection - the connection to add to this Box
See Also:
Connection

remove

void remove(Connection connection)
Removes a Connection to this Box

Parameters:
connection - the connection to be removed
See Also:
Connection

getBoxPrinter

BoxPrinter getBoxPrinter()
Gets the object responsible for drawing the preview and printing the contents of this box.

Returns:
Gets the object responsible for drawing the preview and printing the contents of this box.

setBoxPrinter

void setBoxPrinter(BoxPrinter value)
Sets the value of the 'Box Printer' attribute.

Parameters:
value - the new value of the 'Box Printer' attribute.
See Also:
getBoxPrinter()

notifyPropertyChange

void notifyPropertyChange(PropertyChangeEvent event)
Can be called to notify listeners that a event has occurred.

Parameters:
eventData -

addPropertyChangeListener

void addPropertyChangeListener(IPropertyChangeListener l)
Adds a listener to the box. Each listener will only be added once.

Parameters:
l - the listener to add.

removePropertyChangeListener

void removePropertyChangeListener(IPropertyChangeListener l)
removes a listener from the box.

Parameters:
l - the listener to remove.

getID

java.lang.String getID()
Gets the id for the box.

Returns:
the id for the box.

setID

void setID(java.lang.String value)
Sets the value of the 'ID' attribute.

Parameters:
value - the new value of the 'ID' attribute.
See Also:
getID()