|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.swfm.mica.sys.MiUtility
This file contains various, potentially useful, methods.
| Field Summary |
| Constructor Summary | |
MiUtility()
|
|
| Method Summary | |
static MiText |
assignShortCutFromLabel(MiPart widget,
MiiCommandHandler method,
java.lang.String text)
Parses the given text and assigns any short cut it specifies to the given widget. |
static MiPart |
createGraphics(java.lang.String name)
|
static MiPart |
createGraphics(java.lang.String name,
boolean ignoreCase)
|
static MiiLayout |
createLayout(java.lang.String name,
boolean ignoreCase,
boolean manipulatable)
Gets a layout object of the given type name. |
static MiPart |
createShape(java.lang.String name)
|
static MiPart |
createShape(java.lang.String name,
boolean ignoreCase)
|
static boolean |
equals(java.lang.String one,
java.lang.String other,
boolean ignoreCase)
|
static void |
gatherRootNodes(MiPart container,
MiParts roots)
Gets the list of root nodes for all of the nodes in the given container. |
static void |
getActualShapesToApplyAttributeChangeTo(MiPart target,
MiParts expandedListOfParts)
|
static MiParts |
getActualShapesToApplyAttributeChangeTo(MiParts parts)
|
static MiParts |
getAllDescendentsWithName(MiPart parent,
java.lang.String name,
boolean ignoreCase)
Gets the descendents of the given MiPart who have the given name. |
static MiParts |
getAllParts(MiPart container,
MiParts parts)
|
static void |
getBoundsOfTree(MiPart root,
java.lang.String connectionType,
MiBounds bounds)
|
static MiParts |
getChildren(MiPart parent)
Gets the children of the given MiPart. |
static MiPart |
getCommonContainer(MiPart child1,
MiPart child2)
Gets the MiPart that is a container of both of the given MiParts. |
static MiPart |
getDeepPart(MiPart container,
java.lang.String name)
Gets the part in the given container or in one of the parts of this container that has the given name. |
static java.awt.Frame |
getFrame(java.awt.Component applet)
Gets the Frame that contains the component. |
static boolean |
getIntersectionOfTwoLines(MiPoint p1,
MiPoint p2,
MiPoint q1,
MiPoint q2,
MiPoint intersection)
Gets the intersection of two lines or returns false if there is no intersection. |
static boolean |
getIntersectionOfTwoLineSegments(MiPoint p1,
MiPoint p2,
MiPoint q1,
MiPoint q2,
MiPoint intersection)
Gets the intersection of two lines or returns false if there is no intersection. |
static MiPoint |
getLocationOfLineLocation(MiPart target,
int location,
MiBounds boundsToPosition,
MiPoint pt,
MiMargins margins)
|
static MiPoint |
getLocationWithRespectToPart(MiPart target,
int location,
MiBounds boundsToPosition,
MiPoint pt,
MiMargins margins)
|
static MiPart |
getManipulatableContainerOfPart(MiEditor editor,
MiPart part)
|
static int |
getMaxDepth(MiPart part)
Gets the maximum depth of the given node in it's graph of connections (i.e. |
static int |
getMaxDepth(MiParts roots)
Gets the maximum depth of a node in the graph with the given root nodes (i.e. |
static MiParts |
getParents(MiPart child)
Gets the parents of the given MiPart. |
static boolean |
getPath(MiPart parent,
MiPart child,
MiParts path)
Get the list of MiParts (path) in the container-part hierarchy between and including the given parent and given child. |
static boolean |
getPath(MiPart parent,
MiPart child,
MiParts path,
MiParts validNodes)
Get the list of MiParts (path) in the container-part hierarchy between and including the given parent and given child. |
static boolean |
getPointFromPartNamePointNumberSpec(MiPart part,
java.lang.String spec,
MiPoint returnedPoint)
|
static MiRenderer |
getRenderer(MiPart part)
Get a renderer to use to draw using the coordinates and transforms compatible with the MiPart. |
static MiTransforms |
getTransformsAlongPath(MiPart parent,
MiPart child)
Get the list of MiiTranforms in the container-part hierarchy between and including the given parent and given child. |
static boolean |
getTransformsAlongPath(MiPart parent,
MiPart child,
FastVector transforms)
Get the list of MiiTranforms in the container-part hierarchy between and including the given parent and given child. |
static boolean |
isLocallyRequestingEventType(MiPart part,
MiEvent event)
Gets whether the given MiPart's event handlers are interested in the given event. |
static MiParts |
makeCopyOfNetwork(MiParts network)
|
static boolean |
partAndContainersAreVisible(MiPart part)
|
static boolean |
pathExists(MiPart src,
MiPart dest,
MiParts path,
boolean depthfirstSearch)
Gets whether a path (a sequence of connections) exist between the two given MiParts. |
static void |
popMouseAppearance(MiPart part,
java.lang.String identifier)
Restores the mouse appearance to the appearance of the mouse before the corresponding call to #pushMouseAppearance which used this identifier. |
static void |
pushMouseAppearance(MiPart part,
int appearance,
java.lang.String identifier)
Sets the mouse appearance. |
static void |
rotate(MiPoint pt,
MiPoint centerOfRotation,
double radians)
|
static int |
rotateAndFlipExitDirectionMask(int mask,
double radians,
boolean flipped)
|
static void |
translateTree(MiPart parent,
java.lang.String connectionType,
double tx,
double ty)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MiUtility()
| Method Detail |
public static boolean getIntersectionOfTwoLines(MiPoint p1,
MiPoint p2,
MiPoint q1,
MiPoint q2,
MiPoint intersection)
p1 - the start point of line 1p2 - the end point of line 1q1 - the start point of line 2intersection - the (returned) point of intersection
public static boolean getIntersectionOfTwoLineSegments(MiPoint p1,
MiPoint p2,
MiPoint q1,
MiPoint q2,
MiPoint intersection)
p1 - the start point of line 1p2 - the end point of line 1q1 - the start point of line 2intersection - the (returned) point of intersection
public static MiPart getCommonContainer(MiPart child1,
MiPart child2)
child1 - the given MiPartchild2 - the given MiPart
public static MiParts getParents(MiPart child)
public static MiParts getChildren(MiPart parent)
parent - the given MiPart
public static MiParts getAllDescendentsWithName(MiPart parent,
java.lang.String name,
boolean ignoreCase)
parent - the given MiPartname - the name to matchignoreCase - true if ignore case of name
public static boolean pathExists(MiPart src,
MiPart dest,
MiParts path,
boolean depthfirstSearch)
src - the start of the pathdest - the end of the pathpath - the (returned) pathdepthfirstSearch - true if depth first, false if
breadth first search is to be
performed
public static int getMaxDepth(MiParts roots)
roots - the list of root nodes
public static int getMaxDepth(MiPart part)
part - the part
public static void gatherRootNodes(MiPart container,
MiParts roots)
container - the container of the partsroots - the (returned) roots of the graph
public static boolean isLocallyRequestingEventType(MiPart part,
MiEvent event)
event - the event
public static MiRenderer getRenderer(MiPart part)
part - A part
public static boolean getTransformsAlongPath(MiPart parent,
MiPart child,
FastVector transforms)
parent - the given parentchild - the given childtransforms - the (returned) list of transforms
getPath(com.swfm.mica.core.MiPart, com.swfm.mica.core.MiPart, com.swfm.mica.core.MiParts)
public static MiTransforms getTransformsAlongPath(MiPart parent,
MiPart child)
parent - the given parentchild - the given child
getPath(com.swfm.mica.core.MiPart, com.swfm.mica.core.MiPart, com.swfm.mica.core.MiParts)
public static boolean getPath(MiPart parent,
MiPart child,
MiParts path)
parent - the given parentchild - the given childpath - the (returned) list of parts (path)
getTransformsAlongPath(com.swfm.mica.core.MiPart, com.swfm.mica.core.MiPart, com.swfm.mica.util.FastVector)
public static boolean getPath(MiPart parent,
MiPart child,
MiParts path,
MiParts validNodes)
parent - the given parentchild - the given childpath - the (returned) list of parts (path)validNodes - valid parts along the path
getTransformsAlongPath(com.swfm.mica.core.MiPart, com.swfm.mica.core.MiPart, com.swfm.mica.util.FastVector)public static java.awt.Frame getFrame(java.awt.Component applet)
public static MiPart getDeepPart(MiPart container,
java.lang.String name)
container - the container of the parts to checkname - the given name
public static void getBoundsOfTree(MiPart root,
java.lang.String connectionType,
MiBounds bounds)
public static void translateTree(MiPart parent,
java.lang.String connectionType,
double tx,
double ty)
public static MiParts makeCopyOfNetwork(MiParts network)
public static MiText assignShortCutFromLabel(MiPart widget,
MiiCommandHandler method,
java.lang.String text)
widget - The widget to assign any short
cuts to.method - The method to call when the short
cut is activated by the end-user.text - The string to parse looking for
short cuts.
public static void pushMouseAppearance(MiPart part,
int appearance,
java.lang.String identifier)
part - a part in the root window in which
this sets the mouse appearance or
nullappearance - the mouse cursor appearanceidentifier - identifies the current position in
the mouse appearance stackMiEditor.pushMouseAppearance(int, java.lang.String)
public static void popMouseAppearance(MiPart part,
java.lang.String identifier)
part - a part in the root window in which
this restores the mouse appearance
or nullidentifier - identifies a position in the mouse
appearance stackMiEditor.popMouseAppearance(java.lang.String)
public static MiParts getAllParts(MiPart container,
MiParts parts)
public static MiParts getActualShapesToApplyAttributeChangeTo(MiParts parts)
public static void getActualShapesToApplyAttributeChangeTo(MiPart target,
MiParts expandedListOfParts)
public static MiPart getManipulatableContainerOfPart(MiEditor editor,
MiPart part)
public static boolean getPointFromPartNamePointNumberSpec(MiPart part,
java.lang.String spec,
MiPoint returnedPoint)
spec - of form: "subPartName.subPartPointNumber"
public static MiPoint getLocationWithRespectToPart(MiPart target,
int location,
MiBounds boundsToPosition,
MiPoint pt,
MiMargins margins)
public static MiPoint getLocationOfLineLocation(MiPart target,
int location,
MiBounds boundsToPosition,
MiPoint pt,
MiMargins margins)
public static int rotateAndFlipExitDirectionMask(int mask,
double radians,
boolean flipped)
public static void rotate(MiPoint pt,
MiPoint centerOfRotation,
double radians)
public static MiPart createGraphics(java.lang.String name)
public static MiPart createGraphics(java.lang.String name,
boolean ignoreCase)
public static MiPart createShape(java.lang.String name)
public static MiPart createShape(java.lang.String name,
boolean ignoreCase)
public static MiiLayout createLayout(java.lang.String name,
boolean ignoreCase,
boolean manipulatable)
name - the name of a layoutignoreCase - manipulatable - true if this should be a manipulatable
layout template, if the layout is an
instance of MiManipulatableLayout.
public static boolean partAndContainersAreVisible(MiPart part)
public static boolean equals(java.lang.String one,
java.lang.String other,
boolean ignoreCase)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||