|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.pentec.util.AUtil
public class AUtil
The AUtil class is a collection of static utility methods intended for use with ADAPT.
| Field Summary | |
|---|---|
private static java.awt.Robot |
robot
Robot used for cursor control |
| Constructor Summary | |
|---|---|
AUtil()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
byteArrayToHexString(byte[] ab)
|
static java.lang.String |
byteArrayToHexString(byte[] ab,
int iOffset,
int iLength)
|
static java.lang.String |
byteToHexString(byte number)
|
static javax.swing.JPanel |
createAutoManualPanel(java.lang.String $,
javax.swing.JTextField jtf,
javax.swing.JRadioButton jrbAuto,
javax.swing.JRadioButton jrbMan)
Create a panel containing a text field with "Auto" and "Manual" radio button options |
static void |
createEtchedBorder(javax.swing.JPanel jp)
This method adds an empty border around a panel, and then an etched border. |
static javax.swing.JButton |
createTextButton(java.lang.String $,
java.awt.event.ActionListener actionListener)
This method provides a way of creating action buttons with standard margins. |
static void |
dateStamp(java.io.Writer out)
|
static void |
disableScroll(javax.swing.JRootPane rootpane)
|
static void |
enableScroll(javax.swing.JRootPane rootpane)
|
static java.lang.String |
getByteArrayValue$(byte[] ab,
int iOffset)
Get an null terminated ASCII String value inside a byte[]. |
static int |
getByteArrayValueI(byte[] ab,
int iOffset)
Get an integer value inside a byte[] with the MSB first |
static long |
getByteArrayValueL(byte[] ab,
int iOffset)
Get an integer value inside a byte[] with the MSB first |
static java.lang.String[] |
getSerialPortNames()
Get a list of serial port names |
static void |
installHotKeys(DataFrame mainFrame,
javax.swing.JRootPane rootpane)
Register a set of keyboard functions that mimic a subset of the functions in the main frame drop down menu |
static boolean |
mouseMove(java.awt.Point p)
Move the mouse cursor to a specified point |
static boolean |
mouseMove(java.awt.Rectangle r)
Move the mouse cursor to the center of a rectangle |
static void |
setByteArrayValue(byte[] ab,
int iOffset,
int iVal)
Set an integer value inside a byte[] with the MSB first |
static void |
setByteArrayValue(byte[] ab,
int iOffset,
long lVal)
Set an long integer value inside a byte[] with the MSB first |
static void |
setByteArrayValue(byte[] ab,
int iOffset,
java.lang.String $Val)
Set an String value inside a byte[]. |
static void |
setEnabled(java.awt.Container container,
boolean flag)
This method sets the enabled flag of all components in a container. |
static void |
setLAF(java.lang.String $LAF)
Set the windowing system look and feel |
static int |
showConfirm(java.awt.Component parentComponent,
java.lang.String $Message,
java.lang.String $Title)
|
static void |
showError(java.awt.Component parentComponent,
java.lang.String $Message,
java.lang.String $Title)
|
static void |
showOK(java.awt.Component parentComponent,
java.lang.String $Message,
java.lang.String $Title)
|
static void |
sleep(double dSeconds)
Sleep for a specified number of seconds |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static java.awt.Robot robot
| Constructor Detail |
|---|
public AUtil()
| Method Detail |
|---|
public static java.lang.String byteArrayToHexString(byte[] ab)
public static java.lang.String byteArrayToHexString(byte[] ab,
int iOffset,
int iLength)
public static java.lang.String byteToHexString(byte number)
public static javax.swing.JPanel createAutoManualPanel(java.lang.String $,
javax.swing.JTextField jtf,
javax.swing.JRadioButton jrbAuto,
javax.swing.JRadioButton jrbMan)
public static void createEtchedBorder(javax.swing.JPanel jp)
public static javax.swing.JButton createTextButton(java.lang.String $,
java.awt.event.ActionListener actionListener)
public static void dateStamp(java.io.Writer out)
public static void disableScroll(javax.swing.JRootPane rootpane)
public static void enableScroll(javax.swing.JRootPane rootpane)
public static java.lang.String getByteArrayValue$(byte[] ab,
int iOffset)
public static int getByteArrayValueI(byte[] ab,
int iOffset)
public static long getByteArrayValueL(byte[] ab,
int iOffset)
public static java.lang.String[] getSerialPortNames()
public static void installHotKeys(DataFrame mainFrame,
javax.swing.JRootPane rootpane)
mainFrame - the frame in which the action listeners are containedrootpane - the container that will capture the keyboard inputpublic static boolean mouseMove(java.awt.Point p)
p - the point to move the mouse cursor to
public static boolean mouseMove(java.awt.Rectangle r)
r - the point to move the mouse cursor to
public static void setByteArrayValue(byte[] ab,
int iOffset,
int iVal)
public static void setByteArrayValue(byte[] ab,
int iOffset,
long lVal)
public static void setByteArrayValue(byte[] ab,
int iOffset,
java.lang.String $Val)
public static void setEnabled(java.awt.Container container,
boolean flag)
container - the container to enable or disableflag - true to enable components, false to disable componentspublic static void setLAF(java.lang.String $LAF)
$LAF - the desired look and feel
public static int showConfirm(java.awt.Component parentComponent,
java.lang.String $Message,
java.lang.String $Title)
public static void showError(java.awt.Component parentComponent,
java.lang.String $Message,
java.lang.String $Title)
public static void showOK(java.awt.Component parentComponent,
java.lang.String $Message,
java.lang.String $Title)
public static void sleep(double dSeconds)
dSeconds - the number of seconds to sleep
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||