Sets the dimensions of the graph (in pixels). @param width The width of the graph produced (in pixels). @param height The height of the graph produced (in pixels). @throws IllegalArgumentException if the width or height are negative, zero or "too small" (e.g. less than 100x100 pixels).
(final short width, final short height)
| 152 | * zero or "too small" (e.g. less than 100x100 pixels). |
| 153 | */ |
| 154 | public void setDimensions(final short width, final short height) { |
| 155 | if (width < MIN_PIXELS || height < MIN_PIXELS) { |
| 156 | final String what = width < MIN_PIXELS ? "width" : "height"; |
| 157 | throw new IllegalArgumentException(what + " smaller than " + MIN_PIXELS |
| 158 | + " in " + width + 'x' + height); |
| 159 | } |
| 160 | this.width = width; |
| 161 | this.height = height; |
| 162 | } |
| 163 | |
| 164 | /** @param globals A list of global annotation objects, may be null */ |
| 165 | public void setGlobals(final List<Annotation> globals) { |