Package org.jzy3d.plot3d.rendering.view
Class View2DLayout
- java.lang.Object
-
- org.jzy3d.plot3d.rendering.view.View2DLayout
-
public class View2DLayout extends Object
Allows configuring the layout of a view when the chart enters a 2D rendering mode.
-
-
Field Summary
Fields Modifier and Type Field Description protected float
marginBottom
Extra marginprotected float
marginLeft
Extra marginprotected float
marginRight
Extra marginprotected float
marginTop
Extra marginprotected boolean
symetricHorizontalMargin
When true, the global left margin (including text) will equal the global right margin.protected boolean
symetricVerticalMargin
When true, the global left margin (including text) will equal the global right margin.protected boolean
textAddMargin
protected View
view
protected float
xAxisLabelsDistance
Distance between tick labels and axis labelprotected float
xTickLabelsDistance
Distance between axis and tick labels (hence, length of the tick)protected float
yAxisLabelsDistance
Distance between tick labels and axis labelprotected float
yTickLabelsDistance
Distance between axis and tick labels (hence, length of the tick)
-
Constructor Summary
Constructors Constructor Description View2DLayout(View view)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply()
float
getMarginBottom()
float
getMarginLeft()
float
getMarginRight()
float
getMarginTop()
float
getxAxisLabelsDistance()
float
getxTickLabelsDistance()
float
getyAxisLabelsDistance()
float
getyTickLabelsDistance()
boolean
isSymetricHorizontalMargin()
boolean
isSymetricVerticalMargin()
boolean
isTextAddMargin()
void
setAxisLabelDistance(float dist)
void
setMargin(float margin)
void
setMarginBottom(float marginBottom)
void
setMarginHorizontal(float margin)
Set the same margin to left and right canvas bordersvoid
setMarginLeft(float marginLeft)
void
setMarginRight(float marginRight)
void
setMarginTop(float marginTop)
void
setMarginVertical(float margin)
Set the same margin to top and bottom canvas bordersvoid
setSymetricHorizontalMargin(boolean symetricHorizontalMargin)
void
setSymetricMargin(boolean symetricMargin)
void
setSymetricVerticalMargin(boolean symetricVerticalMargin)
void
setTextAddMargin(boolean keepTextVisible)
Only usefull for debugging purpose, should not be used.void
setTickLabelDistance(float dist)
void
setxAxisLabelsDistance(float xAxisNameLabelsDistance)
Distance between tick labels and axis labelvoid
setxTickLabelsDistance(float xAxisTickLabelsDistance)
void
setyAxisLabelsDistance(float yAxisNameLabelsDistance)
Distance between tick labels and axis labelvoid
setyTickLabelsDistance(float yAxisTickLabelsDistance)
-
-
-
Field Detail
-
view
protected View view
-
textAddMargin
protected boolean textAddMargin
-
symetricHorizontalMargin
protected boolean symetricHorizontalMargin
When true, the global left margin (including text) will equal the global right margin. Allows the embedding axis to appear horizontally centered in the canvas.
-
symetricVerticalMargin
protected boolean symetricVerticalMargin
When true, the global left margin (including text) will equal the global right margin. Allows the embedding axis to appear horizontally centered in the canvas.
-
xTickLabelsDistance
protected float xTickLabelsDistance
Distance between axis and tick labels (hence, length of the tick)
-
xAxisLabelsDistance
protected float xAxisLabelsDistance
Distance between tick labels and axis label
-
yTickLabelsDistance
protected float yTickLabelsDistance
Distance between axis and tick labels (hence, length of the tick)
-
yAxisLabelsDistance
protected float yAxisLabelsDistance
Distance between tick labels and axis label
-
marginLeft
protected float marginLeft
Extra margin
-
marginRight
protected float marginRight
Extra margin
-
marginTop
protected float marginTop
Extra margin
-
marginBottom
protected float marginBottom
Extra margin
-
-
Constructor Detail
-
View2DLayout
public View2DLayout(View view)
-
-
Method Detail
-
setSymetricMargin
public void setSymetricMargin(boolean symetricMargin)
-
setTickLabelDistance
public void setTickLabelDistance(float dist)
-
setAxisLabelDistance
public void setAxisLabelDistance(float dist)
-
setMargin
public void setMargin(float margin)
-
setMarginHorizontal
public void setMarginHorizontal(float margin)
Set the same margin to left and right canvas borders
-
setMarginVertical
public void setMarginVertical(float margin)
Set the same margin to top and bottom canvas borders
-
getMarginLeft
public float getMarginLeft()
-
setMarginLeft
public void setMarginLeft(float marginLeft)
-
getMarginRight
public float getMarginRight()
-
setMarginRight
public void setMarginRight(float marginRight)
-
getMarginTop
public float getMarginTop()
-
setMarginTop
public void setMarginTop(float marginTop)
-
getMarginBottom
public float getMarginBottom()
-
setMarginBottom
public void setMarginBottom(float marginBottom)
-
isTextAddMargin
public boolean isTextAddMargin()
-
setTextAddMargin
public void setTextAddMargin(boolean keepTextVisible)
Only usefull for debugging purpose, should not be used.
-
getxTickLabelsDistance
public float getxTickLabelsDistance()
-
setxTickLabelsDistance
public void setxTickLabelsDistance(float xAxisTickLabelsDistance)
-
getxAxisLabelsDistance
public float getxAxisLabelsDistance()
-
setxAxisLabelsDistance
public void setxAxisLabelsDistance(float xAxisNameLabelsDistance)
Distance between tick labels and axis label
-
getyTickLabelsDistance
public float getyTickLabelsDistance()
-
setyTickLabelsDistance
public void setyTickLabelsDistance(float yAxisTickLabelsDistance)
-
getyAxisLabelsDistance
public float getyAxisLabelsDistance()
-
setyAxisLabelsDistance
public void setyAxisLabelsDistance(float yAxisNameLabelsDistance)
Distance between tick labels and axis label
-
isSymetricHorizontalMargin
public boolean isSymetricHorizontalMargin()
-
setSymetricHorizontalMargin
public void setSymetricHorizontalMargin(boolean symetricHorizontalMargin)
-
isSymetricVerticalMargin
public boolean isSymetricVerticalMargin()
-
setSymetricVerticalMargin
public void setSymetricVerticalMargin(boolean symetricVerticalMargin)
-
apply
public void apply()
-
-