gpt4 book ai didi

bibliothek.util.xml.XElement.copy()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 06:10:40 27 4
gpt4 key购买 nike

本文整理了Java中bibliothek.util.xml.XElement.copy()方法的一些代码示例,展示了XElement.copy()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XElement.copy()方法的具体详情如下:
包路径:bibliothek.util.xml.XElement
类名称:XElement
方法名:copy

XElement.copy介绍

[英]Makes a copy of all the elements of original and stores them in this container.
[中]复制original的所有元素并将其存储在此容器中。

代码示例

代码示例来源:origin: xyz.cofe/docking-frames-core

@Override
public XElement copy() {
  XElement copy = new XElement( name );
  copy.copy( this );
  return copy;
}

代码示例来源:origin: org.opentcs.thirdparty.dockingframes/docking-frames-core

@Override
public XElement copy() {
  XElement copy = new XElement( name );
  copy.copy( this );
  return copy;
}

代码示例来源:origin: xyz.cofe/docking-frames-core

/**
 * Makes a copy of all the elements of <code>original</code>
 * and stores them in this container.
 * @param original the element to copy
 */
public void copy( XElement original ){
  super.copy( original );
  
  attributes.clear();
  for( XAttribute attr : original.attributes )
    attributes.add( attr.copy() );
  
  children.clear();
  for( XElement child : original.children )
    children.add( child.copy() );
}

代码示例来源:origin: org.opentcs.thirdparty.dockingframes/docking-frames-core

/**
 * Makes a copy of all the elements of <code>original</code>
 * and stores them in this container.
 * @param original the element to copy
 */
public void copy( XElement original ){
  super.copy( original );
  
  attributes.clear();
  for( XAttribute attr : original.attributes )
    attributes.add( attr.copy() );
  
  children.clear();
  for( XElement child : original.children )
    children.add( child.copy() );
}

代码示例来源:origin: xyz.cofe/docking-frames-common

@Override
  protected void rescueSettings( XElement element ){
    XElement states = element.getElement( "states" );
    if( states != null ){
      lastMaximizedLocation = new HashMap<String, B>();
      lastMaximizedMode = new HashMap<String, String>();

      XElement xmaximized = element.getElement( "maximized" );

      if( xmaximized != null ){
        for( XElement xitem : xmaximized.getElements( "item" )){
          String key = xitem.getString( "id" );

          XElement xmode = xitem.getElement( "mode" );
          if( xmode != null ){
            lastMaximizedMode.put( key, xmode.getString() );
          }

          XElement xlocation = xitem.getElement( "location" );
          if( xlocation != null ){
            XElement xcopy = xlocation.copy();
            xcopy.addElement( "mode" ).setString( MaximizedMode.IDENTIFIER.toString() );
            lastMaximizedLocation.put( key, getConverter().readPropertyXML( xcopy ) );
          }
        }
      }
    }
  }
}

代码示例来源:origin: org.opentcs.thirdparty.dockingframes/docking-frames-common

@Override
  protected void rescueSettings( XElement element ){
    XElement states = element.getElement( "states" );
    if( states != null ){
      lastMaximizedLocation = new HashMap<String, B>();
      lastMaximizedMode = new HashMap<String, String>();

      XElement xmaximized = element.getElement( "maximized" );

      if( xmaximized != null ){
        for( XElement xitem : xmaximized.getElements( "item" )){
          String key = xitem.getString( "id" );

          XElement xmode = xitem.getElement( "mode" );
          if( xmode != null ){
            lastMaximizedMode.put( key, xmode.getString() );
          }

          XElement xlocation = xitem.getElement( "location" );
          if( xlocation != null ){
            XElement xcopy = xlocation.copy();
            xcopy.addElement( "mode" ).setString( MaximizedMode.IDENTIFIER.toString() );
            lastMaximizedLocation.put( key, getConverter().readPropertyXML( xcopy ) );
          }
        }
      }
    }
  }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com