Container.java 文件源码

java
阅读 39 收藏 0 点赞 0 评论 0

项目:JamVM-PH 作者:
/**
 * Deserialize this Container:
 * <ol>
 * <li>Read from the stream the default serializable fields.</li>
 * <li>Read a list of serializable ContainerListeners as optional
 * data.  If the list is null, no listeners will be registered.</li>
 * <li>Read this Container's FocusTraversalPolicy as optional data.
 * If this is null, then this Container will use a
 * DefaultFocusTraversalPolicy.</li>
 * </ol>
 *
 * @param s the stream to read from
 * @throws ClassNotFoundException if deserialization fails
 * @throws IOException if the stream fails
 */
private void readObject (ObjectInputStream s)
  throws ClassNotFoundException, IOException
{
  s.defaultReadObject ();
  String key = (String) s.readObject ();
  while (key != null)
    {
      Object object = s.readObject ();
      if ("containerL".equals (key))
        addContainerListener((ContainerListener) object);
      // FIXME: under what key is the focus traversal policy stored?
      else if ("focusTraversalPolicy".equals (key))
        setFocusTraversalPolicy ((FocusTraversalPolicy) object);

      key = (String) s.readObject();
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号