sgtplot.beans
Class DataGroup
- java.lang.Object
-
- sgtplot.beans.DataGroup
-
- All Implemented Interfaces:
- java.io.Serializable, java.util.EventListener, javax.swing.event.ChangeListener
public class DataGroup extends java.lang.Object implements java.io.Serializable, javax.swing.event.ChangeListenerA holder for the X and Y transforms and optionally references to the X and Y axes for aCartesianGraph. This class is used withDataModelandPanel.- Since:
- 3.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static intBOTTOMX axis placed at bottom ofDataGrouparea.static intLEFTY axis placed left ofDataGrouparea.static intLINEARLinear transform type.static intLOGLog transform type.static intMANUALAxes placed in default locations.static intPLAINPlain linear axis type.static intREFERENCERefer to a transform in anotherDataGroup.static intRIGHTY axis placed right ofDataGrouparea.static intTIMETime axis type.static intTOPX axis placed at top ofDataGrouparea.static intX_DIRX direction.static intY_DIRY direction.
-
Constructor Summary
Constructors Constructor and Description DataGroup()Default constructor.DataGroup(java.lang.String id, PanelHolder ph)Simple constructor.DataGroup(java.lang.String id, PanelHolder ph, int xt, int xAxis, int yt, int yAxis)Full constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddChangeListener(javax.swing.event.ChangeListener l)Add changelistenerjava.lang.StringgetId()Get datagroup id.MargingetMargin()Get the margin.intgetNumberAutoContourLevels()Get number of auto contour levels.PanelHoldergetPanelHolder()Get parent.AxisHoldergetXAxisHolder()Get X axisholderAxisHoldergetYAxisHolder()Get Y axisholder.SoTRangegetZRangeU()Get Z range.booleanisInstantiated()Is datagrouplayer instantiated?booleanisZAutoScale()Is auto Z scale?booleanisZoomable()Is datagroup zoomable?voidremoveAllChangeListeners()Remove allChangeListeners.voidremoveChangeListener(javax.swing.event.ChangeListener l)Remove changelistener.voidremoveDesignChangeListeners()Remove allChangeListeners that implement theDesignListenerinterface.voidsetId(java.lang.String id)Set datagroup id.voidsetInstantiated(boolean instantiated)Set instantiated.voidsetMargin(float top, float left, float bottom, float right)Set the Margin.voidsetMargin(Margin margin)Set the margin.voidsetNumberAutoContourLevels(int numberAutoContourLevels)Set number of auto contour levels.voidsetPanelHolder(PanelHolder ph)Set panelhodler parent.voidsetXAxisHolder(AxisHolder xah)Set X axisholdervoidsetYAxisHolder(AxisHolder yah)Set Y axisholdervoidsetZAutoScale(boolean zAutoScale)Set auto Z scale.voidsetZoomable(boolean zoomable)Set datagroup zoomable.voidsetZRangeU(SoTRange zRange)Set Z range, user units.voidstateChanged(javax.swing.event.ChangeEvent e)ChangeListnercallback.
-
-
-
Field Detail
-
TOP
public static final int TOP
X axis placed at top ofDataGrouparea.- See Also:
- Constant Field Values
-
BOTTOM
public static final int BOTTOM
X axis placed at bottom ofDataGrouparea.- See Also:
- Constant Field Values
-
LEFT
public static final int LEFT
Y axis placed left ofDataGrouparea.- See Also:
- Constant Field Values
-
RIGHT
public static final int RIGHT
Y axis placed right ofDataGrouparea.- See Also:
- Constant Field Values
-
MANUAL
public static final int MANUAL
Axes placed in default locations.- See Also:
- Constant Field Values
-
LINEAR
public static final int LINEAR
Linear transform type.- See Also:
- Constant Field Values
-
LOG
public static final int LOG
Log transform type.- See Also:
- Constant Field Values
-
REFERENCE
public static final int REFERENCE
Refer to a transform in anotherDataGroup.- See Also:
- Constant Field Values
-
TIME
public static final int TIME
Time axis type.- See Also:
- Constant Field Values
-
PLAIN
public static final int PLAIN
Plain linear axis type.- See Also:
- Constant Field Values
-
X_DIR
public static final int X_DIR
X direction.- See Also:
- Constant Field Values
-
Y_DIR
public static final int Y_DIR
Y direction.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DataGroup
public DataGroup()
Default constructor.PanelHodleris set tonull. X and Y transforms are LINEAR and axes PLAIN.
-
DataGroup
public DataGroup(java.lang.String id, PanelHolder ph)Simple constructor. X and Y transforms are LINEAR and axes PLAIN.- Parameters:
id- data group idph- panelholder parent
-
DataGroup
public DataGroup(java.lang.String id, PanelHolder ph, int xt, int xAxis, int yt, int yAxis)Full constructor.- Parameters:
id- data group idph- panelholder parentxt- x transform typexAxis- x axis typeyt- y transform typeyAxis- y axis type
-
-
Method Detail
-
setPanelHolder
public void setPanelHolder(PanelHolder ph)
Set panelhodler parent.- Parameters:
ph- panelholder parent
-
getPanelHolder
public PanelHolder getPanelHolder()
Get parent.- Returns:
- panelholder parent
-
getXAxisHolder
public AxisHolder getXAxisHolder()
Get X axisholder- Returns:
- x axisholder
-
setXAxisHolder
public void setXAxisHolder(AxisHolder xah)
Set X axisholder- Parameters:
xah- x axisholder
-
getYAxisHolder
public AxisHolder getYAxisHolder()
Get Y axisholder.- Returns:
- y axisholder
-
setYAxisHolder
public void setYAxisHolder(AxisHolder yah)
Set Y axisholder- Parameters:
yah- y axisholder
-
getId
public java.lang.String getId()
Get datagroup id.- Returns:
- datagroup id
-
setId
public void setId(java.lang.String id)
Set datagroup id.- Parameters:
id- datagroup id
-
getMargin
public Margin getMargin()
Get the margin.- Returns:
- margin
-
setMargin
public void setMargin(Margin margin)
Set the margin. The margin is used to automatically place the axes in aPanel. The margin is the distance from each edge of thePanelto theDataGroup. Default is (0.25f, 0.5f, 0.5f, 0.25f)- Parameters:
margin- margin
-
setMargin
public void setMargin(float top, float left, float bottom, float right)Set the Margin. Default is (0.25f, 0.5f, 0.5f, 0.25f)- Parameters:
top- top marginleft- left marginbottom- bottom marginright- right margin
-
removeAllChangeListeners
public void removeAllChangeListeners()
Remove allChangeListeners.
-
setZAutoScale
public void setZAutoScale(boolean zAutoScale)
Set auto Z scale. Auto Z scale is only effective for grids. Default = true.- Parameters:
zAutoScale- autoscale if true
-
isZAutoScale
public boolean isZAutoScale()
Is auto Z scale?- Returns:
- true, if auto z scale
-
setZRangeU
public void setZRangeU(SoTRange zRange)
Set Z range, user units. Only used if Auto Z Scale is false. Default = (0, 1, 0.1).- Parameters:
zRange- Z range
-
getZRangeU
public SoTRange getZRangeU()
Get Z range.- Returns:
- Z range
-
setZoomable
public void setZoomable(boolean zoomable)
Set datagroup zoomable. If true, datagroup can be zoomed using the mouse. Default = true.- Parameters:
zoomable- datagroup zoomable
-
isZoomable
public boolean isZoomable()
Is datagroup zoomable?- Returns:
- true, if datagroup zoomable
-
removeChangeListener
public void removeChangeListener(javax.swing.event.ChangeListener l)
Remove changelistener.- Parameters:
l- changelistener
-
addChangeListener
public void addChangeListener(javax.swing.event.ChangeListener l)
Add changelistener- Parameters:
l- changelistener
-
removeDesignChangeListeners
public void removeDesignChangeListeners()
Remove allChangeListeners that implement theDesignListenerinterface.- See Also:
DesignListener
-
setInstantiated
public void setInstantiated(boolean instantiated)
Set instantiated. Once associatedDataGroupLayerobject has been created this property is set true. Used internally.- Parameters:
instantiated- true if instantiated
-
isInstantiated
public boolean isInstantiated()
Is datagrouplayer instantiated?- Returns:
- true, if datagrouplayer instantiated
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
ChangeListnercallback.- Specified by:
stateChangedin interfacejavax.swing.event.ChangeListener- Parameters:
e- ChangeEvent
-
getNumberAutoContourLevels
public int getNumberAutoContourLevels()
Get number of auto contour levels. Valid for grid type data only.- Returns:
- number of auto contour levels
-
setNumberAutoContourLevels
public void setNumberAutoContourLevels(int numberAutoContourLevels)
Set number of auto contour levels. Valid for grid type data only.- Parameters:
numberAutoContourLevels- number of contour levels
-
-
DMelt 3.0 © DataMelt by jWork.ORG