public class WinPane extends Pane
| Modifier and Type | Field and Description |
|---|---|
static String |
JPAZ_DEFAULT_TITLE
Default title of the window
|
referenceIdentification| Constructor and Description |
|---|
WinPane()
Constructs a new pane inside a window with predefined size
|
WinPane(int width,
int height)
Constructs a new pane inside a window.
|
WinPane(int x,
int y,
int width,
int height)
Constructs a new pane inside a window at a given position.
|
WinPane(int x,
int y,
int width,
int height,
String title)
Constructs a new pane inside a window at a given position and with a
given title.
|
WinPane(int width,
int height,
String title)
Constructs a new pane inside a window with a given title.
|
| Modifier and Type | Method and Description |
|---|---|
Pane |
getPane()
Gets the current parent pane of this pane.
|
String |
getTitle()
Gets the title of containing frame.
|
void |
invalidate()
Marks that the content of the pane is no longer valid.
|
boolean |
isResizable()
Indicates whether this pane is resizable by the user.
|
void |
paintToPaneGraphics(Graphics2D g)
Paints the pane to a graphics at position relative to parent's coordinate
system.
|
void |
resize(int newWidth,
int newHeight)
Resizes the pane.
|
void |
setPane(Pane newParentPane)
Sets the parent pane of this pane.
|
void |
setPosition(double x,
double y)
Changes the position of the pane.
|
void |
setResizable(boolean resizable)
Sets whether this pane is resizable by the user.
|
void |
setRotation(double rotation)
Sets the rotation angle of this pane.
|
void |
setTitle(String title)
Sets the title for containing frame to the specified string.
|
add, bringToBack, bringToBackOf, bringToFront, bringToFrontOf, canClick, clear, containsPoint, draw, fill, getBackgroundColor, getBorderColor, getBorderWidth, getCenter, getHeight, getKeyRepeatPeriod, getKeyRepeatPeriod, getObjectCount, getPane, getPaneCount, getPaneObject, getPaneObjects, getPanes, getPosition, getRotation, getTickPeriod, getTransparency, getTurtle, getTurtleCount, getTurtles, getWidth, getX, getXCenter, getY, getYCenter, isAntialiased, isMouseTransparent, isTransparentBackground, isTurtleCentering, onCanClick, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragged, onMouseMoved, onMousePressed, onMouseReleased, onTick, remove, savePicture, setAntialiased, setBackgroundColor, setBorderColor, setBorderWidth, setCenter, setCenter, setHeight, setKeyRepeatPeriod, setKeyRepeatPeriod, setMouseTransparent, setPosition, setTickPeriod, setTransparency, setTransparentBackground, setTurtleCentering, setWidth, setX, setXCenter, setY, setYCenter, toStringpublic static final String JPAZ_DEFAULT_TITLE
public WinPane()
public WinPane(int width,
int height)
width - the width of the paneheight - the height of the panepublic WinPane(int width,
int height,
String title)
width - the width of the paneheight - the height of the panetitle - the title displayed in the frame's borderpublic WinPane(int x,
int y,
int width,
int height)
x - the x-coordinate of the window top-left cornery - the y-coordinate of the window top-left cornerwidth - the width of the paneheight - the height of the panepublic WinPane(int x,
int y,
int width,
int height,
String title)
x - the x-coordinate of the window top-left cornery - the y-coordinate of the window top-left cornerwidth - the width of the paneheight - the height of the panetitle - the title displayed in the frame's borderpublic String getTitle()
public void setTitle(String title)
title - the title to be displayed in the frame's border. A null value
is treated as an empty string, "".public boolean isResizable()
public void setResizable(boolean resizable)
resizable - true if this pane is resizable; false otherwise.public void resize(int newWidth,
int newHeight)
Panepublic void setPosition(double x,
double y)
PanesetPosition in class Panex - the desired x-coordinate.y - the desired y-coordinate.public void setRotation(double rotation)
PanesetRotation in class Panerotation - the desired rotation angle in degrees.public Pane getPane()
PanegetPane in interface PaneObjectgetPane in class Panepublic void setPane(Pane newParentPane)
PanesetPane in interface PaneObjectsetPane in class PanenewParentPane - the new parent panepublic void paintToPaneGraphics(Graphics2D g)
PanepaintToPaneGraphics in interface PaneObjectpaintToPaneGraphics in class Paneg - the graphics where the content is drawn.public void invalidate()
Paneinvalidate in class PaneCopyright © 2017. All rights reserved.