|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--edu.mssm.crover.domain2d.PrintablePanel
|
+--edu.mssm.crover.domain2d.DrawingSurface
Where the drawings are rendered.
| Field Summary | |
protected java.awt.Color |
bgColor
|
protected java.util.Vector |
lastMinuteDrawings
|
| Fields inherited from class edu.mssm.crover.domain2d.PrintablePanel |
SVG_ANCHOR_HREF_PROPERTY |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
DrawingSurface()
|
|
| Method Summary | |
java.awt.Component |
add(java.awt.Component c)
Do not use add, use addDomain instead. |
void |
addDomain(Domain2D d2d)
|
void |
addDrawing(Drawing d)
Add a drawing to be rendered when all the residues have been rendered (last-minute drawing). |
void |
addDrawings(Drawing[] drawings)
Adds several drawings to this surface. |
void |
coolPrint(java.awt.Graphics g)
Paint the children and the last minute drawings. |
void |
dispose()
Dispose of this DrawingSurface. |
java.util.Enumeration |
enumerateDomains()
Returns domains contained in the surface. |
Domain2D |
getDomainById(java.lang.String id)
Return the Domain which has this id. |
java.awt.image.BufferedImage |
getImage()
Returns the drawing as an image. |
boolean |
isOptimizedDrawingEnabled()
|
void |
lastMinutePaint(java.awt.Graphics g)
Paint last minute drawings. |
void |
pack()
Pack the SSE. |
void |
paintChildren(java.awt.Graphics g)
Paint the children and the last minute drawings. |
void |
paintComponent(java.awt.Graphics g)
|
int |
print(java.awt.Graphics g,
java.awt.print.PageFormat pf,
int pi)
|
void |
removeAllDrawings()
Remove all the last-minute drawings. |
void |
removeDrawing(Drawing d)
Removes all the references to the specified drawing. |
void |
setBackgroundColor(java.awt.Color bg)
|
void |
setPostScriptHeight(float height)
Sets the height of the diagram when rendered on the page as a PostScript file. |
void |
setPostScriptResolution(int resolution)
Sets the resolution of the PostScript output driver. |
void |
setPostScriptWidth(float width)
Sets the width of the diagram when rendered on the page as a PostScript file. |
void |
setPreferredSize(java.awt.Dimension d)
|
void |
startDragging(Drawing d)
Notify the surface that a drawing will be dragged now. |
void |
stopDragging(Drawing d)
Notify the surface that a drawing is not dragged anymore. |
void |
suggestPosition(Drawing d,
java.awt.Point dest)
|
ConstrainedPoint |
surfacePosition(ConstrainedPoint relativePosition,
Drawing comp)
Returns the position on the drawing surface. |
java.awt.geom.Point2D |
surfacePosition(double x,
double y,
java.awt.Component comp)
Returns the position on the drawing surface. |
java.awt.geom.Point2D |
surfacePosition(java.awt.geom.Point2D relativePosition,
java.awt.Component comp)
Returns the position on the drawing surface. |
void |
update(java.awt.Graphics g)
|
void |
update(java.util.Observable o,
java.lang.Object arg)
|
| Methods inherited from class edu.mssm.crover.domain2d.PrintablePanel |
recurseSVGPrint, svgPrint |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction |
| Methods inherited from class java.awt.Container |
add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.awt.Color bgColor
protected java.util.Vector lastMinuteDrawings
| Constructor Detail |
public DrawingSurface()
| Method Detail |
public Domain2D getDomainById(java.lang.String id)
public void dispose()
public void setPreferredSize(java.awt.Dimension d)
setPreferredSize in class javax.swing.JComponentpublic void addDomain(Domain2D d2d)
public java.awt.Component add(java.awt.Component c)
add in class java.awt.Containerpublic void startDragging(Drawing d)
public void stopDragging(Drawing d)
public void lastMinutePaint(java.awt.Graphics g)
public void paintChildren(java.awt.Graphics g)
paintChildren in class javax.swing.JComponentpublic void coolPrint(java.awt.Graphics g)
coolPrint in interface CoolPrintcoolPrint in class PrintablePanelpublic void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentpublic void setBackgroundColor(java.awt.Color bg)
public void pack()
public void suggestPosition(Drawing d,
java.awt.Point dest)
public void update(java.awt.Graphics g)
update in class javax.swing.JComponent
public void update(java.util.Observable o,
java.lang.Object arg)
update in interface java.util.Observerpublic boolean isOptimizedDrawingEnabled()
isOptimizedDrawingEnabled in class javax.swing.JComponentpublic java.awt.image.BufferedImage getImage()
public int print(java.awt.Graphics g,
java.awt.print.PageFormat pf,
int pi)
throws java.awt.print.PrinterException
print in interface java.awt.print.Printablejava.awt.print.PrinterExceptionpublic void addDrawing(Drawing d)
public void addDrawings(Drawing[] drawings)
addDrawing(edu.mssm.crover.domain2d.Drawing)public void removeDrawing(Drawing d)
public void removeAllDrawings()
public java.awt.geom.Point2D surfacePosition(java.awt.geom.Point2D relativePosition,
java.awt.Component comp)
relativePosition - The position relative to the component comp.comp - The component that host the coordinate system in which relativePosition is expressed.
public java.awt.geom.Point2D surfacePosition(double x,
double y,
java.awt.Component comp)
x - The x co-ordinate relative to the component comp.y - The y co-ordinate relative to the component comp.comp - The component that host the coordinate system in which (x,y) is described.
public ConstrainedPoint surfacePosition(ConstrainedPoint relativePosition,
Drawing comp)
relativePosition - The position relative to the component comp.comp - The component that host the coordinate system in which relativePosition is expressed.
public void setPostScriptResolution(int resolution)
public void setPostScriptWidth(float width)
width - The desired width or -1 when the width has to be determined from the aspect ratio of the diagram
and the dimension of the height. Units are cm.public void setPostScriptHeight(float height)
height - The desired height or -1 when the height has to be determined from the aspect ratio of the diagram
and the dimension of the width. Units are cm.public java.util.Enumeration enumerateDomains()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||