|
com.im.ijc.core/1 2.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.im.ijc.core.api.util.IJCCoreUtils
public class IJCCoreUtils
| Nested Class Summary | |
|---|---|
static class |
IJCCoreUtils.PrintUtilities
Purpose of this class is to be used for getting the print settings that should be shared for all prints in IJC |
| Constructor Summary | |
|---|---|
IJCCoreUtils()
|
|
| Method Summary | |
|---|---|
static void |
annotateException(Throwable t)
|
static void |
annotateException(Throwable t,
String localizedMessage)
|
static Task |
applyChangesWithProgress(DFCustomizer customizer)
|
static Task |
applyChangesWithProgress(DFCustomizer customizer,
String progressName,
String errorMsg)
|
static DFResultSet.VertexState |
computeCommonVS(IJCWidgetCookie widgetCookie)
TODO P1 - fix this method to take array of IJCWidgetCookies Computes the VertexState common for all selected widgets. |
static List<DFField> |
computeFields(IJCWidgetCookie ovc,
boolean bindOrSelected,
boolean onlyIfAllInOneEntity)
TODO P1 - fix this method to take array of IJCWidgetCookies Compute the union of all fields from the selected widgets given by IJCWidgetCookie. |
static com.im.ijc.core.wizards.newdfitem.NewDFItemWizardIterator<DFEntity> |
createNewEntityWizard(DFSchema schema,
List<DFNewType<DFEntity>> newtypes,
boolean createDataTree,
boolean createView)
Creates a new DFEntity, based on the newtypes passed. |
static SchemaSelector |
createSchemaSelector(boolean selectOnlyWriteableSchema)
Creates a default implementation of SchemaSelector. |
static String |
createWrappedText(String text,
String wrapSymbol,
int limitInPixel,
FontMetrics fm)
Text will be formatted so that the string would be smart-wrapped to fit the multi-line text area |
static void |
deleteDataFromSelection(IJCWidgetCookie ovc,
boolean delOrCut)
|
static Action |
findActionFromLayer(String resourceName)
|
static List<DFResultSet> |
findActiveResultSetsFor(DFEntity entity)
Find all active result sets where the given entity participates in. |
static List<DFEntity> |
findEntities(Node[] activatedNodes)
|
static List<DFField> |
findFields(Node[] activatedNodes)
|
static List<DFRelationship> |
findRelationships(Node[] activatedNodes)
|
static DFResultSet.VertexState |
findVertexState(Node[] nodes)
Computes the VertexState common for all nodes. |
static String |
formatStringForHtmlOutput(String text)
given text will be formated so as it could be displayed in HTML format |
static String |
generateNewListOrQueryName()
Generate default name for a new temporary or permanent list or query. |
static Image |
getIconResource(Class clazz,
int iconType)
|
static Image |
getIconResource(DFItem item,
int iconType)
|
static Comparator<Node> |
getNodeComparator(boolean ascending)
|
static Object[] |
getValuesFromExpression(DFTermExpression expr)
Unwrap the values objects from list of operands. |
static boolean |
isDefaultListOrQueryName(String name)
Is the name of default format? |
static Action[] |
loadActionsForNode(String key,
Action[] addBefore,
Action[] addAfter)
Load actions from layer. |
static Color |
mixColors(Color a,
Color b,
float balance)
Computes the colour between the given two colours according to balance (0.0-1.0). |
static void |
reloadDataInResultSetsFor(DFEntity entity,
boolean askUser)
This method first finds all active result sets where the given entity participates in. |
static void |
selectInProjects(DataObject dobj,
boolean selectIt)
Expand the node for the given connection (schema) in "Projects explorer" |
static void |
selectInProjects(DFDataTree item,
boolean selectIt)
Expand the node for the given dataTree in "Projects explorer". |
static void |
selectInProjects(DFSchema item,
boolean selectIt)
Expand the node for the given schema in "Projects explorer". |
static void |
selectInProjects(DFView item,
boolean selectIt)
Expand the node for the given view in "Projects explorer". |
static void |
setNewSelection(DFResultSet.VertexState vertexState,
int delta)
|
static void |
setNewSelection(DFResultSet.VertexState vertexState,
SelectionDescription selection)
|
static void |
setNewSort(DFResultSet.VertexState vertexState,
SortDirective newSort)
|
static boolean |
showLicenseExpiredDialog(Throwable exception)
If the license or it cause is License exception it will show dialog with license excpetion. |
static void |
switchAllOpenedViewsMode(DFDataTree dt,
ViewMode viewMode)
|
static MarvinStructure |
tryToGetStructureOperand(DFTermExpression expr,
boolean returnEmptyStructureInsteadOfNull)
Try to get MarvinStructure operand from the expression. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IJCCoreUtils()
| Method Detail |
|---|
public static Task applyChangesWithProgress(DFCustomizer customizer)
public static Task applyChangesWithProgress(DFCustomizer customizer,
String progressName,
String errorMsg)
public static SchemaSelector createSchemaSelector(boolean selectOnlyWriteableSchema)
public static Image getIconResource(DFItem item,
int iconType)
public static Image getIconResource(Class clazz,
int iconType)
public static void setNewSelection(DFResultSet.VertexState vertexState,
SelectionDescription selection)
public static void setNewSelection(DFResultSet.VertexState vertexState,
int delta)
public static void setNewSort(DFResultSet.VertexState vertexState,
SortDirective newSort)
public static void deleteDataFromSelection(IJCWidgetCookie ovc,
boolean delOrCut)
public static DFResultSet.VertexState computeCommonVS(IJCWidgetCookie widgetCookie)
widgetCookie - The cookies which provides the selected widget
public static DFResultSet.VertexState findVertexState(Node[] nodes)
nodes - The nodes where you are looking for the common vertex state
public static List<DFField> computeFields(IJCWidgetCookie ovc,
boolean bindOrSelected,
boolean onlyIfAllInOneEntity)
ovc - The cookies which provides the selected widgetsbindOrSelected - If true bound fields are computed, if false then only selected fieldsonlyIfAllInOneEntity - If false then it requires all fields must be from the same entity (VertexState).
If there are widgets which are bound to fields from different entity and this parameter is true,
the method will return empty list.
public static List<DFEntity> findEntities(Node[] activatedNodes)
public static List<DFRelationship> findRelationships(Node[] activatedNodes)
public static void annotateException(Throwable t)
public static void annotateException(Throwable t,
String localizedMessage)
public static List<DFField> findFields(Node[] activatedNodes)
public static Color mixColors(Color a,
Color b,
float balance)
public static Comparator<Node> getNodeComparator(boolean ascending)
public static List<DFResultSet> findActiveResultSetsFor(DFEntity entity)
entity - The entity
public static void reloadDataInResultSetsFor(DFEntity entity,
boolean askUser)
entity - The entity which was updated
public static void selectInProjects(DFSchema item,
boolean selectIt)
item - schema to shown in explorerselectIt - Selects the node in explorer (if false the node is just expanded).
public static void selectInProjects(DFDataTree item,
boolean selectIt)
item - datatree to shown in explorerselectIt - Selects the node in explorer (if false the node is just expanded).
public static void selectInProjects(DFView item,
boolean selectIt)
item - view to shown in explorerselectIt - Selects the node in explorer (if false the node is just expanded).
public static void selectInProjects(DataObject dobj,
boolean selectIt)
dobj - dataobject to shown in explorer. It must be some dataobject directly under project node
e.g. SchemaConnectionDataObject.selectIt - Selects the node in explorer (if false the node is just expanded).
public static com.im.ijc.core.wizards.newdfitem.NewDFItemWizardIterator<DFEntity> createNewEntityWizard(DFSchema schema,
List<DFNewType<DFEntity>> newtypes,
boolean createDataTree,
boolean createView)
schema - the target Schemanewtypes - applicable NewTypes
public static String formatStringForHtmlOutput(String text)
public static String createWrappedText(String text,
String wrapSymbol,
int limitInPixel,
FontMetrics fm)
public static void switchAllOpenedViewsMode(DFDataTree dt,
ViewMode viewMode)
public static Object[] getValuesFromExpression(DFTermExpression expr)
The reason of this method is that if you want to create new DFTermExpression using DFTermsFactory methods you need to put there List of values and not List of DFTermValue objects. This method makes this common code simplier.
expr - the expression to be
public static MarvinStructure tryToGetStructureOperand(DFTermExpression expr,
boolean returnEmptyStructureInsteadOfNull)
expr - The structure expression.returnEmptyStructureInsteadOfNull - If structure is not found should the method return
a new empty instance of MarvinStructure instead of null?
public static Action findActionFromLayer(String resourceName)
public static boolean showLicenseExpiredDialog(Throwable exception)
exception - catched exception
public static String generateNewListOrQueryName()
public static boolean isDefaultListOrQueryName(String name)
public static Action[] loadActionsForNode(String key,
Action[] addBefore,
Action[] addAfter)
key - The name of folder under IJC/UI/Nodes for example "EntityInSchemaEditor"addBefore - Add these actions before actions loaded from layeraddAfter - Add these actions after actions loaded from layer
|
com.im.ijc.core/1 2.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||