public class JemmyProperties
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
QUEUE_MODEL_MASK
The event queue model mask.
|
static int |
ROBOT_MODEL_MASK
The robot using model mask.
|
static int |
SHORTCUT_MODEL_MASK
Event shorcutting model mask.
|
static int |
SMOOTH_ROBOT_MODEL_MASK
The robot using model mask.
|
Modifier | Constructor and Description |
---|---|
protected |
JemmyProperties() |
Modifier and Type | Method and Description |
---|---|
protected JemmyProperties |
cloneThis()
Creates an exact copy on this instance.
|
boolean |
contains(java.lang.String name)
Checks if "name" propery currently has a value.
|
void |
copyTo(JemmyProperties properties)
Copy all properties from this instance into another.
|
static java.lang.String |
getBuild()
Returns build (like 20011231 (yyyymmdd)).
|
BundleManager |
getBundleManager()
Returns bundle manager.
|
CharBindingMap |
getCharBindingMap()
Returns char binding map.
|
static BundleManager |
getCurrentBundleManager()
Just like getProperties().getBundleManager().
|
static CharBindingMap |
getCurrentCharBindingMap()
Just like getProperties().getCharBindingMap().
|
static int |
getCurrentDispatchingModel()
Returns the current dispatching model.
|
static int |
getCurrentDragAndDropStepLength()
Returns the current drag and drop step length value.
|
static java.lang.String[] |
getCurrentKeys()
Returns the current key values.
|
static TestOut |
getCurrentOutput()
Just like getProperties().getOutput().
|
static java.lang.Object |
getCurrentProperty(java.lang.String propertyName)
Just like getProperties().getProperty(propertyName).
|
static java.lang.String |
getCurrentResource(java.lang.String key)
Just like getProperties().getBundleManager().getResource(key).
|
static java.lang.String |
getCurrentResource(java.lang.String bundleID,
java.lang.String key)
Just like getProperties().getBundleManager().getResource(bundleID, key).
|
static long |
getCurrentTimeout(java.lang.String name)
Just like getProperties().getTimeouts().getTimeout(name).
|
static Timeouts |
getCurrentTimeouts()
Just like getProperties().getTimeouts().
|
static int |
getDefaultDispatchingModel()
Returns default event dispatching model.
|
int |
getDispatchingModel()
Returns the dispatching model.
|
int |
getDragAndDropStepLength()
Returns the drag and drop step length value.
|
static java.lang.String |
getFullVersion()
Returns full version string (like 1.0.1-20011231).
|
java.lang.String[] |
getKeys()
Returns the key values.
|
static java.lang.String |
getMajorVersion()
Returns major version (like 1.0).
|
static java.lang.String |
getMinorVersion()
Returns minor version (like 1).
|
TestOut |
getOutput()
Returns output.
|
static JemmyProperties |
getProperties()
Peeks upper JemmyProperties instance from stack.
|
java.lang.Object |
getProperty(java.lang.String name)
Returns the property value.
|
java.lang.String |
getResource(java.lang.String key)
Returns resource value.
|
java.lang.String |
getResource(java.lang.String bundleID,
java.lang.String key)
Returns resource value from the specified bundle.
|
long |
getTimeout(java.lang.String name)
Returns a timeouts value.
|
Timeouts |
getTimeouts()
Returns timeouts.
|
static java.lang.String |
getVersion()
Returns version string (like 1.0.1).
|
void |
init()
Inits properties and dispatching model from system environment variables.
|
static long |
initCurrentTimeout(java.lang.String name,
long newValue)
Just like getProperties().getTimeouts().initTimeout(name, newValue).
|
void |
initDispatchingModel()
Initializes dispatching model.
|
void |
initDispatchingModel(boolean queue,
boolean robot)
Initializes dispatching model.
|
void |
initDispatchingModel(boolean queue,
boolean robot,
boolean shortcut)
Initializes dispatching model.
|
void |
initDispatchingModel(boolean queue,
boolean robot,
boolean shortcut,
boolean smooth)
Initializes dispatching model.
|
void |
initProperties()
Method to initialize timeouts and resources.
|
void |
initProperties(java.lang.String prop_file)
Method to initialize timeouts and resources.
|
long |
initTimeout(java.lang.String name,
long newValue)
Inits a timeouts value.
|
static void |
main(java.lang.String[] argv)
Prints full version into satndart output.
|
static JemmyProperties |
pop()
Pops last pushed properties from the properties stack.
|
static JemmyProperties |
push()
Creates a copy of the current JemmyProperties object
and pushes it into the properties stack.
|
protected static JemmyProperties |
push(JemmyProperties props)
Pushes properties stack.
|
static java.lang.Object |
removeCurrentProperty(java.lang.String propertyName)
Removes a property from current properties list.
|
java.lang.Object |
removeProperty(java.lang.String name)
Removes the property.
|
BundleManager |
setBundleManager(BundleManager resources)
Changes bundle manager.
|
CharBindingMap |
setCharBindingMap(CharBindingMap map)
Changes char binding map.
|
static BundleManager |
setCurrentBundleManager(BundleManager resources)
Just like getProperties().setBundleManager(resources).
|
static CharBindingMap |
setCurrentCharBindingMap(CharBindingMap map)
Just like getProperties().setCharBindingMap(map).
|
static int |
setCurrentDispatchingModel(int model)
Defines event dispatching model.
|
static int |
setCurrentDragAndDropStepLength(int model)
Specifies the current drag and drop step length value.
|
static TestOut |
setCurrentOutput(TestOut out)
Just like getProperties().setOutput(out).
|
static java.lang.Object |
setCurrentProperty(java.lang.String propertyName,
java.lang.Object propertyValue)
Just like getProperties().setProperty(propertyName, propertyValue).
|
static long |
setCurrentTimeout(java.lang.String name,
long newValue)
Just like getProperties().getTimeouts().setTimeout(name, newValue).
|
static Timeouts |
setCurrentTimeouts(Timeouts to)
Just like getProperties().setTimeouts(to).
|
int |
setDispatchingModel(int model)
Specifies the dispatching model value.
|
int |
setDragAndDropStepLength(int length)
Specifies the drag and drop step length value.
|
TestOut |
setOutput(TestOut out)
Changes output.
|
java.lang.Object |
setProperty(java.lang.String name,
java.lang.Object newValue)
Saves object as a static link to be used by other objects.
|
long |
setTimeout(java.lang.String name,
long newValue)
Changes a timeouts value.
|
Timeouts |
setTimeouts(Timeouts to)
Changes timeouts.
|
public static int QUEUE_MODEL_MASK
public static int ROBOT_MODEL_MASK
public static int SHORTCUT_MODEL_MASK
public static int SMOOTH_ROBOT_MODEL_MASK
public static java.lang.String getMajorVersion()
public static java.lang.String getMinorVersion()
public static java.lang.String getBuild()
public static java.lang.String getFullVersion()
public static java.lang.String getVersion()
public static JemmyProperties push()
public static JemmyProperties pop()
public static java.lang.Object getCurrentProperty(java.lang.String propertyName)
propertyName
- a property keysetCurrentProperty(java.lang.String, java.lang.Object)
,
setCurrentTimeout(java.lang.String, long)
public static java.lang.Object setCurrentProperty(java.lang.String propertyName, java.lang.Object propertyValue)
propertyName
- a property keypropertyValue
- a property valuegetCurrentProperty(java.lang.String)
,
getCurrentTimeout(java.lang.String)
public static java.lang.Object removeCurrentProperty(java.lang.String propertyName)
propertyName
- a property key.public static java.lang.String[] getCurrentKeys()
public static Timeouts getCurrentTimeouts()
setCurrentTimeouts(org.netbeans.jemmy.Timeouts)
public static Timeouts setCurrentTimeouts(Timeouts to)
to
- New timeoutsgetCurrentTimeouts()
public static long setCurrentTimeout(java.lang.String name, long newValue)
name
- a timeout namenewValue
- a timeout valuegetCurrentTimeout(java.lang.String)
public static long getCurrentTimeout(java.lang.String name)
name
- a timeout namesetCurrentTimeout(java.lang.String, long)
public static long initCurrentTimeout(java.lang.String name, long newValue)
name
- a timeout namenewValue
- a timeout valuesetCurrentTimeout(java.lang.String, long)
public static TestOut getCurrentOutput()
setCurrentOutput(org.netbeans.jemmy.TestOut)
public static TestOut setCurrentOutput(TestOut out)
out
- new outputgetCurrentOutput()
public static BundleManager getCurrentBundleManager()
setCurrentBundleManager(org.netbeans.jemmy.BundleManager)
public static BundleManager setCurrentBundleManager(BundleManager resources)
resources
- new BundleManagergetCurrentBundleManager()
public static java.lang.String getCurrentResource(java.lang.String key)
key
- a resource key.public static java.lang.String getCurrentResource(java.lang.String bundleID, java.lang.String key)
key
- a resource key.bundleID
- a bundle IDpublic static CharBindingMap getCurrentCharBindingMap()
setCurrentCharBindingMap(org.netbeans.jemmy.CharBindingMap)
public static CharBindingMap setCurrentCharBindingMap(CharBindingMap map)
map
- new CharBindingMap.getCurrentCharBindingMap()
public static int getCurrentDispatchingModel()
getDispatchingModel()
,
setCurrentDispatchingModel(int)
,
QUEUE_MODEL_MASK
,
ROBOT_MODEL_MASK
public static int setCurrentDispatchingModel(int model)
model
- New dispatching model value.setDispatchingModel(int)
,
getCurrentDispatchingModel()
,
QUEUE_MODEL_MASK
,
ROBOT_MODEL_MASK
,
initDispatchingModel(boolean, boolean)
,
initDispatchingModel()
public static int getDefaultDispatchingModel()
setCurrentDispatchingModel(int)
,
QUEUE_MODEL_MASK
,
ROBOT_MODEL_MASK
public static int getCurrentDragAndDropStepLength()
getDragAndDropStepLength()
,
setCurrentDragAndDropStepLength(int)
public static int setCurrentDragAndDropStepLength(int model)
model
- Pixel count to move mouse during one drag'n'drop step.setDragAndDropStepLength(int)
,
getCurrentDragAndDropStepLength()
public static JemmyProperties getProperties()
public static void main(java.lang.String[] argv)
argv
- Application args.protected static JemmyProperties push(JemmyProperties props)
props
- a JemmyProperties instance to put into the stack head.public void initProperties(java.lang.String prop_file)
prop_file
- File to get filenames from. initProperties()
public void initProperties()
initProperties(String)
public void initDispatchingModel(boolean queue, boolean robot, boolean shortcut)
queue
- Notifies that event queue dispatching should be used.robot
- Notifies that robot dispatching should be used.shortcut
- Notifies that event shorcutting should be used.public void initDispatchingModel(boolean queue, boolean robot, boolean shortcut, boolean smooth)
queue
- Notifies that event queue dispatching should be used.robot
- Notifies that robot dispatching should be used.shortcut
- Notifies that event shorcutting should be used.public void initDispatchingModel(boolean queue, boolean robot)
queue
- Notifies that event queue dispatching should be used.robot
- Notifies that robot dispatching should be used.public void initDispatchingModel()
getDefaultDispatchingModel()
public void init()
initProperties()
,
initDispatchingModel()
public Timeouts getTimeouts()
setTimeouts(org.netbeans.jemmy.Timeouts)
public Timeouts setTimeouts(Timeouts to)
to
- new timeouts.getTimeouts()
public long setTimeout(java.lang.String name, long newValue)
name
- Timeout namenewValue
- New timeout valuegetTimeout(java.lang.String)
public long getTimeout(java.lang.String name)
name
- Timeout namesetTimeout(java.lang.String, long)
public long initTimeout(java.lang.String name, long newValue)
name
- Timeout namenewValue
- New timeout valuepublic TestOut getOutput()
setOutput(org.netbeans.jemmy.TestOut)
public TestOut setOutput(TestOut out)
out
- new output.getOutput()
public BundleManager getBundleManager()
setBundleManager(org.netbeans.jemmy.BundleManager)
public BundleManager setBundleManager(BundleManager resources)
resources
- new bundle manager.getBundleManager()
public java.lang.String getResource(java.lang.String key)
key
- Resource key.public java.lang.String getResource(java.lang.String bundleID, java.lang.String key)
bundleID
- Id of a bundle to get resource from.key
- Resource key.public CharBindingMap getCharBindingMap()
setCharBindingMap(org.netbeans.jemmy.CharBindingMap)
public CharBindingMap setCharBindingMap(CharBindingMap map)
map
- new char binding map.getCharBindingMap()
public int getDispatchingModel()
getCurrentDispatchingModel()
,
setDispatchingModel(int)
,
QUEUE_MODEL_MASK
,
ROBOT_MODEL_MASK
public int setDispatchingModel(int model)
model
- New dispatching model value.setCurrentDispatchingModel(int)
,
getDispatchingModel()
,
QUEUE_MODEL_MASK
,
ROBOT_MODEL_MASK
public int getDragAndDropStepLength()
getCurrentDragAndDropStepLength()
,
setDragAndDropStepLength(int)
public int setDragAndDropStepLength(int length)
length
- Pixel count to move mouse during one drag'n'drop step.setCurrentDragAndDropStepLength(int)
,
getDragAndDropStepLength()
public boolean contains(java.lang.String name)
name
- Property name. Should by unique.setProperty(String, Object)
,
getProperty(String)
public java.lang.Object setProperty(java.lang.String name, java.lang.Object newValue)
name
- Property name. Should by unique.newValue
- Property value.setCurrentProperty(String, Object)
,
getProperty(String)
,
contains(String)
public java.lang.Object getProperty(java.lang.String name)
name
- Property name. Should by unique.getCurrentProperty(String)
,
setProperty(String, Object)
,
contains(String)
public java.lang.Object removeProperty(java.lang.String name)
name
- A name of the property to be removed.public java.lang.String[] getKeys()
public void copyTo(JemmyProperties properties)
properties
- a JemmyProperties instance to copy properties into.protected JemmyProperties cloneThis()