Documentation of 'org.jplot2d.env.PlotEnvironment' Java class
PlotEnvironment
org.jplot2d.env

Class PlotEnvironment

  • Direct Known Subclasses:
    RenderEnvironment


    public class PlotEnvironment
    extends Environment
    This Environment can host a plot instance and provide undo/redo ability.
    • Constructor Detail

      • PlotEnvironment

        public PlotEnvironment(boolean threadSafe)
    • Method Detail

      • setPlot

        public void setPlot(Plot plot)
        Sets a plot to this environment. The plot must hosted by a dummy environment. All notices are logged to java logging facilities.
        Parameters:
        plot -
      • setPlot

        public void setPlot(Plot plot,
                            Notifier notifier)
        Sets a plot to this environment. The plot must hosted by a dummy environment.
        Parameters:
        plot -
        notifier - the notifier to receive and process notices
      • getPlot

        public Plot getPlot()
      • getNotifier

        public Notifier getNotifier()
        Returns the notifier of this environment. The notifier will receive notices during command execution and process all notices at once when command finished.
        Returns:
        the notifier of this environment
      • setNotifier

        public void setNotifier(Notifier notifier)
        Sets the notifier of this environment. The notifier will receive notices during command execution and process all notices at once when command finished.
        Parameters:
        notifier - the notifier to be used in this environment
      • getUndoLevels

        public int getUndoLevels()
        Returns the maximum number of reversible operations.
        Returns:
        the maximum number of reversible operations
      • setUndoLevels

        public void setUndoLevels(int levels)
        Sets the maximum number of reversible operations.
        Parameters:
        levels - the maximum number of reversible operations
      • canUndo

        public boolean canUndo()
        Returns true if undo is possible.
        Returns:
      • canRedo

        public boolean canRedo()
        Returns true if undo is possible.
        Returns:
      • undo

        public void undo()
        Undo the last change. If there is nothing to undo, an exception is thrown.
      • redo

        public void redo()
        Undo the last change. If there is nothing to undo, an exception is thrown.
      • getSelectableCompnentAt

        public PComponent getSelectableCompnentAt(java.awt.geom.Point2D dp)
        Return the top selectable component at the given location.
        Parameters:
        dp - the device point relative to top-left corner.
        Returns:
      • getPlotAt

        public Plot getPlotAt(java.awt.geom.Point2D dp)
        Return the most inner plot that contains the given location.
        Parameters:
        dp - the device point relative to top-left corner.
        Returns:

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.