Examples of Notation


Examples of jscicalc.Notation

     * Standard test function.
     * @param args Standard arguments.
     */
    public static void main( String[] args ){
  DoubleFormat d = new DoubleFormat( -4.2035492222884317E-246, Base.DECIMAL );
  Notation n = new Notation();
  n.setScientific();
  d.setNotation( n );
  DoubleFormat.HTMLStringRepresentation s = d.representation();
  System.out.print( s.string + " (length = " );
  System.out.print( s.length );
  System.out.println( ")" );
View Full Code Here

Examples of jscicalc.Notation

              "maxChars must be at least four" );
  if( precision < 1 )
      throw new RuntimeException( "Complex.toHTMLSubString" +
              "precision must be positive" );

  Notation n = new Notation();
  if( notation.standard() ) n.setStandard();
  else n.setScientific();
  if( notation.complex() ) n.setComplex();
  else n.setNonComplex();
  if( notation.rectangular() ) n.setRectangular();
  else n.setPolar();

  if( n.standard() ){
      result = tryHTMLString( maxChars, precision, base, n ).stringVector;
      if( result != null ) return result;
  }
  // force scientific notation
  n.setScientific();
 
  result = tryHTMLString( maxChars, precision, base, n ).stringVector;
  if( result != null ) return result;
  else {
      result = new jscicalc.StringArray();
View Full Code Here

Examples of jscicalc.Notation

              "maxChars must be at least four" );
  if( precision < 1 )
      throw new RuntimeException( "Complex.toHTMLParenString" +
              "precision must be positive" );

  Notation n = new Notation();
  if( notation.standard() ) n.setStandard();
  else n.setScientific();
  if( notation.complex() ) n.setComplex();
  else n.setNonComplex();
  if( notation.rectangular() ) n.setRectangular();
  else n.setPolar();

  HTMLStringResult result;
  if( n.standard() ){
      result = tryHTMLString( maxChars, precision, base, n );
      if( result.stringVector != null ){
    if( result.parentheses ){
        v.add( "(" );
        v.addAll( result.stringVector );
        v.add( ")" );
        return v;
    } else
        return result.stringVector;
      }
  }
  // force scientific notation
  n.setScientific();
 
  result = tryHTMLString( maxChars, precision, base, n );
  if( result.stringVector != null ){
      if( result.parentheses ){
    v.add( "(" );
View Full Code Here

Examples of jscicalc.Notation

              final Base base, final Notation notation ){
  // set up
  HTMLStringResult result = new HTMLStringResult();
  DoubleFormat x;
  DoubleFormat y;
  Notation xn = new Notation();
  Notation yn = new Notation();
  if( notation.rectangular() ){
      x = new DoubleFormat( real(), base );
      y = new DoubleFormat( imaginary(), base );
      if( notation.scientific() ){
    xn.setScientific();
    yn.setScientific();
      }
  } else { // polar
      x = new DoubleFormat( abs(), base );
      y = new DoubleFormat( arg(), base );
      if( notation.scientific() ){
View Full Code Here

Examples of mf.org.w3c.dom.Notation

            /** Copy notations. */
            oldMap = node.getNotations();
            newMap = docType.getNotations();
            length = oldMap.getLength();
            for (int i = 0; i < length; ++i) {
                Notation oldNotation = (Notation) oldMap.item(i);
                NotationImpl newNotation = (NotationImpl) fDocumentImpl.createNotation(oldNotation.getNodeName());
                newNotation.setPublicId(oldNotation.getPublicId());
                newNotation.setSystemId(oldNotation.getSystemId());
                newMap.setNamedItem(newNotation);
            }
            append(docType);
        }
    }
View Full Code Here

Examples of mf.org.w3c.dom.Notation

                // No name, kids carry value
                break;
            }

            case NOTATION_NODE: {
                Notation srcnotation = (Notation)source;
                NotationImpl newnotation =
                (NotationImpl)createNotation(source.getNodeName());
                newnotation.setPublicId(srcnotation.getPublicId());
                newnotation.setSystemId(srcnotation.getSystemId());
                // Kids carry additional value
                newnode = newnotation;
                // No name, no value
                break;
            }
View Full Code Here

Examples of org.apache.axis2.databinding.types.Notation

    }

    public static String convertToNOTATION(Object jsObject) throws AxisFault {
        try {
            String str = (String) jsObject;
            Notation notation = new Notation();
            notation.setName(new NCName(str));
            return notation.toString();
        } catch (IllegalArgumentException e) {
            throw new AxisFault("Unable to convert the return value to NOTATION");
        }
    }
View Full Code Here

Examples of org.w3c.dom.Notation

        case Node.DOCUMENT_NODE : {
            DocumentType      docType;
            DOMImplementation domImpl;
            NamedNodeMap      map;
            Entity            entity;
            Notation          notation;
            int               i;
           
            serializeDocument();
           
            // If there is a document type, use the SAX events to
View Full Code Here

Examples of org.w3c.dom.Notation

                // No name, kids carry value
                break;
            }

            case NOTATION_NODE: {
                Notation srcnotation = (Notation)source;
                NotationImpl newnotation =
                (NotationImpl)createNotation(source.getNodeName());
                newnotation.setPublicId(srcnotation.getPublicId());
                newnotation.setSystemId(srcnotation.getSystemId());
                // Kids carry additional value
                newnode = newnotation;
                // No name, no value
                break;
            }
View Full Code Here

Examples of org.w3c.dom.Notation

                // No name, kids carry value
                break;
            }

            case NOTATION_NODE: {
                Notation srcnotation = (Notation)source;
                NotationImpl newnotation =
                    (NotationImpl)createNotation(source.getNodeName());
                newnotation.setPublicId(srcnotation.getPublicId());
                newnotation.setSystemId(srcnotation.getSystemId());
                // Kids carry additional value
                newnode = newnotation;
                // No name, no value
                break;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.