GLG Toolkit, Java Class Library
Version 4.5
|
A data object used to pass information to FindObjects and to return the search results. More...
A data object used to pass information to FindObjects and to return the search results.
Public Attributes | |
GlgObjectActionInterface | custom_match |
Specifies an interface method that is invoked for each searched object to provide custom matching logic for match_type=CUSTOM_MATCH. More... | |
boolean | dont_add_matches |
If false, FindObjects returns matching objects in the found_object field. More... | |
boolean | find_first_match |
If true, the search is stopped after the first match and the first matching object is returned. More... | |
boolean | find_parents |
Controls search direction. More... | |
boolean | found_multiple |
Indicates the type of the returned result. More... | |
GlgObject | found_object |
Will be set to the contain the search result, which may be null if no matching objects were found or if match_type=CUSTOM_MATCH and dont_add_matches=true. More... | |
boolean | include_top_object |
If true, the top object passed as the object parameter of FindObjects will be included in the search results if it matches the search criteria. More... | |
int | match_type |
Specifies a bitwise mask of the object matching criteria. More... | |
GlgObject | object_id |
The object to be matched for match_type=OBJECT_ID_MATCH. More... | |
String | object_name |
Object name for match_type=OBJECT_NAME_MATCH. More... | |
int | object_type |
Object type for match_type=OBJECT_TYPE_MATCH. More... | |
String | resource_name |
Resource name for match_type=RESOURCE_MATCH. More... | |
boolean | search_drawable_only |
If true when searching descendants (find_parents=false), only drawable objects are searched. More... | |
boolean | search_inside |
If false, an object's children or parents are not searched if the object itself matches. More... | |
boolean | search_templates |
If false when searching descendants (find_parents=false), the templates of series, subdrawings and subwindows will be excluded from the search, and only the rendered instances inside these objects will be included. More... | |
GlgObjectActionInterface custom_match |
Specifies an interface method that is invoked for each searched object to provide custom matching logic for match_type=CUSTOM_MATCH.
The method can perform custom matching for the object supplied by its object parameter and should return true to indicate a match.
boolean dont_add_matches |
If false, FindObjects returns matching objects in the found_object field.
If multiple objects are found, the found_object field will contain a GLG group that is created to hold matching objects.
If the custom_match interface processes objects in-place, the returned group containing matching object is not used. In this case, dont_add_matches may be set to true to prevent storing matching objects at all. The DEMOS_JAVA/SCADAViewer/HMIPageC.java file in the GLG installation directory provides an example of using this setting when processing objects in-place.
This setting can be used only with match_type=CUSTOM_MATCH. If dont_add_matches is set to true, the returned found_object field will always be null.
boolean find_first_match |
If true, the search is stopped after the first match and the first matching object is returned.
If false, all matching objects are returned.
boolean find_parents |
Controls search direction.
If true, the object's ancestors (parents, grandparents and so on) are searched.
If false, the object's descendants (children, grandchildren and so on) are searched.
boolean found_multiple |
Indicates the type of the returned result.
Will be set to true if the search result stored in found_object contains a group of multiple matching objects.
Will be set to false if the search result stored in found_object is a single matching object.
GlgObject found_object |
Will be set to the contain the search result, which may be null if no matching objects were found or if match_type=CUSTOM_MATCH and dont_add_matches=true.
If the result is a single object, found_multiple will be set to false.
If the result is a group of several matching objects, found_multiple will be set to true.
boolean include_top_object |
If true, the top object passed as the object parameter of FindObjects will be included in the search results if it matches the search criteria.
If false, the top object will not be included.
int match_type |
Specifies a bitwise mask of the object matching criteria.
The following criteria are supported:
All of the criteria in the mask must be true in order for an object to match.
GlgObject object_id |
The object to be matched for match_type=OBJECT_ID_MATCH.
Only the specified object will be matched. This type of search can be used to find out if the specified object is either a child or a parent of the object the FindObjects method is invoked on.
String object_name |
Object name for match_type=OBJECT_NAME_MATCH.
Only objects with this name will be matched.
int object_type |
Object type for match_type=OBJECT_TYPE_MATCH.
Only objects of this type will be matched.
String resource_name |
Resource name for match_type=RESOURCE_MATCH.
Only objects that have a resource at the resource path specified by resource_name will be matched. The resource pointed to by the resource path must be an object.
boolean search_drawable_only |
If true when searching descendants (find_parents=false), only drawable objects are searched.
For example, when this flag is set, a polygon object's attributes such as FillColor and EdgeColor, will not be searched, which can be used to speed up the search. See IsDrawable more information.
If false, all objects will be searched.
boolean search_inside |
If false, an object's children or parents are not searched if the object itself matches.
If true, the search proceeds to process an object's children or parents even if the object matches.
boolean search_templates |
If false when searching descendants (find_parents=false), the templates of series, subdrawings and subwindows will be excluded from the search, and only the rendered instances inside these objects will be included.
This is a default setting, since the template objects are not drawn and therefore do not need to be processed.
If true, both the instances and the templates will be searched.
This flag is ignored when the search is performed before hierarchy setup, when the instances have not yet been loaded, and only the templates are available.