public class GefUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
GefUtils.ImmediateChildEnumerator
Enumerator utility class
|
static class |
GefUtils.ImmediateFigureChildEnumerator
The child enumerator is different in the way that it returns the proxy with the control arguements
|
Constructor and Description |
---|
GefUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
activateEditPart(java.lang.Object editPart)
Activate the edit part for performing actions
|
static void |
activatePaletteEntry(java.lang.Object paletteEntry)
Activate the palette for performing actions
|
static java.lang.Object |
getActivePaletteRoot(java.lang.Object comp)
Return the active paletetteRoot
|
static java.lang.Object |
getActiveRootEditPart(java.lang.Object comp)
Return the RootEditPart corresponding to the composite
|
static java.lang.Object |
getActualParentForEditPart(java.lang.Object editPart)
Return the actual parent of the edit part
|
static java.lang.Object[] |
getAlternateFigureCanvas(Composite comp,
java.lang.Object rootEdit,
java.lang.Object pRoot) |
static java.lang.Object |
getChildForEditPartAtPoint(java.lang.Object editPart,
java.awt.Point pt)
Get the child at the point using findFigureAt
|
static java.lang.Object |
getChildForFigureAtPoint(java.lang.Object figure,
Control cont,
java.awt.Point pt)
Get the child at the point using findFigureAt
|
static java.lang.Object |
getChildForPaletteAtPoint(java.lang.Object paletteEntry,
java.awt.Point pt)
Get the child at the point using findFigureAt
|
static java.util.List |
getChildrenForEditPart(java.lang.Object editPart)
Return the children of the edit part.
|
static java.util.List |
getChildrenForFigure(java.lang.Object figure)
Return the children of the given figure
|
static java.util.List |
getChildrenForPalette(java.lang.Object paletteEntry)
Return the children of the palette.
|
static java.util.List |
getConnectorsForEditPart(java.lang.Object editPart)
Return the connectors for the given editpart
|
static Control |
getControlForEditPart(java.lang.Object editPart)
Return the Control for the given edit part for use by proxy to get the channel
|
static Control |
getControlForPalette(java.lang.Object paletteEntry)
Return the Control for the given palette for use by proxy to get the channel
|
static java.lang.String |
getFigureClassNameForEditPart(java.lang.Object editPart)
Return the figures class name corresponding to the editpart
|
static java.lang.Object |
getFigureForEditPart(java.lang.Object editPart)
Return the figure for the given editpart
|
static java.awt.Point |
getLocationOnScreenFromControl(Control control,
IChannel channel)
Return the location on the screen for an swt control
|
static java.lang.String |
getModelClassNameForEditPart(java.lang.Object editPart)
Return the model class name associate with the EditPart
|
static java.lang.Object |
getModelForEditPart(java.lang.Object editPart)
Return the model for the given editpart
|
static java.lang.String |
getPaletteDescription(java.lang.Object paletteEntry)
Return the palette Description for the given palette
|
static java.lang.String |
getPaletteId(java.lang.Object paletteEntry)
Return the palette Id for the given palette
|
static java.lang.String |
getPaletteLabel(java.lang.Object paletteEntry)
Return the paletteLabel for the given palette
|
static java.lang.String |
getPaletteToolTip(java.lang.Object paletteEntry)
Return the tool tip for the figure corresponding to the palette
|
static java.lang.String |
getPaletteType(java.lang.Object paletteEntry)
Return the palette Type for the given palette
|
static java.lang.Object |
getParentForEditPart(java.lang.Object editPart)
Return the parent of the edit part.
|
static java.lang.Object |
getParentForFigure(java.lang.Object figure)
Return the parent for the given figure
|
static java.lang.Object |
getParentForPalette(java.lang.Object paletteEntry)
Return the parent of the Palette.
|
static java.awt.Rectangle |
getRectangleForEditPart(java.lang.Object editPart)
Given the EditPart, return the bounds by querring the equivalent figure
|
static java.awt.Rectangle |
getRectangleForFigure(java.lang.Object figure)
Return the java.awt.Rectangle for the figue
|
static java.awt.Rectangle |
getRectangleForPalette(java.lang.Object paletteEntry)
Given the PaletteEntry, return the bounds by querring the equivalent figure
|
static java.lang.Object |
getRootFigureFromCanvas(java.lang.Object canvas)
Return the root figure for the given FigureCanvas
|
static java.lang.String |
getTargetClassnameForConnectionEditPart(java.lang.Object editPart)
Return the class name for the Target Edit part for connectoins only
|
static java.lang.String |
getTextForEditPart(java.lang.Object editPart)
Return the text associated with the edit part by querring on the figure
|
static java.lang.String |
getTextFromFigure(java.lang.Object figure)
Return the text associated with the figure
|
static java.lang.String |
getToolTipForEditPart(java.lang.Object editPart)
Return the tool tip for the figure corresponding to the edit part
|
static java.lang.String |
getToolTipFromFigure(java.lang.Object figure)
Return the tool tip for the figure
|
static boolean |
hasFigureFocus(java.lang.Object figure)
Return true if the figure has focus
|
static boolean |
isCompositeGEFBased(Composite comp)
Return true if the composite is an GEF based
|
static boolean |
isConnectorEditPart(java.lang.Object editPart)
Return true if the editpart is of type ConnectionEditPart
|
static boolean |
isEditPartEditable(java.lang.Object editPart)
Return true if the editpart is editable
|
static boolean |
isEditPartEnabled(java.lang.Object editPart)
Return true if the edit part's figure is enabled
|
static boolean |
isEditPartOpaque(java.lang.Object editPart)
Return true if the EditPart figure is opaque
|
static boolean |
isEditPartShowing(java.lang.Object editPart)
Return true if the EditPart figure is showing
|
static boolean |
isEditPartVisible(java.lang.Object editPart)
Return true if the EditPart figure is visible
|
static boolean |
isFigureCanvas(java.lang.Object canvas)
Return true if the Canvas is FigureCanvas
|
static boolean |
isFigureEditable(java.lang.Object figure)
Return true if the figue is editable
|
static boolean |
isFigureEnabled(java.lang.Object figure)
Return true if the figure is enabled
|
static boolean |
isFigureOpaque(java.lang.Object figure)
Reture true if the figure is opaque
|
static boolean |
isFigureShowing(java.lang.Object figure)
Return true if the figure is showing
|
static boolean |
isFigureVisible(java.lang.Object figure)
Return true if the figure is visible
|
static boolean |
isFocusOnEditPart(java.lang.Object editPart)
Return true if the editpart has focus
|
static boolean |
isGefEnabled()
Return true if GEF is enabled
|
static boolean |
isPaletteEnabled(java.lang.Object paletteEntry)
Return true if the palette figure is enabled
|
static boolean |
isPaletteSelected(java.lang.Object paletteEntry)
Retrue if the palette figure has focus
|
static boolean |
isPaletteVisible(java.lang.Object paletteEntry)
Return true if the palette is visible
|
static void |
requestFigureFocus(java.lang.Object figure)
Request focus on the figure
|
static void |
scrollEditPartTo(java.lang.Object editPart,
java.lang.Integer x,
java.lang.Integer y)
Scroll the editpart to the location
|
static void |
scrollFigure(java.lang.Object figureObject,
java.lang.Object figCanvasObject)
Scroll the figure to visibility.
|
static boolean |
setTextForEditPart(java.lang.Object editPart,
java.lang.String text)
Set the text associated with the edit part by querring on the figure
|
static boolean |
setTextForFigure(java.lang.Object figure,
java.lang.String text)
Set the text for the given figure
|
static boolean |
shouldAllowGefFigures() |
public static boolean isGefEnabled()
public static boolean shouldAllowGefFigures()
public static boolean isCompositeGEFBased(Composite comp)
public static java.awt.Point getLocationOnScreenFromControl(Control control, IChannel channel)
public static java.lang.Object[] getAlternateFigureCanvas(Composite comp, java.lang.Object rootEdit, java.lang.Object pRoot)
public static java.lang.Object getActiveRootEditPart(java.lang.Object comp)
comp
- public static Control getControlForEditPart(java.lang.Object editPart)
editPart
- public static java.util.List getChildrenForEditPart(java.lang.Object editPart)
editPart
- public static java.util.List getConnectorsForEditPart(java.lang.Object editPart)
editPart
- public static boolean isConnectorEditPart(java.lang.Object editPart)
editPart
- public static java.lang.Object getActualParentForEditPart(java.lang.Object editPart)
editPart
- public static java.lang.Object getParentForEditPart(java.lang.Object editPart)
editPart
- public static java.awt.Rectangle getRectangleForEditPart(java.lang.Object editPart)
editPart
- public static java.lang.String getTextForEditPart(java.lang.Object editPart)
editPart
- public static boolean setTextForEditPart(java.lang.Object editPart, java.lang.String text)
editPart
- the Edit part,text
- the Text to setpublic static boolean isEditPartEditable(java.lang.Object editPart)
editPart
- The editpartpublic static java.lang.String getModelClassNameForEditPart(java.lang.Object editPart)
figure
- public static java.lang.String getToolTipForEditPart(java.lang.Object editPart)
editPart
- public static java.lang.String getFigureClassNameForEditPart(java.lang.Object editPart)
editPart
- public static java.lang.String getTargetClassnameForConnectionEditPart(java.lang.Object editPart)
editPart
- public static java.lang.Object getChildForEditPartAtPoint(java.lang.Object editPart, java.awt.Point pt)
pt
- public static boolean isFocusOnEditPart(java.lang.Object editPart)
public static boolean isEditPartEnabled(java.lang.Object editPart)
editPart
- public static boolean isEditPartVisible(java.lang.Object editPart)
editPart
- public static boolean isEditPartShowing(java.lang.Object editPart)
editPart
- public static boolean isEditPartOpaque(java.lang.Object editPart)
editPart
- public static void activateEditPart(java.lang.Object editPart)
editPart
- public static void scrollEditPartTo(java.lang.Object editPart, java.lang.Integer x, java.lang.Integer y)
editPart
- x
- y
- public static java.lang.Object getModelForEditPart(java.lang.Object editPart)
editPart
- public static java.lang.Object getFigureForEditPart(java.lang.Object editPart)
editPart
- The editpartpublic static java.lang.Object getActivePaletteRoot(java.lang.Object comp)
public static java.lang.Object getParentForPalette(java.lang.Object paletteEntry)
editPart
- public static java.util.List getChildrenForPalette(java.lang.Object paletteEntry)
editPart
- public static java.awt.Rectangle getRectangleForPalette(java.lang.Object paletteEntry)
editPart
- public static Control getControlForPalette(java.lang.Object paletteEntry)
editPart
- public static boolean isPaletteEnabled(java.lang.Object paletteEntry)
editPart
- public static boolean isPaletteSelected(java.lang.Object paletteEntry)
paletteEntry
- public static boolean isPaletteVisible(java.lang.Object paletteEntry)
editPart
- public static java.lang.String getPaletteDescription(java.lang.Object paletteEntry)
paletteEntry
- public static java.lang.String getPaletteId(java.lang.Object paletteEntry)
paletteEntry
- public static java.lang.String getPaletteLabel(java.lang.Object paletteEntry)
paletteEntry
- public static java.lang.String getPaletteType(java.lang.Object paletteEntry)
paletteEntry
- public static java.lang.String getPaletteToolTip(java.lang.Object paletteEntry)
editPart
- public static void activatePaletteEntry(java.lang.Object paletteEntry)
paletteEntry
- public static java.lang.Object getChildForPaletteAtPoint(java.lang.Object paletteEntry, java.awt.Point pt)
pt
- public static boolean isFigureOpaque(java.lang.Object figure)
figure
- public static void requestFigureFocus(java.lang.Object figure)
figure
- public static boolean isFigureEnabled(java.lang.Object figure)
figure
- public static boolean isFigureShowing(java.lang.Object figure)
figure
- public static boolean isFigureVisible(java.lang.Object figure)
figure
- public static boolean hasFigureFocus(java.lang.Object figure)
figure
- public static java.awt.Rectangle getRectangleForFigure(java.lang.Object figure)
figure
- public static java.lang.String getTextFromFigure(java.lang.Object figure)
figure
- public static boolean setTextForFigure(java.lang.Object figure, java.lang.String text)
figure
- The Ifiguretext
- The text to setpublic static boolean isFigureEditable(java.lang.Object figure)
figure
- The figurepublic static java.lang.String getToolTipFromFigure(java.lang.Object figure)
figure
- public static java.util.List getChildrenForFigure(java.lang.Object figure)
figure
- public static java.lang.Object getParentForFigure(java.lang.Object figure)
figure
- The Figurepublic static boolean isFigureCanvas(java.lang.Object canvas)
canvas
- public static java.lang.Object getRootFigureFromCanvas(java.lang.Object canvas)
canvas
- public static java.lang.Object getChildForFigureAtPoint(java.lang.Object figure, Control cont, java.awt.Point pt)
pt
- public static void scrollFigure(java.lang.Object figureObject, java.lang.Object figCanvasObject)
figureObject
- figCanvasObject
-