Class DonatelloNode
java.lang.Object
com.marginallyclever.ro3.apps.donatello.DonatelloNode
Donatello uses DonatelloNode to associate a Node with its
Swing JPanel and remember the 2D position for graphing.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoLayout()drawJComponentToBufferedImageUnlessClipped(JComponent panel, Rectangle clippingRegion, int x, int y) Draw aJPanelto aBufferedImageunless the panel is clipped by the .voidfromJSON(org.json.JSONObject json) voidpaint(GraphViewPanel dn, Graphics2D g, Rectangle clippingRegion) voidsetLocation(int x, int y) voidsetPosition(Point p) org.json.JSONObjecttoJSON()
-
Constructor Details
-
DonatelloNode
-
-
Method Details
-
getJComponent
-
getPosition
-
setPosition
-
toJSON
public org.json.JSONObject toJSON() -
fromJSON
public void fromJSON(org.json.JSONObject json) -
getRectangle
-
setLocation
public void setLocation(int x, int y) -
paint
-
drawJComponentToBufferedImageUnlessClipped
public BufferedImage drawJComponentToBufferedImageUnlessClipped(JComponent panel, Rectangle clippingRegion, int x, int y) Draw aJPanelto aBufferedImageunless the panel is clipped by the .- Parameters:
panel- theJPanelto drawclippingRegion- the bounds of the panel in world coordinates.x- the x position to draw the panely- the y position to draw the panel- Returns:
- a
BufferedImagecontaining the panel or null.
-
drawJComponentToBufferedImage
-
doLayout
public void doLayout()
-