japlot.jaxodraw
Class JaxoSaveGraph
- java.lang.Object
-
- japlot.jaxodraw.JaxoSaveGraph
-
- All Implemented Interfaces:
- java.io.Serializable
public class JaxoSaveGraph extends java.lang.Object implements java.io.SerializableA JaxoSaveGraph is the skeleton of a JaxoGraph: it contains just a Vector holding the list of JaxoObjects and a description of the graph.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static intLIST_INIT_SIZEThe default initial size for array lists.
-
Constructor Summary
Constructors Constructor and Description JaxoSaveGraph()Creates a new JaxoSaveGraph with empty list of objects and empty description.JaxoSaveGraph(java.util.ArrayList list)Creates a new JaxoSaveGraph with the given list of JaxoObjects.JaxoSaveGraph(java.util.ArrayList list, java.lang.String describe)Creates a new JaxoSaveGraph with the given list of objects and description.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddFirst(JaObject object)Adds the specified JaObject to the first positionvoidaddObject(JaObject object)Adds the specified JaObject to the list of objects by appending it.booleanbackground(JaObject object)Puts the specified JaObject into the background, i.e., to the first position in the object list.booleanclear()Removes all JaxoObjects from the list of objects.booleanclearAll()Removes all JaxoObjects from the list of objects and sets the description to a string to size zero.voiddelete(JaObject object)Removes the specified JaObject from the list of objects.booleanforeground(JaObject object)Puts the specified JaObject into the foreground, i.e., to the last position in the object list.double[]getBoundingBox()Returns the smallest bounding box that contains all the JaxoObjects of this JaxoSaveGraph.java.lang.StringgetDescription()Returns the description text of this JaxoSaveGraph.java.util.ArrayListgetObjectList()Returns the Vector holding the list of JaxoObjects.java.util.ArrayListgetPackageList()Returns the Vector holding the list of Latex packages.JaObjectlistElementAt(int i)Returns the JaObject at position i of the object list.intlistSize()Returns the size of the current object list, i.e., the number of objects it contains.voidreverse()Reverse the object listvoidsetDescription(java.lang.String describe)Sets the description text of this JaxoSaveGraph.voidsetObjectList(java.util.ArrayList list)Sets the list of JaxoObjects of this JaxoSaveGraph to list.voidsetPackageList(java.util.ArrayList list)Sets the list of Latex packages of this JaxoSaveGraph.
-
-
-
Field Detail
-
LIST_INIT_SIZE
public static final int LIST_INIT_SIZE
The default initial size for array lists.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JaxoSaveGraph
public JaxoSaveGraph()
Creates a new JaxoSaveGraph with empty list of objects and empty description.
-
JaxoSaveGraph
public JaxoSaveGraph(java.util.ArrayList list)
Creates a new JaxoSaveGraph with the given list of JaxoObjects.- Parameters:
list- The new list of objects
-
JaxoSaveGraph
public JaxoSaveGraph(java.util.ArrayList list, java.lang.String describe)Creates a new JaxoSaveGraph with the given list of objects and description.- Parameters:
list- Vector that holds the JaxoObjectsdescribe- String which decsribes this JaxoSaveGraph
-
-
Method Detail
-
getObjectList
public final java.util.ArrayList getObjectList()
Returns the Vector holding the list of JaxoObjects.- Returns:
- The vector holding the list of JaxoObjects.
-
setObjectList
public final void setObjectList(java.util.ArrayList list)
Sets the list of JaxoObjects of this JaxoSaveGraph to list.- Parameters:
list- The vector holding the new list of JaxoObjects.
-
getPackageList
public final java.util.ArrayList getPackageList()
Returns the Vector holding the list of Latex packages.- Returns:
- The vector holding the list of Latex packages.
-
reverse
public final void reverse()
Reverse the object list
-
setPackageList
public final void setPackageList(java.util.ArrayList list)
Sets the list of Latex packages of this JaxoSaveGraph.- Parameters:
list- The vector holding the new list of Latex packages.
-
setDescription
public final void setDescription(java.lang.String describe)
Sets the description text of this JaxoSaveGraph.- Parameters:
describe- The description of this JaxoSaveGraph.
-
getDescription
public final java.lang.String getDescription()
Returns the description text of this JaxoSaveGraph.- Returns:
- The decription of this JaxoSaveGraph.
-
listElementAt
public final JaObject listElementAt(int i)
Returns the JaObject at position i of the object list.- Parameters:
i- The index of the JaObject to be returned.- Returns:
- The JaObject at position i of the object list.
-
listSize
public final int listSize()
Returns the size of the current object list, i.e., the number of objects it contains.- Returns:
- The number of objects currently in the object list.
-
foreground
public final boolean foreground(JaObject object)
Puts the specified JaObject into the foreground, i.e., to the last position in the object list.- Parameters:
object- The JaObject to be put into the foreground.- Returns:
- True if the object was already in the foreground, i.e., the JaxoSaveGraph has not been modified.
-
background
public final boolean background(JaObject object)
Puts the specified JaObject into the background, i.e., to the first position in the object list.- Parameters:
object- The JaObject to be put into the background.- Returns:
- True if the JaObject was already in the background, i.e., the JaxoSaveGraph has not been modified.
-
delete
public final void delete(JaObject object)
Removes the specified JaObject from the list of objects.- Parameters:
object- The JaObject to be removed from the list.
-
addObject
public final void addObject(JaObject object)
Adds the specified JaObject to the list of objects by appending it.- Parameters:
object- The JaObject to be added to the list.
-
addFirst
public final void addFirst(JaObject object)
Adds the specified JaObject to the first position- Parameters:
object- The JaObject to be added to the list.
-
clear
public final boolean clear()
Removes all JaxoObjects from the list of objects.- Returns:
- True if the list was already empty before, i.e., the JaxoSaveGraph has not been modified.
-
clearAll
public final boolean clearAll()
Removes all JaxoObjects from the list of objects and sets the description to a string to size zero.- Returns:
- True if the list of objects and the string holding the description were already empty, i.e., the JaxoSaveGraph has not been modified.
-
getBoundingBox
public final double[] getBoundingBox()
Returns the smallest bounding box that contains all the JaxoObjects of this JaxoSaveGraph.- Returns:
- An array holding the bounds of the current JaxoSaveGraph: bBox[0] = Xmin, bBox[1] = Ymin, bBox[2] = Xmax and bBox[3] = Ymax.
-
-
DMelt 3.0 © DataMelt by jWork.ORG