2005-02-21 Michael Koch <konqueror@gmx.de>
* java/awt/Checkbox.java (next_checkbox_number): New static variable. (generateName): New method. (getUniqueLong): Likewise. * java/awt/Window.java (next_window_number): New static variable. (generateName): New method. (getUniqueLong): Likewise. From-SVN: r95354
This commit is contained in:
committed by
Michael Koch
parent
7442146939
commit
11e56db0bd
@@ -92,6 +92,11 @@ public class Window extends Container implements Accessible
|
||||
|
||||
private transient Component windowFocusOwner;
|
||||
|
||||
/*
|
||||
* The number used to generate the name returned by getName.
|
||||
*/
|
||||
private static transient long next_window_number;
|
||||
|
||||
protected class AccessibleAWTWindow extends AccessibleAWTContainer
|
||||
{
|
||||
public AccessibleRole getAccessibleRole()
|
||||
@@ -945,4 +950,19 @@ public class Window extends Container implements Accessible
|
||||
getToolkit().getSystemEventQueue().postEvent(ce);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a unique name for this window.
|
||||
*
|
||||
* @return A unique name for this window.
|
||||
*/
|
||||
String generateName()
|
||||
{
|
||||
return "win" + getUniqueLong();
|
||||
}
|
||||
|
||||
private static synchronized long getUniqueLong()
|
||||
{
|
||||
return next_window_number++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user