public static class GralCanvasStorage.Figure extends java.lang.Object implements java.lang.Iterable<GralCanvasStorage.FigureData>
GralCanvasStorage.FigureData
,
a GralPos
as position, a common GralColor
and a possible background storage.
GralCanvasStorage#dynamicOrder
.
theModifier and Type | Class and Description |
---|---|
static class |
GralCanvasStorage.Figure.Access
To access protected members from the package of the implementing layer, use this as base class.
|
Modifier and Type | Field and Description |
---|---|
protected GralRectangle |
backPositions
It this rectangle is given (not a null reference),
then this figure is dynamically and a back image is stored in the implementing level.
|
protected boolean |
bChanged
True if the figure is changed, for dynamic show.
|
protected boolean |
bNewPos
True on a new position or default, then calculate points newly.
|
boolean |
bPointsAreGralPosUnits |
boolean |
bShow
false then don't show the figure (for the next redraw on dynamic)
This flag can be changed immediately from outside.
|
GralCanvasStorage.FigureData |
data
Either the figure consists of only one element,
then
#listData is null. |
(package private) GralCanvasStorage.FigureDataSet |
dataSet |
protected boolean |
dynamic
If set to true, this figure is dynamically.
|
(package private) boolean |
hasNextOk |
(package private) java.util.Iterator<GralCanvasStorage.FigureData> |
iter |
java.lang.String |
name |
GralRectangle |
pixelPos |
GralPos |
pos |
java.lang.Object |
storageBackground
Used from implementing graphics on #dynamic to store the background for restore.
|
protected int |
variant |
Modifier | Constructor and Description |
---|---|
protected |
Figure(java.lang.String name,
GralPos pos,
boolean isDynamic) |
protected |
Figure(java.lang.String name,
GralPos pos,
GralCanvasStorage.FigureData data,
boolean isDynamic) |
protected |
Figure(java.lang.String name,
GralPos pos,
GralCanvasStorage.FigureDataSet data,
boolean isDynamic) |
Modifier and Type | Method and Description |
---|---|
GralCanvasStorage.FigureDataSet |
data()
Access to the DataSet to add more for a dedicated figure.
|
int |
getVariant() |
java.util.Iterator<GralCanvasStorage.FigureData> |
iterator() |
GralCanvasStorage.Figure |
set()
Set any what, recommended with concatenation.
|
void |
setNewPosition(float line,
float lineEndOrSize,
float column,
float columnEndOrSize) |
void |
setNewPosition(java.lang.String posString) |
GralCanvasStorage.Figure |
setVariant(int variant) |
GralCanvasStorage.Figure |
show(boolean show)
Set whether the figure should be dynamically shown or not.
|
java.lang.String |
toString() |
public final java.lang.String name
public final GralPos pos
public boolean bPointsAreGralPosUnits
protected final boolean dynamic
protected boolean bChanged
public boolean bShow
protected boolean bNewPos
protected GralRectangle backPositions
protected int variant
public java.lang.Object storageBackground
public GralRectangle pixelPos
boolean hasNextOk
public final GralCanvasStorage.FigureData data
#listData
is null.GralCanvasStorage.FigureDataSet dataSet
java.util.Iterator<GralCanvasStorage.FigureData> iter
protected Figure(java.lang.String name, GralPos pos, GralCanvasStorage.FigureData data, boolean isDynamic)
protected Figure(java.lang.String name, GralPos pos, GralCanvasStorage.FigureDataSet data, boolean isDynamic)
protected Figure(java.lang.String name, GralPos pos, boolean isDynamic)
public GralCanvasStorage.FigureDataSet data()
#GralCanvasStorage(String, GralPos, boolean)
.
Then it contains an empty data set.
GralCanvasStorage.FigureDataSet
this is the returned one.
It means operations are done in the referenced data set which may be shared also with other figures.
GralCanvasStorage#addFigure(GralPos, GralColor, boolean)
.public void setNewPosition(float line, float lineEndOrSize, float column, float columnEndOrSize)
public void setNewPosition(java.lang.String posString) throws java.text.ParseException
java.text.ParseException
public GralCanvasStorage.Figure setVariant(int variant)
public GralCanvasStorage.Figure set()
bChanged
flag.public GralCanvasStorage.Figure show(boolean show)
set()
is executed.
It sets the #bShow with given argument and the bChanged
flag.show
- false then the next GralWidget.redrawOnlyDynamics(int, int)
refreshes the background with the stored content and hides the figure.
true then refreshes the background and shows the figure.public int getVariant()
public java.util.Iterator<GralCanvasStorage.FigureData> iterator()
iterator
in interface java.lang.Iterable<GralCanvasStorage.FigureData>
public java.lang.String toString()
toString
in class java.lang.Object