Class PlotInfoWrapper
- java.lang.Object
-
- com.metsci.glimpse.core.plot.stacked.PlotInfoWrapper
-
- All Implemented Interfaces:
PlotInfo
- Direct Known Subclasses:
GroupInfoImpl,TimelineInfo,TimePlotInfoImpl,TimePlotInfoWrapper
public class PlotInfoWrapper extends Object implements PlotInfo
-
-
Constructor Summary
Constructors Constructor Description PlotInfoWrapper(PlotInfo info)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddLayout(GlimpseAxisLayout2D childLayout)Adds the childLayout to the part of the StackedPlot2D represented by this LayoutInfo.voiddeletePlot()Deprecated.GlimpseAxisLayout2DgetBaseLayout()Returns the baseGlimpseLayout.Axis1DgetCommonAxis()Returns the common axis shared by all the plots in a StackedPlot2D.Axis1DgetCommonAxis(GlimpseTargetStack stack)Returns the common axis associated with the given GlimpseTargetStack.ObjectgetId()Gets the unique identifier assigned to this plot.intgetIndentLevel()GlimpseAxisLayout2DgetLayout()Returns theGlimpseAxisLayout2Dfor this plot.StringgetLayoutData()intgetOrder()Axis1DgetOrthogonalAxis()Returns the data axis associated with this plot.Axis1DgetOrthogonalAxis(GlimpseTargetStack stack)Returns the data axis associated with the given GlimpseTargetStack.PlotInfogetParent()intgetPlotSpacing()intgetSize()StackedPlot2DgetStackedPlot()Gets a reference to the parent StackedPlot2D which this PlotInfo belongs to.booleanisExpanded()booleanisGrow()booleanisVisible()voidremovePlot()Removes this plot from its StackedPlot2D.voidsetGrow(boolean grow)Sets the plot to fill all available space.voidsetIndentLevel(int level)Sets the indentation level of this plot.voidsetLayoutData(String layoutData)Sets the MIG Layout constraints which position this PlotInfo within the StackedPlot2D.voidsetLookAndFeel(LookAndFeel laf)voidsetOrder(int order)Sets the ordering of this plot relative to the other plots in the StackedPlot2D.voidsetParent(PlotInfo parent)voidsetPlotSpacing(int spacing)Sets the spacing between this plot and those above and below it.voidsetSize(int size)Sets the size in pixels for this plot.voidsetVisible(boolean visible)If true, the PlotInfo will be drawn as a row on the timeline, if false the PlotInfo will be hidden.voidupdateLayout(int index)
-
-
-
Field Detail
-
info
public PlotInfo info
-
-
Constructor Detail
-
PlotInfoWrapper
public PlotInfoWrapper(PlotInfo info)
-
-
Method Detail
-
getLayoutData
public String getLayoutData()
- Specified by:
getLayoutDatain interfacePlotInfo- See Also:
PlotInfo.setLayoutData(String)
-
setLayoutData
public void setLayoutData(String layoutData)
Description copied from interface:PlotInfoSets the MIG Layout constraints which position this PlotInfo within the StackedPlot2D. Normally, calling this method is not necessary because the StackedPlot2D automatically positions its PlotInfo. However, this method can be used to override this default position.
Calling
PlotInfo.setLayoutData(String)withnullas the argument will cause the StackedPlot2D to resume automatically positioning this PlotInfo.- Specified by:
setLayoutDatain interfacePlotInfo
-
getStackedPlot
public StackedPlot2D getStackedPlot()
Description copied from interface:PlotInfoGets a reference to the parent StackedPlot2D which this PlotInfo belongs to.- Specified by:
getStackedPlotin interfacePlotInfo- Returns:
- the parent StackedPlot2D
-
getId
public Object getId()
Description copied from interface:PlotInfoGets the unique identifier assigned to this plot. This identifier can be used to retrieve this plot handle from the StackedPlot2D.
-
getOrder
public int getOrder()
-
getSize
public int getSize()
-
setOrder
public void setOrder(int order)
Description copied from interface:PlotInfoSets the ordering of this plot relative to the other plots in the StackedPlot2D. The particular value does not matter, only the values relative to other plots. All plots start with order 0. Plots with the same order value are arranged in the order they were added to the StackedPlot2D.
-
setSize
public void setSize(int size)
Description copied from interface:PlotInfoSets the size in pixels for this plot. If
size < 0, then the plot will attempt to fill all available space, sharing space evenly with other plots with negative size.For a VERTICAL oriented plot,
setSize( )adjusts the plot height, for a HORIZONTAL oriented plot, the width is adjusted.
-
isGrow
public boolean isGrow()
- Specified by:
isGrowin interfacePlotInfo- See Also:
PlotInfo.setGrow(boolean)
-
setGrow
public void setGrow(boolean grow)
Description copied from interface:PlotInfoSets the plot to fill all available space. First, fixed size plots are given their space (set by
PlotInfo.setSize(int)) and then all plots set to grow fill the remaining space.Setting the plot size to a negative value is the same as setting grow to true (but this behavior is deprecated and
PlotInfo.setGrow(boolean)should be used). Setting size to a positive value will set grow to false.
-
setPlotSpacing
public void setPlotSpacing(int spacing)
Description copied from interface:PlotInfoSets the spacing between this plot and those above and below it. This value overrides the default set viaStackedTimePlot2D.setPlotSpacing(int). This controls the space between this plot and the one above or to the right of it. The spacing between this plot and the one below or to the left is controlled by the other plots spacing.- Specified by:
setPlotSpacingin interfacePlotInfo
-
getPlotSpacing
public int getPlotSpacing()
- Specified by:
getPlotSpacingin interfacePlotInfo- See Also:
PlotInfo.setPlotSpacing(int)
-
getLayout
public GlimpseAxisLayout2D getLayout()
Description copied from interface:PlotInfoReturns theGlimpseAxisLayout2Dfor this plot. This can be used to add subplots of painters to the plotting area.
-
getBaseLayout
public GlimpseAxisLayout2D getBaseLayout()
Description copied from interface:PlotInfoReturns the baseGlimpseLayout. If this plot is made of a single GlimpseLayout,#getLayout()and#getBaseLayout()will return the same GlimpseLayout. Otherwise, the result of#getLayout()will be a child of#getBaseLayout(). Further,#getBaseLayout()will be a direct child of theStackedPlot2Dthat thisPlotInfois part of.- Specified by:
getBaseLayoutin interfacePlotInfo
-
getCommonAxis
public Axis1D getCommonAxis(GlimpseTargetStack stack)
Description copied from interface:PlotInfoReturns the common axis associated with the given GlimpseTargetStack. Users generally should simply callPlotInfo.getCommonAxis().- Specified by:
getCommonAxisin interfacePlotInfo
-
getOrthogonalAxis
public Axis1D getOrthogonalAxis(GlimpseTargetStack stack)
Description copied from interface:PlotInfoReturns the data axis associated with the given GlimpseTargetStack. Users generally should simply callPlotInfo.getOrthogonalAxis().- Specified by:
getOrthogonalAxisin interfacePlotInfo
-
getCommonAxis
public Axis1D getCommonAxis()
Description copied from interface:PlotInfoReturns the common axis shared by all the plots in a StackedPlot2D.- Specified by:
getCommonAxisin interfacePlotInfo- Returns:
- the shared axis for this plot
-
getOrthogonalAxis
public Axis1D getOrthogonalAxis()
Description copied from interface:PlotInfoReturns the data axis associated with this plot. The data axes for each GlimpseLayout in a StackedPlot2D are unlinked by default, but they can be linked if desired usingAxis1D.setParent( Axis1D ).- Specified by:
getOrthogonalAxisin interfacePlotInfo- Returns:
- the data axis for this plot
-
addLayout
public void addLayout(GlimpseAxisLayout2D childLayout)
Description copied from interface:PlotInfoAdds the childLayout to the part of the StackedPlot2D represented by this LayoutInfo. Also links the common axis of the child to the common axis of the parent layout.
-
setLookAndFeel
public void setLookAndFeel(LookAndFeel laf)
- Specified by:
setLookAndFeelin interfacePlotInfo
-
updateLayout
public void updateLayout(int index)
- Specified by:
updateLayoutin interfacePlotInfo
-
setVisible
public void setVisible(boolean visible)
Description copied from interface:PlotInfoIf true, the PlotInfo will be drawn as a row on the timeline, if false the PlotInfo will be hidden.- Specified by:
setVisiblein interfacePlotInfo
-
isVisible
public boolean isVisible()
- Specified by:
isVisiblein interfacePlotInfo- See Also:
PlotInfo.setVisible(boolean)
-
isExpanded
public boolean isExpanded()
- Specified by:
isExpandedin interfacePlotInfo
-
deletePlot
public void deletePlot()
Deprecated.- Specified by:
deletePlotin interfacePlotInfo
-
removePlot
public void removePlot()
Description copied from interface:PlotInfoRemoves this plot from its StackedPlot2D. This has the same effect as calling StackedPlot2D.removePlot( this.getId( ) )- Specified by:
removePlotin interfacePlotInfo
-
setIndentLevel
public void setIndentLevel(int level)
Description copied from interface:PlotInfoSets the indentation level of this plot. This can be- Specified by:
setIndentLevelin interfacePlotInfo
-
getIndentLevel
public int getIndentLevel()
- Specified by:
getIndentLevelin interfacePlotInfo- See Also:
PlotInfo.setIndentLevel(int)
-
-