Tabnine Logo
GCInterface.drawText
Code IndexAdd Tabnine to your IDE (free)

How to use
drawText
method
in
org.pentaho.di.core.gui.GCInterface

Best Java code snippets using org.pentaho.di.core.gui.GCInterface.drawText (Showing top 7 results out of 315)

origin: pentaho/pentaho-kettle

private void drawTextRightAligned( String txt, int x, int y ) {
 int off = gc.textExtent( txt ).x;
 x -= off;
 gc.drawText( txt, x, y );
}
origin: pentaho/pentaho-kettle

void drawTimeScaleLine( int height, double pixelsPerMs, long periodInMs ) {
 int log10 = (int) Math.log10( periodInMs ) + 1;
 int timeLineDistance = (int) Math.pow( 10, log10 - 1 ) / 2;
 int incrementUnit = Math.max( timeLineDistance, 1 );
 for ( int time = timeLineDistance; time <= periodInMs; time += incrementUnit ) {
  int x = (int) ( time * pixelsPerMs );
  getGc().setForeground( EColor.LIGHTGRAY );
  getGc().drawLine( x, 0, x, height );
  String marker = Integer.toString( time );
  Point point = getGc().textExtent( marker );
  getGc().setForeground( EColor.DARKGRAY );
  getGc().drawText( marker, x - ( point.x / 2 ), 0, true );
 }
}
origin: pentaho/pentaho-kettle

private void drawDurations( List<MetricsDuration> durations, List<MetricsDrawArea> areas, double pixelsPerMs ) {
 // set top indent
 int y = 20;
 for ( MetricsDuration duration : durations ) {
  Long realDuration = duration.getEndDate().getTime() - duration.getDate().getTime();
  // How many pixels does it take to drawn this duration?
  //
  int durationWidth = (int) ( realDuration * pixelsPerMs );
  int x = 2 + (int) ( ( duration.getDate().getTime() - periodStart ) * pixelsPerMs );
  getGc().setBackground( EColor.BACKGROUND );
  getGc().setForeground( EColor.LIGHTBLUE );
  getGc().fillGradientRectangle( x, y, durationWidth, barHeight, false );
  getGc().setForeground( EColor.BLACK );
  getGc().drawRectangle( x, y, durationWidth, barHeight );
  areas.add( new MetricsDrawArea( new Rectangle( x, y, durationWidth, barHeight ), duration ) );
  LoggingObjectInterface loggingObject =
    LoggingRegistry.getInstance().getLoggingObject( duration.getLogChannelId() );
  String message =
    duration.getDescription() + " - " + loggingObject.getObjectName() + " : " + duration.getDuration() + "ms";
  if ( duration.getCount() > 1 ) {
   message += " " + duration.getCount() + " calls, avg=" + ( duration.getDuration() / duration.getCount() );
  }
  getGc().setFont( EFont.GRAPH );
  getGc().textExtent( message );
  getGc().drawText( message, x + 3, y + 4, true );
  y += barHeight + 5;
 }
}
origin: pentaho/pentaho-kettle

 gc.drawText( nrInput, point.x + 1, point.y + 1 );
 gc.drawText( nrOutput, point.x + 1, point.y + 1 );
  gc.drawText( nrInput, point.x + 1, point.y + 1 );
  gc.drawText( Const.NVL( partitionSchema.getName(), "<no partition name>" ), point.x, point.y
   + textExtent.y + 3, true );
gc.drawText( name, namePosition.x, namePosition.y + 2, true );
boolean partitioned = false;
 gc.setBackground( EColor.BACKGROUND );
 gc.setForeground( EColor.BLACK );
 gc.drawText( clusterMessage, x - textExtent.x + 1, y - textExtent.y + 1 );
 if ( stepMeta.getClusterSchema() != null ) {
  Point clusterTextExtent = gc.textExtent( clusterMessage );
  gc.drawText( copies, x - textExtent.x + 1, y - textExtent.y - clusterTextExtent.y + 1, false );
  areaOwners.add( new AreaOwner( AreaType.STEP_COPIES_TEXT, x - textExtent.x + 1, y - textExtent.y
    - clusterTextExtent.y + 1, textExtent.x, textExtent.y, offset, transMeta, stepMeta ) );
 } else {
  gc.drawText( copies, x - textExtent.x + 1, y - textExtent.y + 1, false );
  areaOwners.add( new AreaOwner( AreaType.STEP_COPIES_TEXT, x - textExtent.x + 1, y - textExtent.y + 1, textExtent.x,
    textExtent.y, offset, transMeta, stepMeta ) );
 gc.drawText( trimmedName, areaX + ( totalWidth - nameExtent.x ) / 2 + MINI_ICON_MARGIN, areaY
  + MINI_ICON_MARGIN, true );
 gc.setForeground( EColor.CRYSTAL );
origin: pentaho/pentaho-kettle

gc.drawText( name, xpos, ypos, true );
 gc.drawText( trimmedName, areaX + ( totalWidth - nameExtent.x ) / 2 + MINI_ICON_MARGIN, areaY
  + MINI_ICON_MARGIN, true );
 gc.setForeground( EColor.CRYSTAL );
origin: pentaho/pentaho-kettle

 gc.setBackground( EColor.LIGHTGRAY );
gc.drawText( titles[i], rowX, rowY );
rowY += rowHeight;
origin: pentaho/pentaho-kettle

gc.setForeground( notePadMeta.getFontColorRed(), notePadMeta.getFontColorGreen(), notePadMeta
 .getFontColorBlue() );
gc.drawText( notePadMeta.getNote(), note.x + margin, note.y + margin, true );
org.pentaho.di.core.guiGCInterfacedrawText

Popular methods of GCInterface

  • dispose
  • getImage
  • textExtent
  • drawImage
  • drawJobEntryIcon
  • drawLine
  • drawPoint
  • drawPolygon
  • drawRectangle
  • drawRoundRectangle
  • drawStepIcon
  • fillGradientRectangle
  • drawStepIcon,
  • fillGradientRectangle,
  • fillPolygon,
  • fillRectangle,
  • fillRoundRectangle,
  • getAlpha,
  • getArea,
  • getDeviceBounds,
  • getImageBounds

Popular in Java

  • Making http requests using okhttp
  • setScale (BigDecimal)
  • findViewById (Activity)
  • startActivity (Activity)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • JFrame (javax.swing)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now