public class JaxoSaveGraph
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
LIST_INIT_SIZE
The default initial size for array lists.
|
Constructor and Description |
---|
JaxoSaveGraph()
Creates a new JaxoSaveGraph with empty list of JaxoObjects,
empty description and default package list.
|
JaxoSaveGraph(JaxoList list)
Creates a new JaxoSaveGraph with the given list of JaxoObjects
empty description and default package list.
|
JaxoSaveGraph(JaxoList list,
java.lang.String describe)
Creates a new JaxoSaveGraph with the given list of objects,
description and default package list.
|
JaxoSaveGraph(JaxoList list,
java.lang.String describe,
java.util.List packages)
Creates a new JaxoSaveGraph with the given list of objects,
description and package list.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addObject(int index,
JaxoObject object)
Inserts a JaxoObject into the list of objects at a given position.
|
boolean |
addObject(JaxoObject object)
Adds the specified JaxoObject to the list of objects by appending it.
|
void |
addPackage(java.lang.String pack)
Adds a latex package to the list of packages by appending it.
|
boolean |
background(JaxoObject object)
Puts the specified JaxoObject into the background, i.e.,
to the first position in the object list.
|
boolean |
clear()
Removes all JaxoObjects from the list of objects.
|
boolean |
clearAll()
Removes all JaxoObjects from the list of objects and sets the
description to a string to size zero.
|
JaxoSaveGraph |
copyOf()
Returns a copy of this JaxoSaveGraph.
|
boolean |
delete(JaxoObject object)
Removes the specified JaxoObject from the list of objects.
|
boolean |
deleteAll(java.util.Collection objects)
Removes the specified objects from the list of objects.
|
boolean |
deleteMarkedObjects()
Removes all marked JaxoObjects from the list of objects.
|
boolean |
foreground(JaxoObject object)
Puts the specified JaxoObject into the foreground, i.e.,
to the last position in the object list.
|
java.awt.Rectangle |
getBounds()
Returns the smallest bounding box that contains all the JaxoObjects
of this JaxoSaveGraph.
|
java.awt.Rectangle |
getBounds(java.awt.Rectangle inside)
Intersection of bounding box with given Rectangle.
|
java.awt.Rectangle |
getBoundsExcept(java.util.Collection except)
Returns the smallest bounding box that contains all the JaxoObjects
of this JaxoSaveGraph except the one given in 'except'.
|
java.lang.String |
getDescription()
Returns the description text of this JaxoSaveGraph.
|
java.lang.String |
getJaxoDrawVersion()
Returns the JaxoDraw version that this JaxoSaveGraph was created with.
|
JaxoList |
getObjectList()
Returns the Vector holding the list of JaxoObjects.
|
java.util.List |
getPackageList()
Returns the Vector holding the list of Latex packages.
|
boolean |
isCopy(JaxoSaveGraph graph)
Determines if this JaxoSaveGraph is a copy of the specified one.
|
JaxoObject |
listElementAt(int i)
Returns the JaxoObject at position i of the object list.
|
int |
listSize()
Returns the size of the current object list,
i.e., the number of objects it contains.
|
void |
move(int index,
int newIndex)
Move the object at 'index' to 'newIndex', leaving all
other elements in order.
|
void |
setDescription(java.lang.String describe)
Sets the description text of this JaxoSaveGraph.
|
void |
setJaxoDrawVersion(java.lang.String version)
Set the JaxoDraw version that this JaxoSaveGraph was created with.
|
void |
setObjectList(JaxoList list)
Sets the list of JaxoObjects of this JaxoSaveGraph to list.
|
void |
setPackageList(java.util.List list)
Sets the list of Latex packages of this JaxoSaveGraph.
|
public static final int LIST_INIT_SIZE
public JaxoSaveGraph()
public JaxoSaveGraph(JaxoList list)
list
- The new list of objects.public JaxoSaveGraph(JaxoList list, java.lang.String describe)
list
- Vector that holds the JaxoObjectsdescribe
- String which decsribes this JaxoSaveGraphpublic JaxoSaveGraph(JaxoList list, java.lang.String describe, java.util.List packages)
list
- JaxoList that holds the JaxoObjectsdescribe
- String which describes this JaxoSaveGraphpackages
- ArrayList that holds the latex packages.public final JaxoList getObjectList()
public final void setObjectList(JaxoList list)
list
- The vector holding the new list of JaxoObjects.public final java.util.List getPackageList()
public final void setPackageList(java.util.List list)
list
- The vector holding the new list of Latex packages.public final void setDescription(java.lang.String describe)
describe
- The description of this JaxoSaveGraph.public final java.lang.String getDescription()
public final java.lang.String getJaxoDrawVersion()
public final void setJaxoDrawVersion(java.lang.String version)
version
- the JaxoDraw version.public final JaxoObject listElementAt(int i)
i
- The index of the JaxoObject to be returned.public final int listSize()
public final boolean foreground(JaxoObject object)
object
- The JaxoObject to be put into the foreground.public final boolean background(JaxoObject object)
object
- The JaxoObject to be put into the background.public final void move(int index, int newIndex)
index
- The index of the object to move.newIndex
- The new index of the object.public final boolean delete(JaxoObject object)
object
- The JaxoObject to be removed from the list.public final boolean deleteMarkedObjects()
public final boolean deleteAll(java.util.Collection objects)
objects
- Collection of JaxoObjects to be removed from the list.public final boolean addObject(JaxoObject object)
object
- The JaxoObject to be added to the list.public final boolean addObject(int index, JaxoObject object)
index
- The position where the object has to be inserted.object
- The JaxoObject to be added to the list.public final void addPackage(java.lang.String pack)
pack
- The name of the latex package to be added to the list.public final boolean clear()
public final boolean clearAll()
public final java.awt.Rectangle getBounds()
public final java.awt.Rectangle getBoundsExcept(java.util.Collection except)
except
- objects to exclude.public final java.awt.Rectangle getBounds(java.awt.Rectangle inside)
inside
- The Rectangle to intersect with.getBounds()
public JaxoSaveGraph copyOf()
public boolean isCopy(JaxoSaveGraph graph)
graph
- the JaxoSaveGraph to compare with.Licensed under GPL. For more information, see http://jaxodraw.sourceforge.net/license.html or the LICENSE file in the jaxodraw distribution.