@Override protected void drawArrow( EImage arrow, int x1, int y1, int x2, int y2, double theta, int size, double factor, JobHopMeta jobHop, Object startObject, Object endObject ) { int mx, my; int a, b, dist; double angle; // gc.setLineWidth(1); // WuLine(gc, black, x1, y1, x2, y2); gc.drawLine( x1, y1, x2, y2 ); // What's the distance between the 2 points? a = Math.abs( x2 - x1 ); b = Math.abs( y2 - y1 ); dist = (int) Math.sqrt( a * a + b * b ); // determine factor (position of arrow to left side or right side // 0-->100%) if ( factor < 0 ) { if ( dist >= 2 * iconsize ) { factor = 1.3; } else { factor = 1.2; } } // in between 2 points mx = (int) ( x1 + factor * ( x2 - x1 ) / 2 ); my = (int) ( y1 + factor * ( y2 - y1 ) / 2 );
gc.setLineWidth( linewidth + 2 ); drawArrow( arrow, line, jobHop ); if ( jobHop.isSplit() ) { gc.setLineWidth( linewidth );
drawArrow( arrow, start.x, start.y, end.x, end.y, theta, calcArrowLength(), 1.2, null, startHopEntry, endHopEntry == null ? endHopLocation : endHopEntry ); } else if ( endHopEntry != null && endHopLocation != null ) { drawArrow( arrow, start.x, start.y, end.x, end.y + iconsize / 2, theta, calcArrowLength(), 1.2, null, startHopEntry == null ? endHopLocation : startHopEntry, endHopEntry );