|
com.im.ijc.core/1 5.9.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 final 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 |
| Method Summary | |
|---|---|
static void |
annotateException(Throwable t,
String localizedMessage)
|
static Task |
applyChangesWithProgress(DFCustomizer customizer)
|
static Task |
applyChangesWithProgress(DFCustomizer customizer,
String progressName,
String errorMsg)
|
static IJCWidget.DesignerHandle |
bounded(IJCWidget.DesignerHandle ijcw,
DFView view)
|
static String |
checkProjectProtocol(String urif)
Check if URL is using our private project: protocol |
static DFResultSet.VertexState |
computeCommonVS(IJCWidget widget)
|
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(IJCWidget widget,
boolean bindOrSelected,
boolean onlyIfAllInOneEntity)
TODO P1 - fix this method to take array of IJCWidget Compute the union of all fields from the widget. |
static List<DFField> |
computeFields(IJCWidgetCookie widgetCookie,
boolean bindOrSelected,
boolean onlyIfAllInOneEntity)
Deprecated. use computeFields(com.im.ijc.core.api.views.IJCWidget, boolean, boolean) instead |
static List<? extends Object> |
convertListValues(DFField sourceField,
DFField targetField,
List<? extends Object> sourceValues,
boolean forceValidation,
DFEnvironmentRO env)
Convert list of values of sourceField to values for targetField |
static NewDFItemWizardIterator<DFEntity> |
createNewEntityWizard(DFSchema ijcSchema,
List<DFNewType<DFEntity>> newtypes,
boolean createDataTree,
boolean createView,
WizardDescriptor.Panel extraPanel,
Dimension size)
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(IJCWidget widget,
boolean delOrCut)
|
static void |
deleteDataFromSelection(IJCWidgetCookie widgetCookie,
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 DFNewType<DFList> |
findNewListNT(DFEntity entity)
|
static DFNewType<DFQuery> |
findNewQueryNT(DFDataTree dataTree)
|
static String |
findProjectPath(DFSchema schema)
|
static List<DFRelationship> |
findRelationships(Node[] activatedNodes)
|
static String |
findSelectedProjectPath()
|
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 List<? extends Comparable<?>> |
getAssociatedIDs(SelectionDescription selection,
DFResultSet.VertexState vs)
Returns list of IDs (primary key values) for the given selection. |
static char[] |
getBreakChars()
|
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 boolean |
isJavaWebstart()
Check if IJC is running from java webstart |
static Action[] |
loadActionsForNode(String key,
Action[] addBefore,
Action[] addAfter)
Load actions from layer. |
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(DFScript item,
boolean selectIt)
Expand the node for the given script 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)
Set new selection on background. |
static void |
setNewSelection(DFResultSet.VertexState vertexState,
SelectionDescription selection)
Set new selection on background. |
static void |
setNewSelection(DFResultSet.VertexState vertexState,
SelectionDescription selection,
boolean synchronously)
Set selection in vertexState and wail till selection is done. |
static void |
setNewSort(DFResultSet.VertexState vertexState,
SortDirective newSort)
|
static boolean |
showLicenseExpiredDialog(Throwable exception)
|
static boolean |
showLicenseExpiredDialog(Throwable exception,
boolean showEveryTime)
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 |
| 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 setNewSelection(DFResultSet.VertexState vertexState,
SelectionDescription selection,
boolean synchronously)
vertexState - working vertexStateselection - new selectionsynchronously - it will wail till selection is done if it's true.
public static List<? extends Comparable<?>> getAssociatedIDs(SelectionDescription selection,
DFResultSet.VertexState vs)
selection - selected indexesvs - might be null in which case empty list is returned
public static void setNewSort(DFResultSet.VertexState vertexState,
SortDirective newSort)
public static String findSelectedProjectPath()
public static String findProjectPath(DFSchema schema)
public static void deleteDataFromSelection(IJCWidgetCookie widgetCookie,
boolean delOrCut)
public static void deleteDataFromSelection(IJCWidget widget,
boolean delOrCut)
public static DFResultSet.VertexState computeCommonVS(IJCWidgetCookie widgetCookie)
widgetCookie - The cookies which provides the selected widget
public static DFResultSet.VertexState computeCommonVS(IJCWidget 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(IJCWidget widget,
boolean bindOrSelected,
boolean onlyIfAllInOneEntity)
widget - the widget to be usedbindOrSelected - 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<DFField> computeFields(IJCWidgetCookie widgetCookie,
boolean bindOrSelected,
boolean onlyIfAllInOneEntity)
computeFields(com.im.ijc.core.api.views.IJCWidget, boolean, boolean) instead
public static List<DFEntity> findEntities(Node[] activatedNodes)
public static List<DFRelationship> findRelationships(Node[] activatedNodes)
public static void annotateException(Throwable t,
String localizedMessage)
public static List<DFField> findFields(Node[] activatedNodes)
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 - The s chema 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 - The d atatree to shown in explorerselectIt - Selects the node in explorer (if false the node is just expanded).
public static void selectInProjects(DFScript item,
boolean selectIt)
item - The script 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 - The v iew 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 - The d ataobject 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 NewDFItemWizardIterator<DFEntity> createNewEntityWizard(DFSchema ijcSchema,
List<DFNewType<DFEntity>> newtypes,
boolean createDataTree,
boolean createView,
WizardDescriptor.Panel extraPanel,
Dimension size)
ijcSchema - The target Schemanewtypes - The applicable NewTypes
public static String formatStringForHtmlOutput(String text)
public static char[] getBreakChars()
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 simpler.
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,
boolean showEveryTime)
exception - The attached exception
public static boolean showLicenseExpiredDialog(Throwable 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
public static boolean isJavaWebstart()
public static String checkProjectProtocol(String urif)
urif - URL string
public static IJCWidget.DesignerHandle bounded(IJCWidget.DesignerHandle ijcw,
DFView view)
public static List<? extends Object> convertListValues(DFField sourceField,
DFField targetField,
List<? extends Object> sourceValues,
boolean forceValidation,
DFEnvironmentRO env)
sourceField - Source field whose values are going to be convertedtargetField - Field whose values are expected as result of this methodsourceValues - Values of sourceFieldforceValidation - When true then this operation is going to SELECT database even when source and target
field is the same. In other words it does validation and filters out non-existing values. When false
this returns sourceValues if sourceValues == targetField.env - Environment for monitoring progress
public static DFNewType<DFList> findNewListNT(DFEntity entity)
public static DFNewType<DFQuery> findNewQueryNT(DFDataTree dataTree)
|
com.im.ijc.core/1 5.9.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||