|
|||||||||
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 | |
---|---|
private static short |
ALNUM
|
private static short |
ALPHA
|
private static short |
CN
|
private static short[] |
ctype
|
private static short |
DG
|
private static short |
GRAPH
|
private static short |
HD
|
private static short |
LC
|
private static short |
LOWERTOUPPER
|
private static short |
OD
|
private static short |
ODIGIT
|
private static short |
PRINT
|
private static short |
PU
|
private static short |
SP
|
private static short |
UC
|
private static short |
UPPERTOLOWER
|
private static short |
WS
|
private static short |
XDIGIT
|
Constructor Summary | |
---|---|
GrappaSupport()
|
Method Summary | |
---|---|
(package private) static double[] |
arrayForTuple(java.lang.String tuple)
|
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.Vector |
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. |
(package private) static float[] |
floatArrayForTuple(java.lang.String tuple)
|
(package private) static boolean |
isalnum(int ch)
for ASCII only |
(package private) static boolean |
isalpha(int ch)
for ASCII only |
(package private) static boolean |
isascii(int ch)
for ASCII only |
(package private) static boolean |
iscntrl(int ch)
for ASCII only |
(package private) static boolean |
isdigit(int ch)
for ASCII only |
(package private) static boolean |
isgraph(int ch)
for ASCII only |
(package private) static boolean |
islower(int ch)
for ASCII only |
(package private) static boolean |
isoctal(int ch)
for ASCII only |
(package private) static boolean |
isprint(int ch)
for ASCII only |
(package private) static boolean |
ispunct(int ch)
for ASCII only |
(package private) static boolean |
isspace(int ch)
for ASCII only |
(package private) static boolean |
isupper(int ch)
for ASCII only |
(package private) static boolean |
isxdigit(int ch)
for ASCII only |
static void |
setHighlight(Element elem,
int mode,
int setting)
Set the highlight on an element and, possibly, related elements. |
(package private) static java.lang.String[] |
strsplit(java.lang.String tuple)
|
(package private) static int |
tolower(int ch)
for ASCII only |
(package private) static int |
toupper(int ch)
for ASCII only |
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 |
Field Detail |
---|
private static final short CN
private static final short WS
private static final short SP
private static final short PU
private static final short DG
private static final short OD
private static final short UC
private static final short HD
private static final short LC
private static final short[] ctype
private static final short ALPHA
private static final short ALNUM
private static final short GRAPH
private static final short PRINT
private static final short ODIGIT
private static final short XDIGIT
private static final short LOWERTOUPPER
private static final short UPPERTOLOWER
Constructor Detail |
---|
public GrappaSupport()
Method Detail |
---|
static boolean isalnum(int ch)
static boolean isalpha(int ch)
static boolean isascii(int ch)
static boolean iscntrl(int ch)
static boolean isdigit(int ch)
static boolean isgraph(int ch)
static boolean islower(int ch)
static boolean isoctal(int ch)
static boolean isprint(int ch)
static boolean ispunct(int ch)
static boolean isspace(int ch)
static boolean isupper(int ch)
static boolean isxdigit(int ch)
static int tolower(int ch)
static int toupper(int ch)
static java.lang.String[] strsplit(java.lang.String tuple) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
static float[] floatArrayForTuple(java.lang.String tuple) throws java.lang.IllegalArgumentException, java.lang.NumberFormatException
java.lang.IllegalArgumentException
java.lang.NumberFormatException
static double[] arrayForTuple(java.lang.String tuple) throws java.lang.IllegalArgumentException, java.lang.NumberFormatException
java.lang.IllegalArgumentException
java.lang.NumberFormatException
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.Vector 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 |