Package net.wigis.graph.dnv.geometry

Examples of net.wigis.graph.dnv.geometry.Text


 
     
     
      if( allTimes.size() > 0 )
      {
        timeText = new Text( getMinTimeValue() + " - " + getMaxTimeValue(), new Vector2D( width / 2, 12 ), new Vector3D(1,1,1), new Vector3D(0,0,0), 18, true, true, false, false, false, false, true );
      }
      else
      {
        timeText = null;
      }
View Full Code Here


 
     
     
      if( allDKTimes.size() > 0 )
      {
        timeText = new Text( getMinDKTimeValue() + " - " + getMaxDKTimeValue(), new Vector2D( width / 2, 12 ), new Vector3D(1,1,1), new Vector3D(0,0,0), 18, true, true, false, false, false, false, true );
      }
      else
      {
        timeText = null;
      }
View Full Code Here

 
     
     
      if( allTimes.size() > 0 )
      {
        timeText = new Text( getMinTimeValue() + " - " + getMaxTimeValue(), new Vector2D( width / 2, 12 ), new Vector3D(1,1,1), new Vector3D(0,0,0), 18, true, true, false, false, false, false, true );
      }
      else
      {
        timeText = null;
      }
View Full Code Here

 
     
     
      if( allDKTimes.size() > 0 )
      {
        timeText = new Text( getMinDKTimeValue() + " - " + getMaxDKTimeValue(), new Vector2D( width / 2, 12 ), new Vector3D(1,1,1), new Vector3D(0,0,0), 18, true, true, false, false, false, false, true );
      }
      else
      {
        timeText = null;
      }
View Full Code Here

          l.setStart( (float)( l.getStart().getX() * xRatio ), (float)( l.getStart().getY() * yRatio ) );
          l.setEnd( (float)( l.getEnd().getX() * xRatio ), (float)( l.getEnd().getY() * yRatio ) );
        }
        else if( g instanceof Text )
        {
          Text t = (Text)g;
          t.setPosition( (float)( t.getPosition().getX() * xRatio ), (float)( t.getPosition().getY() * yRatio ) );
        }
      }
    }
  }
View Full Code Here

    float axisTickLength = ( bottomRight.getX() - bottomLeft.getX() ) / numberOfTicks;
    float axisTickLengthScreen = ( bottomRightScreen.getX() - bottomLeftScreen.getX() ) / numberOfTicks;
    for( int i = 0; i <= numberOfTicks; i++ )
    {
      g2d.drawLine( (int)tempPosScreen.getX(), (int)tempPosScreen.getY(), (int)tempPosScreen.getX(), (int)tempPosScreen.getY() + 10 );
      Text text = new Text( "" + ( Math.round( tempPos.getX() * 1000.0 ) / 1000.0 ), new Vector2D( tempPosScreen.getX(),
          tempPosScreen.getY() + 15 ), outlineColor, color, 10, false, true, false, false, false, false, true );
      text.draw( g2d, pb, minXPercent, maxXPercent, minYPercent, maxYPercent, globalMinX, globalMaxX, globalMinY, globalMaxY,
          nodeWidth, height, overview );
      tempPos.add( axisTickLength, 0 );
      tempPosScreen.add( axisTickLengthScreen, 0 );
    }

    // Y-axis
    g2d.drawLine( (int)bottomLeftScreen.getX(), (int)bottomLeftScreen.getY(), (int)topLeftScreen.getX(), (int)topLeftScreen.getY() );
    tempPos.set( bottomLeft );
    tempPosScreen.set( bottomLeftScreen );
    axisTickLength = ( topLeft.getY() - bottomLeft.getY() ) / numberOfTicks;
    axisTickLengthScreen = ( topLeftScreen.getY() - bottomLeftScreen.getY() ) / numberOfTicks;
    for( int i = 0; i <= numberOfTicks; i++ )
    {
      g2d.drawLine( (int)tempPosScreen.getX(), (int)tempPosScreen.getY(), (int)tempPosScreen.getX() - 10, (int)tempPosScreen.getY() );
      Text text = new Text( "" + ( Math.round( tempPos.getY() * 1000.0 ) / 1000.0 ), new Vector2D( tempPosScreen.getX() - 25,
          tempPosScreen.getY() ), outlineColor, color, 10, false, true, false, false, false, false, true );
      text.draw( g2d, pb, minXPercent, maxXPercent, minYPercent, maxYPercent, globalMinX, globalMaxX, globalMinY, globalMaxY,
          nodeWidth, height, overview );
      tempPos.add( 0, axisTickLength );
      tempPosScreen.add( 0, axisTickLengthScreen );
    }
  }
