Class XYGraphMementoUtil


  • public class XYGraphMementoUtil
    extends java.lang.Object
    Utility to manage XYGraphMemento create, save and restore functions These functions are used by XYGraphConfigCommand and XYGraphConfigDialog
    • Constructor Detail

      • XYGraphMementoUtil

        public XYGraphMementoUtil()
    • Method Detail

      • createEmptyMemento

        public static XYGraphMemento createEmptyMemento​(IXYGraph xyGraph)
        Creates an empty memento given a XYGraph
        Parameters:
        xyGraph - the graph for which an empty memento is created
        Returns:
        a XYGraph memento
      • createMemento

        public static XYGraphMemento createMemento​(IXYGraph xyGraph)
        Creates a memento given a XYGraph
        Parameters:
        xyGraph - the graph for which the memento is created
        Returns:
        the memento created
      • saveXYGraphPropsToMemento

        public static void saveXYGraphPropsToMemento​(IXYGraph xyGraph,
                                                     XYGraphMemento memento)
        Saves props to the given memento
        Parameters:
        xyGraph - the graph
        memento - memento used to save props
      • restoreXYGraphPropsFromMemento

        public static void restoreXYGraphPropsFromMemento​(IXYGraph xyGraph,
                                                          XYGraphMemento memento)
        Restores the XYGraph props from the given memento
        Parameters:
        xyGraph - the graph
        memento - memento from where to restore graph props
      • saveAnnotationPropsToMemento

        private static void saveAnnotationPropsToMemento​(Annotation annotation,
                                                         AnnotationMemento memento)
      • restoreAnnotationPropsFromMemento

        private static void restoreAnnotationPropsFromMemento​(Annotation annotation,
                                                              AnnotationMemento memento)
      • saveAxisPropsToMemento

        private static void saveAxisPropsToMemento​(Axis axis,
                                                   AxisMemento memento)
      • restoreAxisPropsFromMemento

        private static void restoreAxisPropsFromMemento​(Axis axis,
                                                        AxisMemento memento)
      • saveTracePropsToMemento

        private static void saveTracePropsToMemento​(Trace trace,
                                                    TraceMemento memento)
      • restoreTracePropsFromMemento

        private static void restoreTracePropsFromMemento​(Trace trace,
                                                         TraceMemento memento)