|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mm.viewer.annotation.CMBAnnotationView
The View in the MVC architecture. This class takes care of actually drawing the annotations on the JComponent that is set as the view component by calling the setViewComponent( JComponent ) method.
com.ibm.mm.viewer.annotation.CMBAnnotationSet
,
com.ibm.mm.viewer.annotation.CMBAnnotationServices
Constructor Summary | |
CMBAnnotationView()
Constructor |
|
CMBAnnotationView(CMBAnnotationSet model)
Constructor |
Method Summary | |
void |
drawAllAnnotations()
Draws all the annotations. |
void |
drawAnnotation(CMBPageAnnotation a)
Renders the supplied annotation on the screen |
void |
drawAnnotationInXOR(CMBPageAnnotation a)
Draws an annotations in XOR mode. |
void |
drawRectInXOR(java.awt.Rectangle r)
Draws the specified rectangle in XOR mode |
void |
eraseAnnotationFromScreen(CMBPageAnnotation a)
Removes an annotation from the screen |
CMBAnnotationSet |
getModel()
Gets the CMBAnnotationSet object . |
java.awt.Frame |
getOwningFrame()
The sole purpose of this method is to be able to display an annotation properties dialog box. |
javax.swing.JComponent |
getViewComponent()
Returns the view component. |
void |
handleAnnPropChangedEvent(CMBPageAnnotation a)
Handles the annotation properties changed event and refreshes the annotation. |
void |
handleAnnPropWillChangeEvent(CMBPageAnnotation a)
Handles the event that occurs before the property of an annotation is about to change. |
void |
paintAll(java.awt.Graphics2D g2,
boolean scale)
Paints all the existing annotations objects. |
void |
paintAnnotations(java.awt.Graphics2D g2,
int pageNum,
boolean scale)
|
void |
paintThoseInRect(java.awt.Rectangle r,
int pageNumber)
Paints only those annotations whose bounding rectangle intersects with r |
void |
refreshEntireDrawArea()
Tells the owner JComponent to repaint itself completely |
void |
refreshRect(java.awt.Rectangle r)
Tells the owner JComponent to repaint a certain rectangle of its view. |
void |
refreshSlightlyBiggerRect(java.awt.Rectangle r)
Same as refreshRect() but increases the rectangle first. |
void |
setModel(CMBAnnotationSet model)
Sets the CMBAnnotationSet object as the model for the view. |
void |
setViewComponent(javax.swing.JComponent component)
Sets the view component for the view. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CMBAnnotationView(CMBAnnotationSet model)
mdl
- A reference to the CMBAnnotationModel that contains all
the annotations to be renderedpublic CMBAnnotationView()
Method Detail |
public void setModel(CMBAnnotationSet model)
model
- The model that contains the list of page annotations.public CMBAnnotationSet getModel()
public void setViewComponent(javax.swing.JComponent component)
component
- A JComponent object that provides the graphics to draw the annotations on.public javax.swing.JComponent getViewComponent()
public void paintAll(java.awt.Graphics2D g2, boolean scale)
g2
- Graphics2D The graphics 2D context to paint on.public void paintAnnotations(java.awt.Graphics2D g2, int pageNum, boolean scale)
public void paintThoseInRect(java.awt.Rectangle r, int pageNumber)
r
- The rectangle that determines which annotations to drawpublic void drawAllAnnotations()
public void drawAnnotation(CMBPageAnnotation a)
a
- The annotation to render.public void refreshRect(java.awt.Rectangle r)
r
- The rectangle to refreshpublic void refreshEntireDrawArea()
public void refreshSlightlyBiggerRect(java.awt.Rectangle r)
public void eraseAnnotationFromScreen(CMBPageAnnotation a)
a
- The annotation to removepublic void drawAnnotationInXOR(CMBPageAnnotation a)
a
- CMBPageAnnotation to draw in XOR modepublic void drawRectInXOR(java.awt.Rectangle r)
r
- The rectangle to draw in XOR modepublic java.awt.Frame getOwningFrame()
public void handleAnnPropWillChangeEvent(CMBPageAnnotation a)
handleAnnPropWillChangeEvent
in interface CMBAnnotationPropertiesListener
a
- The page annotation whose property is about to change.public void handleAnnPropChangedEvent(CMBPageAnnotation a)
handleAnnPropChangedEvent
in interface CMBAnnotationPropertiesListener
a
- The page annotation whose property has changed.
|
EIP JavaBeans | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |