UseableRing2DView.java :  » Game » Arianne-RPG-0.83 » games » stendhal » client » gui » j2d » entity » Java Open Source

Java Open Source » Game » Arianne RPG 0.83 
Arianne RPG 0.83 » games » stendhal » client » gui » j2d » entity » UseableRing2DView.java
package games.stendhal.client.gui.j2d.entity;

import games.stendhal.client.entity.ActionType;
import games.stendhal.client.gui.styled.cursor.StendhalCursor;
import games.stendhal.client.gui.wt.core.WtWindowManager;

import java.util.List;

public class UseableRing2DView extends Ring2DView {

  /**
   * Build a list of entity specific actions. <strong>NOTE: The first entry
   * should be the default.</strong>
   * 
   * @param list
   *            The list to populate.
   */
  @Override
  protected void buildActions(final List<String> list) {
    list.add(ActionType.USE.getRepresentation());

    super.buildActions(list);
  }

  @Override
  public StendhalCursor getCursor() {
    boolean doubleClick = Boolean.parseBoolean(WtWindowManager.getInstance().getProperty("ui.doubleclick", "false"));
    if (doubleClick) {
      return StendhalCursor.ACTIVITY;
    } else {
      return StendhalCursor.ITEM_USE; 
    }
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.