borland Packages  Class Hierarchy  dbswing Package 

DBUtilities class

java.lang.Object
   +----com.borland.dbswing.DBUtilities

About the DBUtilities class

Properties  Methods  

Note: This is a feature of JBuilder Professional and Enterprise.

A collection of utility methods for dbSwing.


DBUtilities properties

*Read-only properties **Write-only properties

Properties implemented in java.lang.Object

DBUtilities methods

Methods implemented in this class

Methods implemented in java.lang.Object


DBUtilities methods

containsMnemonic(java.lang.String)

  public static boolean containsMnemonic(String text)
Determines whether the mnemonic character prefix symbol is in the text.

Parameters:

text
The text string to be examined to see if the mnemonic character is in it.

convertJBCLToSwingAlignment(int, boolean)

  public static int convertJBCLToSwingAlignment(int jbclAlignment, boolean horizontal)
Maps JBCL-style alignments to Swing alignments. JBCL-style alignments combine the horizontal and vertical alignments into a single value, whereas Swing keeps them separate. Set horizontal to true to extract the equivalent SwingConstants horizontal alignment value from jbclAlignment. Set horizontal to false to extract the vertical value.

Parameters:

jbclAlignment
One of the alignment variables: Alignment.LEFT, Alignment.RIGHT, Alignment.TOP, or Alignment.BOTTOM.
horizontal
Whether the alignment is a horizontal or vertical alignment. If horizontal is true, the alignment is horizontal (Alignment.LEFT or Alignment.RIGHT); if it is false, the alignment is vertical (Alignment.TOP, or Alignment.BOTTOM).

excludeMnemonicSymbol(java.lang.String)

  public static String excludeMnemonicSymbol(String text)
Returns the text without its embedded mnemonic symbol. An ampersand character (&) within the text implies the character following the ampersand is the mnemonic character. A back slash before the ampersand causes the ampersand to not be treated as the mnemonic character indicator. Only the first occurrence of a mnemonic is removed from the String.

This method also has the side effect of caching the mnemonic character for subsequent retrieval by extractMnemonicChar(). When parsing a string containing a mnemonic character, call this method first followed by extractMnemonicChar() for improved efficiency.

Parameters:

text
The text string that includes the mnemonic symbol.

extractMnemonicChar(java.lang.String)

  public static char extractMnemonicChar(String text)
Returns the mnemonic character embedded in the text.

Parameters:

text
The text string that contains the mnemonic character.

findDataAwareChildren(java.awt.Container)

  public static DataSetAware[] findDataAwareChildren(Container container)
Finds DataSetAware components that have data-aware child components in the specified container.

Parameters:

container
The container to search for components with data-aware child components.

findDataAwareComponents(java.awt.Component)

  public static DataSetAware[] findDataAwareComponents(Component component)
Finds DataSetAware components that are in the same container as the specified component.

Parameters:

component
The component whose container the search for other data-aware components occurs in.

getByteArrayFromStream(java.io.InputStream)

  public static byte[] getByteArrayFromStream(InputStream inputStream)
Returns the specified input stream as a byte array. Returns null on an error reading the input stream.

getDialog(java.awt.Component)

  public static Dialog getDialog(Component component)
Returns the parent dialog of the specified component, or null if one can't be found.

getFrame(java.awt.Component)

  public static Frame getFrame(Component component)
Returns the parent frame of the specified component. It returns null if a frame for the component can't be found.

Parameters:

component
The Component you want to find the parent frame for.

getWrappedText(java.lang.String)

  public static String[] getWrappedText(String text)
Returns the specified String parameter as an array of Strings, where no array element has a width greater than 60 characters. The default locale is used.

Parameters:

text
The String to return as an array of Strings.

getWrappedText(java.lang.String, int)

  public static String[] getWrappedText(String text, int width)
Returns the specified String parameter as an array of Strings, where no array element has a width greater than the width parameter. The default locale is used.

Parameters:

text
The String to return as an array of Stringss.
width
The maximum width of each array element.

getWrappedText(java.lang.String, int, java.util.Locale)

  public static String[] getWrappedText(String text, int width, Locale locale)
Returns the specified String parameter as an array of Strings, where no array element has a width greater than the width parameter. The specified locale is used.

Parameters:

text
The String to return as an array of Stringss.
width
The maximum width of each array element.
locale
The locale to use.

is1pt3()

  public static boolean is1pt3()

isBMPFile(java.io.InputStream)

  public static boolean isBMPFile(InputStream inputStream)
Returns whether the specified input stream contains a bitmap (.BMP) file.

isGIForJPGFile(java.io.InputStream)

  public static boolean isGIForJPGFile(InputStream inputStream)
Returns whether the specified input stream contains a .GIF or .JPEG file.

makeBMPImage(java.io.InputStream)

  public static Image makeBMPImage(InputStream inputStream)
Creates a Java image object out of the specified input stream, which is expected to contain a .BMP file.

See also: isBMPFile