public class LayoutStorage
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
boolean |
enabled
If storage is disabled, no persistent layout is available.
|
Constructor and Description |
---|
LayoutStorage() |
Modifier and Type | Method and Description |
---|---|
void |
checkSignificance(java.lang.String rootTable)
Removes layout if it is not significant.
|
double[] |
getPosition(java.lang.String rootTable,
java.lang.String table)
Gets position.
|
java.util.Map<java.lang.String,double[]> |
getPositions(java.lang.String root)
Gets positions of all tables for a given root-table.
|
void |
removeAll()
Removes all position information.
|
void |
removeAll(java.lang.String root)
Removes all position information for a given root table.
|
void |
restore(java.lang.String file)
Restores a layout from file
|
void |
setPosition(java.lang.String rootTable,
java.lang.String table,
double[] position)
Sets position.
|
void |
setTempStorage(java.util.Map<java.lang.String,double[]> tmp) |
void |
store(java.io.PrintWriter out)
Store layout into stream.
|
void |
store(java.io.PrintWriter out,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,double[]>> positions)
Store layout into stream.
|
public volatile boolean enabled
public void setPosition(java.lang.String rootTable, java.lang.String table, double[] position)
rootTable
- root tabletable
- tableposition
- position: x, y, isFixedpublic void checkSignificance(java.lang.String rootTable)
rootTable
- root table for which the layout ispublic double[] getPosition(java.lang.String rootTable, java.lang.String table)
rootTable
- root tabletable
- tablepublic java.util.Map<java.lang.String,double[]> getPositions(java.lang.String root)
root
- the root tablepublic void removeAll(java.lang.String root)
root
- the root tablepublic void removeAll()
public void store(java.io.PrintWriter out)
out
- the streampublic void store(java.io.PrintWriter out, java.util.Map<java.lang.String,java.util.Map<java.lang.String,double[]>> positions)
out
- the streampublic void restore(java.lang.String file)
file
- the filepublic void setTempStorage(java.util.Map<java.lang.String,double[]> tmp)