Examples of Span


Examples of de.sciss.io.Span

    try  {
      start  = Math.max( 0, Math.min( getLength(), ((Number) rom.msg.getArg( argIdx )).longValue() ));
      argIdx++;
      stop  = Math.max( start, Math.min( getLength(), ((Number) rom.msg.getArg( argIdx )).longValue() ));
      editScroll( this, new Span( start, stop ));
    }
    catch( IndexOutOfBoundsException e1 ) {
      OSCRoot.failedArgCount( rom );
    }
    catch( ClassCastException e1 ) {
View Full Code Here

Examples of de.sciss.io.Span

  public void repaintMarkers( Span affectedSpan )
  {
    if( !markVisible || !affectedSpan.touches( timelineVis )) return;
 
    final Span span   = affectedSpan.shift( -timelineVis.start );
    final Rectangle updateRect = new Rectangle(
      (int) (span.start * vpScale), 0,
      (int) (span.getLength() * vpScale) + 2, wavePanel.getHeight() ).
        intersection( new Rectangle( 0, 0, wavePanel.getWidth(), wavePanel.getHeight() ));
    if( !updateRect.isEmpty() ) {
      // update markAxis in any case, even if it's invisible
      // coz otherwise the flag stakes are not updated!
      wavePanel.update( markAxis );
View Full Code Here

Examples of de.sciss.io.Span

      perform();
    }
   
    private void perform()
    {
      Span      selSpan;
      CompoundEdit  edit;
      long      pos;
   
      selSpan    = getSelectionSpan();
      if( selSpan.isEmpty() ) return;
     
      edit  = new BasicCompoundEdit();
      if( deselect ) edit.addEdit( TimelineVisualEdit.select( this, doc, new Span() ).perform() );
      pos    = (long) (selSpan.getStart() + selSpan.getLength() * weight + 0.5);
      edit.addEdit( TimelineVisualEdit.position( this, doc, pos ).perform() );
      edit.end();
      doc.getUndoManager().addEdit( edit );
    }
View Full Code Here

Examples of de.sciss.io.Span

  {
    protected ActionPlaySelection() { /* empty */ }

    public void actionPerformed( ActionEvent e )
    {
      final Span span;
   
      if( transport.isRunning() ) {
        transport.stop();
      }
      span = doc.timeline.getSelectionSpan();
      if( !span.isEmpty() ) {
        transport.playSpan( span, 1.0 );
      } else {
        transport.play( 1.0 );
      }
    }
View Full Code Here

Examples of de.sciss.io.Span

      }
        }
   
    protected void updateLoop()
    {
      Span span;

//      if( !doc.bird.attemptShared( Session.DOOR_TIME, 250 )) return;
//      try {
        span = doc.timeline.getSelectionSpan();
        transport.setLoop( span.isEmpty() ? null : span );
//      }
//      finally {
//        doc.bird.releaseShared( Session.DOOR_TIME );
//      }
    }
View Full Code Here

Examples of edu.stanford.nlp.ie.machinereading.structure.Span

   */
  private EntityMention fromProto(CoreNLPProtos.Entity proto, CoreMap sentence) {
    EntityMention rtn = new EntityMention(
        proto.hasObjectID() ? proto.getObjectID() : null,
        sentence,
        proto.hasHeadStart() ? new Span(proto.getHeadStart(), proto.getHeadEnd()) : null,
        proto.hasHeadEnd() ? new Span(proto.getExtentStart(), proto.getExtentEnd()) : null,
        proto.hasType() ? proto.getType() : null,
        proto.hasSubtype() ? proto.getSubtype() : null,
        proto.hasMentionType() ? proto.getMentionType() : null );
    if (proto.hasNormalizedName()) { rtn.setNormalizedName(proto.getNormalizedName()); }
    if (proto.hasHeadTokenIndex()) { rtn.setHeadTokenPosition(proto.getHeadTokenIndex()); }
View Full Code Here

Examples of edu.stanford.nlp.trees.Span

   */
  // private AceToken mPhrase;

  public AceCharSeq(String text, int start, int end) {
    mText = text;
    mByteOffset = new Span(start, end);
    mTokenOffset = null;
    // mPhrase = null;
  }
View Full Code Here

Examples of er.chronic.utils.Span

public class SyHandler implements IHandler {

  public Span handle(List<Token> tokens, Options options) {
    int year = tokens.get(0).getTag(ScalarYear.class).getType().intValue();

    Span span;
    try {
      Calendar dayStart = Time.construct(year, 1, 1);
      List<Token> timeTokens = tokens.subList(1, tokens.size());
      span = Handler.dayOrTime(dayStart, timeTokens, options);
      // make the year span last a year rather than a day
      if (!options.isGuess()) {
        Calendar beginCalendar = span.getBeginCalendar();
        span = new Span(beginCalendar, Time.cloneAndAdd(beginCalendar, Calendar.YEAR, 1));
      }
    } catch (IllegalArgumentException e) {
      if (options.isDebug()) {
        e.printStackTrace(System.out);
      }
View Full Code Here

Examples of io.conducive.client.ui.widgets.html.Span

     *
     * @param tooltip
     * @return
     */
    public HTMLElement tooltip(String tooltip) {
        Span outer = new Span();
        outer.getElement().setAttribute("data-tooltip", "");
        outer.getElement().setTitle(tooltip);

        // it's unlikely that this will be the case, since most of the time a tooltip will be configured while building
        if (getElement().hasParentElement()) {
            getElement().getParentElement().replaceChild(outer.getElement(), getElement());
        }
        outer.wrap(this);
        // we have to return outer
        return outer;
    }
View Full Code Here

Examples of joshua.corpus.Span

   * This method determines whether there is a consistent
   * word alignment for the specified source phrase.
   * ccb - debugging
   */
  public boolean hasConsistentAlignment(int startSourceIndex, int endSourceIndex) {
    Span targetSpan = getAlignedTargetSpan(startSourceIndex, endSourceIndex);
    if (targetSpan.start == UNALIGNED) return false;
    // check back to see what sourceSpan the targetSpan
    // aligns back to, so that we can check that it's
    // within bounds
    Span sourceSpan = getAlignedSourceSpan(targetSpan.start, targetSpan.end);
   
    return ! (sourceSpan.start < startSourceIndex
      || sourceSpan.end > endSourceIndex);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.