public class WinPlotterFX
extends javafx.stage.Stage
Constructor and Description |
---|
WinPlotterFX()
Default constructor
When a new WinPlotter instance is created, its window is initialized to appear at screen
coordinates (10,10) with a size of 200 units in both x and y.
|
Modifier and Type | Method and Description |
---|---|
void |
drawPoint(double x,
double y)
Draws a point at the specified logical coordinates using the current pen color.
|
void |
drawTo(double x,
double y)
Draws a line from the current pen position to the specified logical coordinates,
using the current pen color.
|
void |
erase()
Erases the contents of the current WinPlotterFX window
|
void |
moveTo(double x,
double y)
Moves the pen from the current pen position to the specified logical coordinates.
|
void |
printAt(double x,
double y,
java.lang.String text)
Prints a text string at the specified logical coordinates using the current pen color
|
void |
setBackgroundColor(double red,
double green,
double blue)
Sets the background color of the WinPlotterFX window.
|
boolean |
setGrid(boolean showGrid,
double xIncrement,
double yIncrement,
javafx.scene.paint.Color gridColor)
Specifies whether a grid is to be automatically drawn within the WinPlotter window,
and sets the grid increment.
|
void |
setPenColor(double red,
double green,
double blue)
Sets the pen color used for drawing lines.
|
boolean |
setWindowSize(double width,
double height)
Sets the size of an individual WinPlotter window
|
void |
setWindowTitle(java.lang.String title)
Sets the title of an individual WinPlotter window.
|
void |
showPlotter()
Displays the completed WinPlotterFX window.
|
alwaysOnTopProperty, close, fullScreenExitHintProperty, fullScreenExitKeyProperty, fullScreenProperty, getFullScreenExitHint, getFullScreenExitKeyCombination, getIcons, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getModality, getOwner, getStyle, getTitle, iconifiedProperty, impl_getMXWindowType, impl_setImportant, impl_setPrimary, impl_visibleChanged, impl_visibleChanging, initModality, initOwner, initStyle, isAlwaysOnTop, isFullScreen, isIconified, isMaximized, isResizable, maxHeightProperty, maximizedProperty, maxWidthProperty, minHeightProperty, minWidthProperty, resizableProperty, setAlwaysOnTop, setFullScreen, setFullScreenExitHint, setFullScreenExitKeyCombination, setIconified, setMaxHeight, setMaximized, setMaxWidth, setMinHeight, setMinWidth, setResizable, setScene, setTitle, show, showAndWait, titleProperty, toBack, toFront
addEventFilter, addEventHandler, buildEventDispatchChain, centerOnScreen, eventDispatcherProperty, fireEvent, focusedProperty, getEventDispatcher, getHeight, getOnCloseRequest, getOnHidden, getOnHiding, getOnShowing, getOnShown, getOpacity, getProperties, getScene, getUserData, getWidth, getX, getY, hasProperties, heightProperty, hide, impl_getPeer, impl_getWindows, isFocused, isShowing, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, opacityProperty, removeEventFilter, removeEventHandler, requestFocus, sceneProperty, setEventDispatcher, setEventHandler, setFocused, setHeight, setOnCloseRequest, setOnHidden, setOnHiding, setOnShowing, setOnShown, setOpacity, setUserData, setWidth, setX, setY, showingProperty, sizeToScene, widthProperty, xProperty, yProperty
public WinPlotterFX()
public void drawPoint(double x, double y)
x
- x (horizontal) coordinate of the pointy
- y (vertical) coordinate of the pointpublic void drawTo(double x, double y)
x
- x (horizontal) coordinate of the line endpointy
- y (vertical) coordinate of the line endpointpublic void erase()
public void moveTo(double x, double y)
x
- x (horizontal) coordinate of the pen positiony
- y (vertical) coordinate of the pen positionpublic void printAt(double x, double y, java.lang.String text)
x
- x (horizontal) coordinate of the first character in the stringy
- y (vertical) coordinate of the first character in the stringt
- The text to be printedpublic void setBackgroundColor(double red, double green, double blue)
red
- the red component of the color value, a value between 0 and 1.0green
- the green component of the color value, a value between 0 and 1.0blue
- the blue component of the color value, a value between 0 and 1.0public boolean setGrid(boolean showGrid, double xIncrement, double yIncrement, javafx.scene.paint.Color gridColor)
showGrid
- flag indicating whether to display a gridxIncrement
- grid increment in logical x coordinatesyIncrement
- grid increment in logical y coordinatesgridColor
- color of the grid linespublic void setPenColor(double red, double green, double blue)
red
- the red component of the color value, a value between 0 and 1.0green
- the green component of the color value, a value between 0 and 1.0blue
- the blue component of the color value, a value between 0 and 1.0public void showPlotter()
public boolean setWindowSize(double width, double height)
width
- window width in pixel unitsheight
- window height in pixel unitspublic void setWindowTitle(java.lang.String title)
title
- the window title