View Full Code Here

          headerAlignment.put( "X-align" + selectedNode.getId(), true );
          position = new Vector2D( minPosScreen.getX() + ( maxPosScreen.getX() - minPosScreen.getX() ) / 2.0f, 14 );
          key = "X" + hops;
          if( !drawnHeadings.containsKey( key ) )
          {
            Text t = new Text( "Dist " + hops, position, new Vector3D( 1, 1, 1 ), fillColor, 12, true, true, true, false, false, false,
                true );
            t.draw( g2d, pb, minXPercent, maxXPercent, minYPercent, maxYPercent, minX, maxX, minY, maxY, nodeWidth, height, overview );
            drawnHeadings.put( key, 1 );
          }
          else
          {
            drawnHeadings.put( key, drawnHeadings.get( key ) + 1 );
          }
        }
        else
        {
          headerAlignment.put( "Y-align" + selectedNode.getId(), true );
          position = new Vector2D( 35, minPosScreen.getY() + ( maxPosScreen.getY() - minPosScreen.getY() ) / 2.0f );
          key = "Y" + hops;
          if( !drawnHeadings.containsKey( key ) )
          {
            Text t = new Text( "Dist " + hops, position, new Vector3D( 1, 1, 1 ), fillColor, 12, true, true, true, false, false, false,
                true );
            t.draw( g2d, pb, minXPercent, maxXPercent, minYPercent, maxYPercent, minX, maxX, minY, maxY, nodeWidth, height, overview );
            drawnHeadings.put( key, 1 );
          }
          else
          {
            drawnHeadings.put( key, drawnHeadings.get( key ) + 1 );
          }
        }
      }
      else
      {
        position = new Vector2D( 70 * hops, 14 );
        key = "Align" + hops;
        if( !drawnHeadings.containsKey( key ) )
        {
          Text t = new Text( "Dist " + hops, position, new Vector3D( 1, 1, 1 ), fillColor, 12, true, true, true, false, false, false, true );
          t.draw( g2d, pb, minXPercent, maxXPercent, minYPercent, maxYPercent, minX, maxX, minY, maxY, nodeWidth, height, overview );
          drawnHeadings.put( key, 1 );
        }
        else
        {
          drawnHeadings.put( key, drawnHeadings.get( key ) + 1 );
        }
      }

      position.setY( position.getY() + ( drawnHeadings.get( key ) * 20 ) );
      if( drawNumberOfNodesInBox )
      {
        Text t = new Text( nodes.size() + " nodes", position, new Vector3D( 1, 1, 1 ), fillColor, 12, true, true, true, false, false, false,
            true );
        t.draw( g2d, pb, minXPercent, maxXPercent, minYPercent, maxYPercent, minX, maxX, minY, maxY, nodeWidth, height, overview );
      }

      return 1;
    }

View Full Code Here

      if( color == null )
      {
        color = new Vector3D( 0, 0, 0 );
      }
      int radius = pb.getNodeWidthOnScreen( endNode ) / 2;
      Text t = null;
      boolean playSound = false;
      synchronized( handledDistances )
      {
        if( handledDistances.get( currentDistance ) == null )
        {
          handledDistances.put( currentDistance, true );
          t = new Text( "Dist " + currentDistance, new Vector2D( 45, pb.getHeightInt() - 30 ), new Vector3D(1,1,1), endNode.getColor(), 15, true, true, true, false, false, false, true );
          Animation a = new NodeGlowAnimation( 10, color, t.getNode(), radius, radius + 40, 2, true, t );
          endNode.getGraph().addAnimation( a );
          if( pb.isPlaySound() )
          {
            try
            {
View Full Code Here

TOP

Related Classes of net.wigis.graph.dnv.geometry.Text

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.