當前位置: 首頁>>代碼示例>>Java>>正文


Java ELineStyle類代碼示例

本文整理匯總了Java中org.pentaho.di.core.gui.PrimitiveGCInterface.ELineStyle的典型用法代碼示例。如果您正苦於以下問題:Java ELineStyle類的具體用法?Java ELineStyle怎麽用?Java ELineStyle使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ELineStyle類屬於org.pentaho.di.core.gui.PrimitiveGCInterface包,在下文中一共展示了ELineStyle類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: drawRect

import org.pentaho.di.core.gui.PrimitiveGCInterface.ELineStyle; //導入依賴的package包/類
protected void drawRect(Rectangle rect)
{
    if (rect == null) return;
    gc.setLineStyle(ELineStyle.DASHDOT);
    gc.setLineWidth(linewidth);
    gc.setForeground(EColor.GRAY);
    // PDI-2619: SWT on Windows doesn't cater for negative rect.width/height so handle here. 
    Point s = real2screen(rect.x, rect.y);
    if (rect.width < 0) {
    	s.x = s.x + rect.width;
    }
    if (rect.height < 0) {
    	s.y = s.y + rect.height;
    }
    gc.drawRectangle(s.x, s.y, Math.abs(rect.width), Math.abs(rect.height));
    gc.setLineStyle(ELineStyle.SOLID);
}
 
開發者ID:jjeb,項目名稱:kettle-trunk,代碼行數:18,代碼來源:BasePainter.java

示例2: drawRect

import org.pentaho.di.core.gui.PrimitiveGCInterface.ELineStyle; //導入依賴的package包/類
protected void drawRect( Rectangle rect ) {
  if ( rect == null ) {
    return;
  }
  gc.setLineStyle( ELineStyle.DASHDOT );
  gc.setLineWidth( linewidth );
  gc.setForeground( EColor.GRAY );
  // PDI-2619: SWT on Windows doesn't cater for negative rect.width/height so handle here.
  Point s = real2screen( rect.x, rect.y );
  if ( rect.width < 0 ) {
    s.x = s.x + rect.width;
  }
  if ( rect.height < 0 ) {
    s.y = s.y + rect.height;
  }
  gc.drawRectangle( s.x, s.y, Math.abs( rect.width ), Math.abs( rect.height ) );
  gc.setLineStyle( ELineStyle.SOLID );
}
 
開發者ID:pentaho,項目名稱:pentaho-kettle,代碼行數:19,代碼來源:BasePainter.java

示例3: drawLine

import org.pentaho.di.core.gui.PrimitiveGCInterface.ELineStyle; //導入依賴的package包/類
protected void drawLine(JobHopMeta jobHop, boolean is_candidate) {
	int line[] = getLine(jobHop.getFromEntry(), jobHop.getToEntry());

	gc.setLineWidth(linewidth);
	EColor col;

	if (jobHop.getFromEntry().isLaunchingInParallel()) {
		gc.setLineStyle(ELineStyle.PARALLEL);
	} else {
		gc.setLineStyle(ELineStyle.SOLID);
	}

	if (is_candidate) {
		col = EColor.BLUE;
	} else if (jobHop.isEnabled()) {
		if (jobHop.isUnconditional()) {
			col = EColor.BLACK;
		} else {
			if (jobHop.getEvaluation()) {
				col = EColor.GREEN;
			} else {
				col = EColor.RED;
			}
		}
	} else {
		col = EColor.GRAY;
	}

	gc.setForeground(col);

	if (jobHop.isSplit())
		gc.setLineWidth(linewidth + 2);
	drawArrow(line, jobHop);
	if (jobHop.isSplit())
		gc.setLineWidth(linewidth);

	gc.setForeground(EColor.BLACK);
	gc.setBackground(EColor.BACKGROUND);
	gc.setLineStyle(ELineStyle.SOLID);
}
 
開發者ID:jjeb,項目名稱:kettle-trunk,代碼行數:41,代碼來源:JobPainter.java

示例4: drawLine

import org.pentaho.di.core.gui.PrimitiveGCInterface.ELineStyle; //導入依賴的package包/類
private void drawLine(StepMeta fs, StepMeta ts, TransHopMeta hi, boolean is_candidate) {
    int line[] = getLine(fs, ts);

    EColor col;
    ELineStyle linestyle=ELineStyle.SOLID;
    int activeLinewidth = linewidth; 
    
    if (is_candidate)
    {
        col = EColor.BLUE;
    }
    else
    {
        if (hi.isEnabled())
        {
            if (fs.isSendingErrorRowsToStep(ts))
            {
                col = EColor.RED;
                linestyle = ELineStyle.DOT;
                activeLinewidth = linewidth+1;
            }
            else
            {
            	col = EColor.BLACK;
            }
        }
        else
        {
            col = EColor.GRAY;
        }
    }
    if (hi.split) activeLinewidth = linewidth+2;

    // Check to see if the source step is an info step for the target step.
    //
    StepIOMetaInterface ioMeta = ts.getStepMetaInterface().getStepIOMeta();
    List<StreamInterface> infoStreams = ioMeta.getInfoStreams();
    if (!infoStreams.isEmpty()) {
    	// Check this situation, the source step can't run in multiple copies!
    	//
    	for (StreamInterface stream : infoStreams) {
    		if (fs.getName().equalsIgnoreCase(stream.getStepname())) {
    			// This is the info step over this hop!
    			//
    			if (fs.getCopies()>1) {
    				// This is not a desirable situation, it will always end in error.
    				// As such, it's better not to give feedback on it.
    				// We do this by drawing an error icon over the hop...
    				//
    				col=EColor.RED;
    			}
    		}
    	}
    }
    
    gc.setForeground(col);
    gc.setLineStyle(linestyle);
    gc.setLineWidth(activeLinewidth);
    
    drawArrow(line, fs, ts);
    
    if (hi.split) gc.setLineWidth(linewidth);

    gc.setForeground(EColor.BLACK);
    gc.setBackground(EColor.BACKGROUND);
    gc.setLineStyle(ELineStyle.SOLID);
}
 
