Class ElementPainter
java.lang.Object
rs.edu.raf.dsw.rudok.app.observer.IObserver
rs.edu.raf.dsw.rudok.app.observer.IPublisherGlobal
rs.edu.raf.dsw.rudok.app.observer.IPublisher
rs.edu.raf.dsw.rudok.app.gui.swing.painter.ElementPainter
- Direct Known Subclasses:
ConnectionPainter
,TopicPainter
public abstract class ElementPainter extends IPublisher
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ElementPainter.Message
Message for publishing. -
Constructor Summary
Constructors Constructor Description ElementPainter(Element element)
-
Method Summary
Methods inherited from class rs.edu.raf.dsw.rudok.app.observer.IPublisher
addObserver, getObservers, publish, removeObserver, setObservers
Methods inherited from class rs.edu.raf.dsw.rudok.app.observer.IPublisherGlobal
addObserverGlobal, getObserversGlobal, removeObserverGlobal
Methods inherited from class rs.edu.raf.dsw.rudok.app.observer.IObserver
addPublisher, getPublishers, receive, removePublisher, setPublishers
-
Constructor Details
-
ElementPainter
-
-
Method Details
-
getElement
-
draw
- Parameters:
g
-Graphics
canvas to paint on.
-
elementAt
Returns true if the element's shape includes the passedPoint
.- Parameters:
p
-Point
where the interaction happened.- Returns:
- True if the element was clicked, false otherwise.
-
getShape
The final paintedShape
. May be null.- Returns:
- The final painted
Shape
. May be null.
-