Tabnine Logo
ActionFireable
Code IndexAdd Tabnine to your IDE (free)

How to use
ActionFireable
in
jsettlers.graphics.action

Best Java code snippets using jsettlers.graphics.action.ActionFireable (Showing top 8 results out of 315)

origin: jsettlers/settlers-remake

@Override
public void finished(GOEvent event) {
  if (action != null) {
    this.connector.fireAction(this.action);
  }
}
origin: jsettlers/settlers-remake

  @Override
  public void contentHiding(ActionFireable actionFireable, AbstractContentProvider nextContent) {
    uiContentUpdater.stop();
    if (activeBuilding != null) {
      actionFireable.fireAction(new ShowConstructionMarksAction(null));
    }
  }
}
origin: jsettlers/settlers-remake

@Override
public void finished(GOEvent event) {
  eventDataChanged(event);
  firerer.fireAction(new EndDrawingAction(last));
}
origin: jsettlers/settlers-remake

public GOEventHandlerImplementation(UIPoint lastpoint) {
  last = toMapPosition(lastpoint);
  firerer.fireAction(new StartDrawingAction(last));
  starty = lastpoint.getY();
}
origin: jsettlers/settlers-remake

@Override
public void contentHiding(ActionFireable actionFireable, AbstractContentProvider nextContent) {
  if (!nextContent.isForSelection()) {
    // TODO: Replace with a deselect-all-action
    actionFireable.fireAction(new Action(EActionType.DESELECT));
  }
  super.contentHiding(actionFireable, nextContent);
}
origin: jsettlers/settlers-remake

  @Override
  public void eventDataChanged(GOEvent event) {
    UIPoint pos = ((GODrawEvent) event).getDrawPosition();
    ShortPoint2D cur = toMapPosition(pos);
    firerer.fireAction(new DrawLineAction(last, cur, pos.getY() - starty));
    last = cur;
  }
}
origin: jsettlers/settlers-remake

/**
 * Forward a single action
 * 
 * @throws InterruptedException
 */
protected void forwardSingleAction() throws InterruptedException {
  IAction action = toFire.take();
  if (action instanceof DrawLineAction && toFire.peek() instanceof DrawLineAction) {
    ShortPoint2D start = ((DrawLineAction) action).getStart();
    ShortPoint2D end = ((DrawLineAction) action).getEnd();
    double uidy = ((DrawLineAction) action).getUidy();
    while (toFire.peek() instanceof DrawLineAction) {
      DrawLineAction next = (DrawLineAction) toFire.poll();
      end = next.getEnd();
      uidy += next.getUidy();
    }
    action = new DrawLineAction(start, end, uidy);
  }
  fireTo.fireAction(action);
}
origin: jsettlers/settlers-remake

  @Override
  public void run() {
    FireringAction action;
    while (!stopped) {
      try {
        synchronized (toFireMutex) {
          while (toFire.isEmpty() && !stopped) {
            toFireMutex.wait();
          }
          if (stopped) {
            break;
          }
          action = toFire.poll();
        }
        startWatchdog(action.startTime);
        fireTo.fireAction(action.action);
        stopWatchdog();
      } catch (Throwable e) {
        System.err.println("Exception while handling action:");
        e.printStackTrace();
        if (blockingListener != null) {
          blockingListener.actionThreadCaughtException(e);
        }
      }
      if (toFire.isEmpty()) {
        disableWatchdog();
      }
    }
  }
}
jsettlers.graphics.actionActionFireable

Javadoc

This interface provides a method that allows you to fire an action on the object that implements the listener.

Most used methods

  • fireAction
    Fires the given action.

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • getSystemService (Context)
  • getExternalFilesDir (Context)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JComboBox (javax.swing)
  • Github Copilot alternatives
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