|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectatt.grappa.GrappaSupport
public abstract class GrappaSupport
A class providing some supports function for Grappa.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
GrappaSupport()
|
|
| Method Summary | |
|---|---|
static GrappaBox |
boxFromCorners(double x1,
double y1,
double x2,
double y2)
Creates a GrappaBox from the coordinates of any two opposing corners. |
static GrappaBox |
boxFromCorners(GrappaBox box,
double x1,
double y1,
double x2,
double y2)
Creates a GrappaBox from the coordinates of any two opposing corners. |
static java.lang.String |
canonize(java.lang.String input)
Canonize string by converting to lower-case and removing all non-letter, non-digit characters. |
static boolean |
centerPanel(java.awt.geom.Point2D cpt,
GrappaPanel gpanel)
Scroll to the viewport containing the specified GrappaPanel so that it is centered on the given point. |
static boolean |
filterGraph(Graph graph,
java.lang.Object connector)
Filter the supplied graph using the given connector. |
static boolean |
filterGraph(Graph graph,
java.lang.Object connector,
java.lang.String preamble)
Filter the supplied graph using the given connector. |
static java.util.List |
findContainedElements(Subgraph subg,
GrappaBox box)
Find the elements in the supplied subgraph that are contained in the given box. |
static Element |
findContainingElement(Subgraph subg,
java.awt.geom.Point2D pt)
Find an element in the supplied subgraph that contains the given point. |
static void |
setHighlight(Element elem,
int mode,
int setting)
Set the highlight on an element and, possibly, related elements. |
static java.lang.String |
xlateDir(int direction)
Converts an integer edge direction value to a string representation. |
static int |
xlateDirString(java.lang.String direction)
Converts a string to an integer edge direction. |
static java.lang.String |
xlateFontStyle(int fontstyle)
Converts an integer font style value to a string representation. |
static int |
xlateFontStyleString(java.lang.String fontstyle)
Converts a string to an integer font style. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GrappaSupport()
| Method Detail |
|---|
public static int xlateDirString(java.lang.String direction)
direction - a string representing an edge direction
public static java.lang.String xlateDir(int direction)
direction - an integer representing an edge direction
public static int xlateFontStyleString(java.lang.String fontstyle)
fontstyle - a string representing a font style
public static java.lang.String xlateFontStyle(int fontstyle)
fontstyle - an integer representing a font style
public static java.lang.String canonize(java.lang.String input)
input - the string to be canonized
public static GrappaBox boxFromCorners(double x1,
double y1,
double x2,
double y2)
x1 - x-coordinate of corner number 1.y1 - x-coordinate of corner number 1.x2 - x-coordinate of corner number 2, which is opposite corner 1.y2 - x-coordinate of corner number 2, which is opposite corner 1.
public static GrappaBox boxFromCorners(GrappaBox box,
double x1,
double y1,
double x2,
double y2)
box - if non-null, the coordinates of this box are changed and this box is returned, otherwise a new box is created.x1 - x-coordinate of corner number 1.y1 - x-coordinate of corner number 1.x2 - x-coordinate of corner number 2, which is opposite corner 1.y2 - x-coordinate of corner number 2, which is opposite corner 1.
public static Element findContainingElement(Subgraph subg,
java.awt.geom.Point2D pt)
subg - the subgraph to be searched.pt - the point of the search.
public static java.util.List findContainedElements(Subgraph subg,
GrappaBox box)
subg - the subgraph to be searched.pt - the container box.
public static void setHighlight(Element elem,
int mode,
int setting)
elem - the element whose highlighting is to be adjusted.mode - the highlight mode to apply or remove; a mode of
zero indicates all highlighting is turned off regardless
of the setting.setting - one of HIGHLIGHT_ON, HIGHLIGHT_OFF or HIGHLIGHT_TOGGLE.
public static boolean filterGraph(Graph graph,
java.lang.Object connector)
Unlike previous versions of Grappa, this version does not try to explicitly redraw the graph after filtering is completed.
graph - the graph to be processed and resetconnector - a Process or URLConnector that provides an input and
output stream
public static boolean filterGraph(Graph graph,
java.lang.Object connector,
java.lang.String preamble)
Unlike previous versions of Grappa, this version does not try to explicitly redraw the graph after filtering is completed.
graph - the graph to be processed and resetconnector - a Process or URLConnector that provides an input and
output streampreamble - if not null, a string sent to filter prior to graph
public static boolean centerPanel(java.awt.geom.Point2D cpt,
GrappaPanel gpanel)
cpt - the point to place at the center of the GrappaPanel viewportgpanel - the GrappaPanel displaying the graph
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||