|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.kiml.ui.util.KimlUiUtil
public final class KimlUiUtil
Utility methods used for the KIML UI.
Method Summary | |
---|---|
static Insets |
calcInsets(IFigure parent,
IFigure child)
Determines the insets for a parent figure, relative to the given child. |
static Rectangle |
getAbsoluteBounds(IFigure figure)
Calculates the absolute bounds of the given figure. |
static Point |
getAbsolutePoint(Connection connection,
int index)
Calculates an absolute position for one of the bend points of the given connection. |
static Point |
getAbsolutePosition(KNode node)
Will return the absolute position on the canvas of an KNode from a KGraph. |
static Point |
getAbsolutePosition(KPort port)
Will return the absolute position on the canvas of an KPort from a KGraph. |
static List<Point> |
getBendPointsAbsolutePositions(KEdge edge)
Gives the absolute positions of all bend points on the given edge. |
static LayoutOptionData<?> |
getOptionData(LayoutAlgorithmData[] providerDataArray,
String displayName)
Retrieves a suitable layout option data instance that matches the given user friendly display name. |
static LayoutOptionData<?> |
getOptionData(LayoutAlgorithmData providerData,
String optionName)
Returns the layout option data that matches the given user-friendly name and is known by the given layout provider. |
static void |
runModelChange(Runnable runnable,
TransactionalEditingDomain editingDomain,
String label)
Performs the model changes specified in the given runnable in a safe context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Insets calcInsets(IFigure parent, IFigure child)
parent
- the figure of a parent edit partchild
- the figure of a child edit part
public static Rectangle getAbsoluteBounds(IFigure figure)
figure
- a figure
public static Point getAbsolutePoint(Connection connection, int index)
connection
- a connection figureindex
- the index in the point list
public static void runModelChange(Runnable runnable, TransactionalEditingDomain editingDomain, String label)
runnable
- a runnable that performs model changeseditingDomain
- the editing domain for the changeslabel
- a user friendly label shown for the undo actionpublic static LayoutOptionData<?> getOptionData(LayoutAlgorithmData providerData, String optionName)
providerData
- a layout provider dataoptionName
- user-friendly name of a layout option
public static LayoutOptionData<?> getOptionData(LayoutAlgorithmData[] providerDataArray, String displayName)
providerDataArray
- array of applicable layout provider datadisplayName
- display name of the layout option as seen by the user
public static Point getAbsolutePosition(KNode node)
node
- The node to find the absolute position for
public static Point getAbsolutePosition(KPort port)
port
- The port to find the absolute position for
public static List<Point> getBendPointsAbsolutePositions(KEdge edge)
edge
- The edge to get the bend points from
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |