|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.util.IdeUtil
Field Summary | |
static java.lang.String |
MAIN_WINDOW_KEY
|
static java.lang.String |
PROGRAM_NAME_KEY
|
Method Summary | |
static void |
addAll(java.util.Collection target,
java.util.Iterator toAdd)
Adds all objects in the Iterator to target. |
static void |
addAll(java.util.Collection target,
java.lang.Object[] toAdd)
Adds all objects in toAdd to target. |
static void |
addComboBoxDocumentListener(javax.swing.JComboBox jcomboBox,
javax.swing.event.DocumentListener documentListener)
|
static void |
centerTreeSelection(javax.swing.JTree tree)
Centers the current tree selection within its scroll pane. |
static void |
centerWindow(java.awt.Container parent,
java.awt.Component child)
Center a component over another. |
static void |
comboBoxSelectItem(javax.swing.JComboBox comboBox,
java.lang.Object item)
|
static int |
compareToCurrentDocumentVersion(java.net.URL fileToOpen)
Compares the version of the URL passed in (which MUST be a URL pointing to either a project or workspace file) to the version of JDeveloper that is attempting to open the file. |
static java.lang.String[] |
convertStringToStringArray(java.lang.String s)
|
static java.lang.String[] |
convertStringToStringArray(java.lang.String s,
boolean allowQuotedStrings,
boolean keepQuotes)
|
static void |
copyToClipboard(java.lang.String s)
|
static java.util.Collection |
distinct(java.util.Collection source,
java.util.Comparator comparator)
Eliminates the doublons from source. |
static void |
expandAllTreeRows(javax.swing.JTree tree)
Expands all the rows in the specified JTree . |
static void |
expandTreeToDepth(javax.swing.JTree tree,
int depth)
Expands the rows in the specified JTree up to the specified
tree depth; all other rows are collapsed. |
static java.awt.Window |
findActiveModalWindow()
Finds the window in the container hierarchy which is visible, modal and active. |
static java.awt.Dialog |
findDialog(java.awt.Component component)
Finds the first parent of the specified Component that
is an instance of Dialog . |
static java.awt.Frame |
findFrame(java.awt.Component component)
|
static java.lang.String |
getDigitsFromString(java.lang.String inString)
Takes a string and strips out any non-digit characters and returns an int |
static java.lang.String |
getDocumentVersion(java.net.URL url)
Reads the header information of the file pointed to by the given url and determines the version number. |
static java.lang.String |
getIdeEncoding()
Retrieves the IDE-wide encoding. |
static java.lang.String |
getIdeIanaEncoding()
Retrieves the IDE-wide IANA encoding. |
static java.awt.Frame |
getMainWindow()
|
static java.lang.String |
getProgramName()
|
static java.lang.String |
getSubString(java.lang.String sIn,
char c,
boolean bBefore)
Returns the string before the first occurence of c if bBefore is true or the string after the first occurence of c if bBefore is false |
static javax.swing.Icon |
grayIcon(javax.swing.Icon icon)
|
static void |
invokeAfterRepaint(java.lang.Runnable runnable)
This method is similar to SwingUtilities.invokeLater(Runnable) except that the
runnable is started after all the pending repaints. |
static boolean |
isDocumentVersionCurrent(java.net.URL url)
Reads the header information of the file pointed to by the given url and determines if the version number in the file
matches the current product version. |
static boolean |
isJavaIdentifier(java.lang.String name)
Returns true if the specified String is a valid
Java identifier. |
static boolean |
isJavaKeyword(java.lang.String name)
Returns true if the specified String is a Java
keyword. |
static boolean |
isJavaReservedWord(java.lang.String name)
Returns true if the specified String is a Java
reserved word. |
static boolean |
isPackageIdentifier(java.lang.String name)
Returns true if the specified String is a valid
package identifier. |
static java.lang.String |
list2String(java.util.List list)
|
static java.awt.Component |
moveFocusAway()
Since the JDK sends inconsistent focus messages when a focused component is removed from the screen, it is often necessary to move that focus away before to move a component to another container or to remove the component. |
static java.lang.String |
prepad(java.lang.String s,
char c,
int len)
Return a string where the beginning of the string has been padded to obtain a desired length. |
static java.lang.String |
removeChars(java.lang.String sIn,
java.lang.String sRemove)
Return a sIn without any character found is sRemove |
static java.lang.String |
replaceHTMLReservedCharacters(java.lang.String s)
Replaces teh HTML reserved characters with the appropriate entity. |
static void |
runNow(java.lang.Runnable r)
|
static void |
setIdeEncoding(java.lang.String encoding)
Sets the IDE-wide encoding. |
static void |
setMainWindow(javax.swing.JFrame frame)
|
static void |
setProgramName(java.lang.String name)
|
static void |
setStartupWindow(javax.swing.JFrame frame)
The startup window is a JFrame upon which dialogs and other UI may be parented before the showing of the main window. |
static void |
showErrorDialog(java.awt.Component parent,
java.lang.String title,
java.lang.String message)
Deprecated. use oracle.ide.dialogs.MessageDialog.alert() |
static void |
showInfoDialog(java.awt.Component parent,
java.lang.String title,
java.lang.String message)
Deprecated. use oracle.ide.dialogs.MessageDialog.information() |
static void |
showPopupMenu(javax.swing.JPopupMenu popup,
java.awt.Component invoker,
int x,
int y)
Deprecated. Replace with MenuUtils.showPopupMenu(JPopupMenu,Component,int,int) . |
static void |
string2List(java.lang.String string,
java.util.List list)
|
static void |
tryToRestoreFocus(java.awt.Component cPreferred)
This method tries to set the focus on cPreferred . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String MAIN_WINDOW_KEY
public static final java.lang.String PROGRAM_NAME_KEY
Method Detail |
public static void centerWindow(java.awt.Container parent, java.awt.Component child)
public static void centerTreeSelection(javax.swing.JTree tree)
JTree
is null or is not hosted in a JScrollPane
, the this method does nothing.
tree
- The JTree
whose selection is to be centered.public static void expandAllTreeRows(javax.swing.JTree tree)
JTree
. This method
assumes that the JTree
is in single-selection mode; if any
row was selected prior to expanding all rows, then that row will
remain selected after all rows have been expanded.
public static void expandTreeToDepth(javax.swing.JTree tree, int depth)
JTree
up to the specified
tree depth; all other rows are collapsed. The depth of a row is
defined as the length of the TreePath
's path for that row.
This method assumes that the JTree
is in single-selection
mode; if any row was selected prior to expanding all rows, then that
row will remain selected after all rows have been expanded.
tree
- the JTree
to expand.depth
- the desired expansion depth; a depth of
<=0
expands all rows in the tree.public static java.awt.Dialog findDialog(java.awt.Component component)
Component
that
is an instance of Dialog
. If the component itself is
a Dialog
, then it is returned. If the component is
null
then null
is returned.
public static java.awt.Frame findFrame(java.awt.Component component)
public static boolean isJavaKeyword(java.lang.String name)
true
if the specified String
is a Java
keyword.
name
- the String
to test.public static boolean isJavaReservedWord(java.lang.String name)
true
if the specified String
is a Java
reserved word. A Java reserved word is either a keyword, a boolean
literal, or the null literal.
name
- the String
to test.public static boolean isJavaIdentifier(java.lang.String name)
true
if the specified String
is a valid
Java identifier.
name
- the String
to test.public static boolean isPackageIdentifier(java.lang.String name)
true
if the specified String
is a valid
package identifier.
public static java.lang.String list2String(java.util.List list)
public static void string2List(java.lang.String string, java.util.List list)
public static java.lang.String[] convertStringToStringArray(java.lang.String s)
public static java.lang.String[] convertStringToStringArray(java.lang.String s, boolean allowQuotedStrings, boolean keepQuotes)
public static java.lang.String getSubString(java.lang.String sIn, char c, boolean bBefore)
public static java.lang.String removeChars(java.lang.String sIn, java.lang.String sRemove)
public static java.lang.String prepad(java.lang.String s, char c, int len)
s
- the String
to pad.c
- the character to use when padding.len
- the desired length of the string.public static void addAll(java.util.Collection target, java.lang.Object[] toAdd)
target
- the Collection to which the elements are added.toAdd
- the objects to add to the target. Cannot be null.public static void addAll(java.util.Collection target, java.util.Iterator toAdd)
target
- the Collection to which the elements are added.toAdd
- the objects to add to the target. Cannot be null.public static java.util.Collection distinct(java.util.Collection source, java.util.Comparator comparator)
source
- The source collectioncomparator
- Used to decide if two elements are unique.
public static void showErrorDialog(java.awt.Component parent, java.lang.String title, java.lang.String message)
public static void showInfoDialog(java.awt.Component parent, java.lang.String title, java.lang.String message)
public static boolean isDocumentVersionCurrent(java.net.URL url)
url
and determines if the version number in the file
matches the current product version. If the document is an XML file,
the version number is taken from the XML namespace URI, assuming that
the namespace URI follows the format used by JDeveloper. A namespace
URI is expected to a have a format like * this:
http://xmlns.oracle.com/jdeveloper/#####/...
where ##### is the version string and ... is any text after the
version string to identify the specific document type.
true
if the file version matches the current product
version or the url
points to a new file.public static java.lang.String getDocumentVersion(java.net.URL url)
url
and determines the version number. If the document
is an XML file, the version number is taken from the XML namespace
URI, assuming that the namespace URI follows the format used by
JDeveloper. A namespace URI is expected to a have a format like
this:
http://xmlns.oracle.com/jdeveloper/#####/...
where ##### is the version string and ... is any text after the
version string to identify the specific document type.
null
if
the version could not be determined. Note that if the file pointed
to by the url
does not exists, this method assumes this
is a new file that will be written using the current product version.public static void showPopupMenu(javax.swing.JPopupMenu popup, java.awt.Component invoker, int x, int y)
MenuUtils.showPopupMenu(JPopupMenu,Component,int,int)
.
public static void addComboBoxDocumentListener(javax.swing.JComboBox jcomboBox, javax.swing.event.DocumentListener documentListener)
public static void comboBoxSelectItem(javax.swing.JComboBox comboBox, java.lang.Object item)
public static javax.swing.Icon grayIcon(javax.swing.Icon icon)
public static void runNow(java.lang.Runnable r)
public static void copyToClipboard(java.lang.String s)
public static java.awt.Frame getMainWindow()
public static void setMainWindow(javax.swing.JFrame frame)
public static void setStartupWindow(javax.swing.JFrame frame)
public static java.lang.String getProgramName()
public static void setProgramName(java.lang.String name)
public static java.lang.String getIdeEncoding()
public static void setIdeEncoding(java.lang.String encoding)
public static java.lang.String getIdeIanaEncoding()
public static java.lang.String replaceHTMLReservedCharacters(java.lang.String s)
public static java.awt.Component moveFocusAway()
tryToRestoreFocus(java.awt.Component)
public static void tryToRestoreFocus(java.awt.Component cPreferred)
cPreferred
.
If cPreferred
is null, not visible or disabled, it will focus
the top editor. If there is no editor, it tries to activate the first
dockable. If there is no dockable visible, I have no idea of what it does.
moveFocusAway()
public static final java.awt.Window findActiveModalWindow()
public static int compareToCurrentDocumentVersion(java.net.URL fileToOpen)
public static java.lang.String getDigitsFromString(java.lang.String inString)
inString
-
public static void invokeAfterRepaint(java.lang.Runnable runnable)
SwingUtilities.invokeLater(Runnable)
except that the
runnable
is started after all the pending repaints.
runnable
-
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.