Changeset 928 for trunk/autoquest-jfcmonitor/src/main/java/de/ugoe/cs/autoquest/jfcmonitor/JFCComponent.java
- Timestamp:
- 10/17/12 10:50:44 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-jfcmonitor/src/main/java/de/ugoe/cs/autoquest/jfcmonitor/JFCComponent.java
r927 r928 142 142 * @param component 143 143 * component that is searched for 144 * @return corresponding JFComponent instance; null if the comp enent is not found144 * @return corresponding JFComponent instance; null if the component is not found 145 145 */ 146 146 public static JFCComponent find(Component component) { … … 192 192 */ 193 193 private String title = null; 194 195 /** 196 * <p> 197 * Helper attribute that encodes the source of the title. 198 * </p> 199 */ 200 private int titleSource = JFCComponentTitleHierachy.SOURCE_NOT_KNOWN; 194 201 195 202 /** … … 303 310 /** 304 311 * <p> 312 * Returns an integer that encodes the source of the title. 313 * </p> 314 * @return int 315 */ 316 public int getTitleSource(){ 317 return titleSource; 318 } 319 320 /** 321 * <p> 305 322 * Returns an XML representation of the components children. 306 323 * </p> … … 363 380 * </p> 364 381 */ 365 private void setTitle() { 382 public void setTitle() { 383 // Note that JFCComponentTitleHierarchy depends on this method. So any changes made 384 // here should be reflected in JFCComponentTitleHierarchy. 385 366 386 title = null; // reset title 367 387 … … 369 389 if (accessibleContext != null) { 370 390 title = accessibleContext.getAccessibleName(); 391 titleSource = JFCComponentTitleHierachy.ACCESSIBLE_NAME; 371 392 } 372 393 if (title == null) { 373 394 title = icon; 395 titleSource = JFCComponentTitleHierachy.ICON; 374 396 } 375 397 if (title == null) { 376 398 title = component.getName(); 399 titleSource = JFCComponentTitleHierachy.NAME; 377 400 } 378 401 if (title == null) { 379 402 // use coordinates as last resort 380 403 title = "Pos(" + component.getX() + "," + component.getY() + ")"; 404 titleSource = JFCComponentTitleHierachy.POS; 381 405 } 382 406 }
Note: See TracChangeset
for help on using the changeset viewer.