開發者ID:jjeb,項目名稱:kettle-trunk,代碼行數:68,代碼來源:TransPainter.java

示例5: drawLine

import org.pentaho.di.core.gui.PrimitiveGCInterface.ELineStyle; //導入依賴的package包/類
/**
 * Calculates line coordinates from center to center.
 */
protected void drawLine( JobHopMeta jobHop, boolean is_candidate ) {
  int[] line = getLine( jobHop.getFromEntry(), jobHop.getToEntry() );

  gc.setLineWidth( linewidth );
  EColor col;

  if ( jobHop.getFromEntry().isLaunchingInParallel() ) {
    gc.setLineStyle( ELineStyle.PARALLEL );
  } else {
    gc.setLineStyle( ELineStyle.SOLID );
  }

  EImage arrow;
  if ( is_candidate ) {
    col = EColor.BLUE;
    arrow = EImage.ARROW_CANDIDATE;
  } else if ( jobHop.isEnabled() ) {
    if ( jobHop.isUnconditional() ) {
      col = EColor.HOP_DEFAULT;
      arrow = EImage.ARROW_DEFAULT;
    } else {
      if ( jobHop.getEvaluation() ) {
        col = EColor.HOP_OK;
        arrow = EImage.ARROW_OK;
      } else {
        col = EColor.RED;
        arrow = EImage.ARROW_ERROR;
        gc.setLineStyle( ELineStyle.DASH );
      }
    }
  } else {
    col = EColor.GRAY;
    arrow = EImage.ARROW_DISABLED;
  }

  gc.setForeground( col );

  if ( jobHop.isSplit() ) {
    gc.setLineWidth( linewidth + 2 );
  }
  drawArrow( arrow, line, jobHop );
  if ( jobHop.isSplit() ) {
    gc.setLineWidth( linewidth );
  }

  gc.setForeground( EColor.BLACK );
  gc.setBackground( EColor.BACKGROUND );
  gc.setLineStyle( ELineStyle.SOLID );
}
 
開發者ID:pentaho,項目名稱:pentaho-kettle,代碼行數:53,代碼來源:JobPainter.java

示例6: drawLine

import org.pentaho.di.core.gui.PrimitiveGCInterface.ELineStyle; //導入依賴的package包/類
private void drawLine( StepMeta fs, StepMeta ts, TransHopMeta hi, boolean is_candidate ) {
  int[] line = getLine( fs, ts );

  EColor col;
  ELineStyle linestyle = ELineStyle.SOLID;
  int activeLinewidth = linewidth;

  EImage arrow;
  if ( is_candidate ) {
    col = EColor.BLUE;
    arrow = EImage.ARROW_CANDIDATE;
  } else {
    if ( hi.isEnabled() ) {
      if ( fs.isSendingErrorRowsToStep( ts ) ) {
        col = EColor.RED;
        linestyle = ELineStyle.DASH;
        activeLinewidth = linewidth + 1;
        arrow = EImage.ARROW_ERROR;
      } else {
        col = EColor.HOP_DEFAULT;
        arrow = EImage.ARROW_DEFAULT;
      }
    } else {
      col = EColor.GRAY;
      arrow = EImage.ARROW_DISABLED;
    }
  }
  if ( hi.split ) {
    activeLinewidth = linewidth + 2;
  }

  // Check to see if the source step is an info step for the target step.
  //
  StepIOMetaInterface ioMeta = ts.getStepMetaInterface().getStepIOMeta();
  List<StreamInterface> infoStreams = ioMeta.getInfoStreams();
  if ( !infoStreams.isEmpty() ) {
    // Check this situation, the source step can't run in multiple copies!
    //
    for ( StreamInterface stream : infoStreams ) {
      if ( fs.getName().equalsIgnoreCase( stream.getStepname() ) ) {
        // This is the info step over this hop!
        //
        if ( fs.getCopies() > 1 ) {
          // This is not a desirable situation, it will always end in error.
          // As such, it's better not to give feedback on it.
          // We do this by drawing an error icon over the hop...
          //
          col = EColor.RED;
          arrow = EImage.ARROW_ERROR;
        }
      }
    }
  }

  gc.setForeground( col );
  gc.setLineStyle( linestyle );
  gc.setLineWidth( activeLinewidth );

  drawArrow( arrow, line, hi, fs, ts );

  if ( hi.split ) {
    gc.setLineWidth( linewidth );
  }

  gc.setForeground( EColor.BLACK );
  gc.setBackground( EColor.BACKGROUND );
  gc.setLineStyle( ELineStyle.SOLID );
}
 
開發者ID:pentaho,項目名稱:pentaho-kettle,代碼行數:69,代碼來源:TransPainter.java


注:本文中的org.pentaho.di.core.gui.PrimitiveGCInterface.ELineStyle類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。