2003-03-24 Michael Koch <koqnueror@gmx.de>
* java/awt/ContainerOrderFocusTraversalPolicy.java (getFirstComponent): Implemented. (getLastComponent): Implemented. (getDefaultComponent): Implemented. (setImplicitDownCycleTraversal): Fixed implementation. * java/awt/Robot.java (Robot): Added documentation. * java/awt/Toolkit.java (getFontList): Deprecated. (getFontMetrics): Deprecated. (getPrintJob): Added documentation. (getSystemSelection): Added documentation. (getLockingKeyState): Added documentation. (setLockingKeyState): Added documentation. (createCustomCursor): Added documentation. (getBestCursorSize): Added documentation. (getMaximumCursorColors): Added documentation. (isFrameStateSupported): Added documentation. From-SVN: r64798
This commit is contained in:
committed by
Michael Koch
parent
3d6431d724
commit
050d3e13d8
@@ -104,6 +104,33 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
|
||||
if (root == null)
|
||||
throw new IllegalArgumentException ();
|
||||
|
||||
if (!root.isVisible ()
|
||||
|| !root.isDisplayable ())
|
||||
return null;
|
||||
|
||||
if (accept (root))
|
||||
return root;
|
||||
|
||||
Component[] componentArray = root.getComponents ();
|
||||
|
||||
for (int i = 0; i < componentArray.length; i++)
|
||||
{
|
||||
Component component = componentArray [i];
|
||||
|
||||
if (component instanceof Container)
|
||||
{
|
||||
Component result = getLastComponent ((Container) component);
|
||||
|
||||
if (result != null)
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (accept (component))
|
||||
return component;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -117,6 +144,33 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
|
||||
if (root == null)
|
||||
throw new IllegalArgumentException ();
|
||||
|
||||
if (!root.isVisible ()
|
||||
|| !root.isDisplayable ())
|
||||
return null;
|
||||
|
||||
if (accept (root))
|
||||
return root;
|
||||
|
||||
Component[] componentArray = root.getComponents ();
|
||||
|
||||
for (int i = componentArray.length - 1; i >= 0; i++)
|
||||
{
|
||||
Component component = componentArray [i];
|
||||
|
||||
if (component instanceof Container)
|
||||
{
|
||||
Component result = getLastComponent ((Container) component);
|
||||
|
||||
if (result != null)
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (accept (component))
|
||||
return component;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -127,15 +181,12 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
|
||||
*/
|
||||
public Component getDefaultComponent(Container root)
|
||||
{
|
||||
if (root == null)
|
||||
throw new IllegalArgumentException ();
|
||||
|
||||
return null;
|
||||
return getFirstComponent (root);
|
||||
}
|
||||
|
||||
public void setImplicitDownCycleTraversal(boolean value)
|
||||
{
|
||||
boolean implicitDownCycleTraversal = value;
|
||||
implicitDownCycleTraversal = value;
|
||||
}
|
||||
|
||||
public boolean getImplicitDownCycleTraversal()
|
||||
|
||||
Reference in New Issue
Block a user