org.cybergarage.upnp.Action.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(83)

本文整理了Java中org.cybergarage.upnp.Action.<init>()方法的一些代码示例,展示了Action.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Action.<init>()方法的具体详情如下:
包路径:org.cybergarage.upnp.Action
类名称:Action
方法名:<init>

Action.<init>介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

public class MyParser implements Parser {
 private static Action DO_NOTHING = new Action() {
  public void doSomething() { /* do nothing */ }
 };

 public Action findAction(String userInput) {
  // ...
  if ( /* we can't find any actions */ ) {
   return DO_NOTHING;
  }
 }
}

代码示例来源:origin: stackoverflow.com

public Action findAction(final String userInput) {
  /* Code to return requested Action if found */
  return new Action() {
    public void doSomething() {
      userConsole.err("Action not found: " + userInput);
    }
  }
}

代码示例来源:origin: stackoverflow.com

Action completeAction = new Action(){
  public boolean act( float delta ) {
    // Do your stuff
    return true;
  }
};

Action actions = sequence(fadeIn(1f), fadeOut(1f), completeAction);

代码示例来源:origin: stackoverflow.com

public Action(int i, int o, int p){
  //why do you do this?
  a = new Action(i,o,p);
}

代码示例来源:origin: stackoverflow.com

public class A {
  public void method() {
    int i = 0; // note: this is WRONG code

    doStuff(new Action() {
      public void doAction() {
        Console.printf(i);   // or whatever
      }
    });

    i = 4; // A
    // B
    i = 5; // C
  }
}

代码示例来源:origin: i2p/i2p.i2p

public Action getAction()
{
  return new Action(getServiceNode(), getActionNode());
}

代码示例来源:origin: stackoverflow.com

public static void main(String[] args){
  Action buttonListener = new Action() {
     public void actionPerformed(ActionEvent e) {
        //Perform function f    
     }
  };
  button.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
    .put(KeyStroke.getKeyStroke("ENTER"), "test");
  button.getActionMap().put("test", buttonListener);
  button.addActionListener(buttonListener);
}

代码示例来源:origin: stackoverflow.com

toggleBotton = new Action(Messages.toolTipMessage, IAction.AS_CHECK_BOX) {
   @Override
   public void run() {
   }
 };
 toggleBotton.setImageDescriptor(...);
 toggleBotton.setEnabled(...);
 getManagedForm().getForm().getToolBarManager().add(toggleBotton);

代码示例来源:origin: i2p/i2p.i2p

public ActionList getActionList()
{
  ActionList actionList = new ActionList();
  Node scdpNode = getSCPDNode();
  if (scdpNode == null)
    return actionList;
  Node actionListNode = scdpNode.getNode(ActionList.ELEM_NAME);
  if (actionListNode == null)
    return actionList;
  int nNode = actionListNode.getNNodes();
  for (int n=0; n<nNode; n++) {
    Node node = actionListNode.getNode(n);
    if (Action.isActionNode(node) == false)
      continue;
    Action action = new Action(serviceNode, node);
    actionList.add(action);
  } 
  return actionList;
}

代码示例来源:origin: stackoverflow.com

dropDownMenu.add(new Action("Action1") {
@Override
public void run() {
  //do something
}});
dropDownMenu.add(new Action("Action2") {
@Override
public void run() {
  //do something
}});

代码示例来源:origin: stackoverflow.com

@Override
public Action[] getActions(Object target, Object sender) {
  return new Action[] { new Action("+New...")};
}

代码示例来源:origin: stackoverflow.com

f(int index){
  List<Action> list = actionList.get(index);
  if (list == null) {
    list = new ArrayList<Action>();
    actionList.set(index, list);
  }
  // Note: no need to use index at all here... potentially
  list.add(new Action());
}

代码示例来源:origin: stackoverflow.com

PoseAction ps = new PoseAction(pose1, new Action() {
   public void fire(Pose pose) {
     action1(pose);
   }
};
ps.methodDesirable();

代码示例来源:origin: stackoverflow.com

@RequestMapping("/listActions")
public @ResponseBody List<Action> list(HttpServletRequest request, HttpServletResponse response) {
  response.addHeader("Access-Control-Allow-Origin", "*");
  response.addHeader("Access-Control-Allow-Methods", "GET,PUT,POST,DELETE");
  response.addHeader("Access-Control-Allow-Headers", "Content-Type");

  List<Action> actions =  new ArrayList<Action>();
  actions.add(new Action(1, "Do something fantastic"));
  actions.add(new Action(2, "Save the world"));
  actions.add(new Action(3, "Buy beer"));
  actions.add(new Action(4, "Butcher a hog"));
  return actions;
}

代码示例来源:origin: stackoverflow.com

AsyncTask task = new AsyncTask(this, new Action() {
    public Object run() throws Exception {
      return WebService.autenticate(login, pass);
    }
    public void onFinnish(Object result) {
//result was returned in run method
      verifyLogin((String) result);
    }
    public void onError(Exception e) {
      //error
    }
  });

代码示例来源:origin: stackoverflow.com

Action a = new Action();
render(){
  if (a.getTime >= a.getDuration())
   Gdx.app.log("a", "is done");
}

代码示例来源:origin: stackoverflow.com

public void execute(final Person p){
  //modify state of p in some way
  blockingQueue.put(new Action() {
    final String executionName = p.toString();
    public void doAction(){
      logger.info("Execution started: " + executionName);
      //do some other job
  });
}

代码示例来源:origin: stackoverflow.com

Action myAction = new Action("", imageDesc) {
  @Override
  public void run() {
    // Perform action
  }
};

IToolBarManager toolBarManager = actionBars.getToolBarManager();
toolBarManager.add(myAction);

代码示例来源:origin: stackoverflow.com

Action add = new Action("Add Values") {
  @Override
  public void run() {
    Bike bike = new Bike();
     bike.setName("BMW");
    tableViewer.refresh();

    tableViewer.setSelection(new StructuredSelection(bike));
  }
};

代码示例来源:origin: stackoverflow.com

IMenuManager rootMenu = getViewSite().getActionBars().getMenuManager();
MenuManager menu = new MenuManager("Menu &2", "2");
menu.add(new Action("Action1") {
  @Override
  public void run() {
    //do something
  }});
menu.add(new Action("Action2") {
  @Override
  public void run() {
    //do something
  }});
rootMenu.add(menu);

相关文章