Sets the plot frame size in (unscaled) pixels. This size does not include the borders with the axis labels. Also sets the scale to 1.0. This frame size in pixels divided by the data range defines the image scale. This method does not check for the minimum size MIN_FRAMEWIDTH, MIN_FRAMEHEIGHT. Note t
(int width, int height)
| 558 | * @see #setWindowSize(int,int) |
| 559 | */ |
| 560 | public void setFrameSize(int width, int height) { |
| 561 | if (pp.width <= 0) { //plot not drawn yet? Just remember as preferred size |
| 562 | preferredPlotWidth = width; |
| 563 | preferredPlotHeight = height; |
| 564 | scale = 1.0f; |
| 565 | } else { |
| 566 | makeMarginValues(); |
| 567 | width += leftMargin+rightMargin; |
| 568 | height += topMargin+bottomMargin; |
| 569 | setSize(width, height); |
| 570 | } |
| 571 | } |
| 572 | |
| 573 | /** Sets the plot window size in pixels. |
| 574 | * @see #setFrameSize(int,int) |
no test coverage detected