001: /*
002: * uDig - User Friendly Desktop Internet GIS client
003: * http://udig.refractions.net
004: * (C) 2004, Refractions Research Inc.
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation;
009: * version 2.1 of the License.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: */
017: package net.refractions.udig.printing.model;
018:
019: import java.util.List;
020:
021: import org.eclipse.jface.util.IPropertyChangeListener;
022: import org.eclipse.jface.util.PropertyChangeEvent;
023:
024: /**
025: * A Box is a conceptual object that can appear on a page. It is an extension
026: * of an <code>Element</code> and provides methods that allow a Box to draw
027: * itself and support connections to other boxes.
028: *
029: * Implementors should directly implement this interface or one of its
030: * implementations. DecoratorBox in particular.
031: *
032: * @author Richard Gould
033: * @since 0.3
034: * @see Element
035: * @model
036: */
037: public interface Box extends Element {
038:
039: /**
040: * This is used by the GEF system to access the source connections on this Box
041: *
042: * @return a List of Connections that use this Box as a source
043: * @model resolveProxy="false" type="net.refractions.udig.printing.model.Connection"
044: */
045: public List getSourceConnections();
046:
047: /**
048: * This is used by the GEF system to access the target connections on this Box
049: *
050: * @return a List of Connectoins that use this Box as a target
051: * @model resolveProxy="false" type="net.refractions.udig.printing.model.Connection"
052: */
053: public List getTargetConnections();
054:
055: /**
056: *
057: * Adds a Connection to this Box
058: * @see Connection
059: * @param connection the connection to add to this Box
060: */
061: void add(Connection connection);
062:
063: /**
064: *
065: * Removes a Connection to this Box
066: * @see Connection
067: * @param connection the connection to be removed
068: */
069: void remove(Connection connection);
070:
071: /**
072: * Gets the object responsible for drawing the preview and printing the contents of this box.
073: *
074: * @return Gets the object responsible for drawing the preview and printing the contents of this box.
075: * @model
076: */
077: BoxPrinter getBoxPrinter();
078:
079: /**
080: * Sets the value of the '{@link net.refractions.udig.printing.model.Box#getBoxPrinter <em>Box Printer</em>}' attribute.
081: * <!-- begin-user-doc -->
082: * <!-- end-user-doc -->
083: * @param value the new value of the '<em>Box Printer</em>' attribute.
084: * @see #getBoxPrinter()
085: * @generated
086: */
087: void setBoxPrinter(BoxPrinter value);
088:
089: /**
090: * Can be called to notify listeners that a event has occurred.
091: *
092: * @param eventData
093: */
094: void notifyPropertyChange(PropertyChangeEvent event);
095:
096: /**
097: * Adds a listener to the box. Each listener will only be added once.
098: *
099: * @param l the listener to add.
100: */
101: void addPropertyChangeListener(IPropertyChangeListener l);
102:
103: /**
104: * removes a listener from the box.
105: *
106: * @param l the listener to remove.
107: */
108: void removePropertyChangeListener(IPropertyChangeListener l);
109:
110: /**
111: * Gets the id for the box.
112: *
113: * @return the id for the box.
114: * @model
115: */
116: String getID();
117:
118: /**
119: * Sets the value of the '{@link net.refractions.udig.printing.model.Box#getID <em>ID</em>}' attribute.
120: * <!-- begin-user-doc -->
121: * <!-- end-user-doc -->
122: * @param value the new value of the '<em>ID</em>' attribute.
123: * @see #getID()
124: * @generated
125: */
126: void setID(String value);
127:
128: }
|