Package ofc4j.model.elements

Examples of ofc4j.model.elements.Element


    if ( zFormat != null ) {
      df = new DecimalFormat( zFormat );
    }

    for ( int row = 0; row < getRowCount(); row++ ) {
      Element e = null;
      String text = getRowHeader( row );

      ScatterChart sc = new ScatterChart( "" ); //$NON-NLS-1$
      sc.setColour( getColor( row ) );
      Number x = (Number) getValueAt( row, 0 );
      Number y = (Number) getValueAt( row, 1 );
      Number z = (Number) getValueAt( row, 2 );

      setupDotSize( sc, z );

      sc.addPoint( x.doubleValue(), y.doubleValue() );

      if ( content != null ) {
        String zstr = null;
        if ( df != null ) {
          zstr = df.format( z );
        } else {
          if ( z != null ) {
            zstr = z.toString();
          }
        }
        sc.setTooltip( MessageFormat.format( content, text, NumberFormat.getInstance().format( x ), NumberFormat
            .getInstance().format( y ), zstr ) );
      }

      if ( alpha != null ) {
        sc.setAlpha( alpha );
      }

      e = sc;
      e.setText( text );
      elements.add( e );
    }
  }
View Full Code Here


  @Override
  public void createElements() {
    if ( CATEGORY_TYPE.equals( datasetType ) ) {
      int columnCount = getColumnCount();
      for ( int col = 0; col < columnCount; col++ ) {
        Element e = null;
        if ( VERTICAL_ORIENTATION.equals( orientation ) ) {
          e = getVerticalBarChartFromColumn( col );
        } else if ( HORIZONTAL_ORIENTATION.equals( orientation ) ) {
          e = getHorizontalBarChartFromColumn( col );
View Full Code Here

  }

  @Override
  protected void createElements() {
    for ( int row = 0; row < getRowCount(); row++ ) {
      Element e = null;
      String text = getRowHeader( row );
      ScatterChart sc = new ScatterChart( "" ); //$NON-NLS-1$
      sc.setColour( getColor( row ) );
      Number x = (Number) getValueAt( row, 0 );
      Number y = (Number) getValueAt( row, 1 );

      if ( dotwidth != null ) {
        sc.setDotSize( dotwidth );
      }

      Node temp = chartNode.selectSingleNode( DOT_LABEL_CONTENT_NODE_LOC );
      if ( getValue( temp ) != null ) {
        sc.setTooltip( MessageFormat.format( getValue( temp ), text, NumberFormat.getInstance().format( x ),
            NumberFormat.getInstance().format( y ) ) );
      } else {
        sc.setTooltip( MessageFormat.format( "{0}: {1}, {2}", text, //$NON-NLS-1$
            NumberFormat.getInstance().format( x ), NumberFormat.getInstance().format( y ) ) );
      }

      sc.addPoint( x.doubleValue(), y.doubleValue() );

      if ( alpha != null ) {
        sc.setAlpha( alpha );
      }

      e = sc;
      e.setText( text );
      elements.add( e );
    }
  }
View Full Code Here

TOP

Related Classes of ofc4j.model.elements.Element

Copyright © 2018 www.massapicom. 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.