Package com.l2client.gui.actions

Examples of com.l2client.gui.actions.BaseUsable


  public static BaseUsable[] buildActions(ResultSet rs) {
    ArrayList<BaseUsable> ret = new ArrayList<BaseUsable>();
    try {
      while (rs.next()) {

        BaseUsable b = getUsable(rs.getInt("ID"), rs
            .getString("CLIENTACTION"), rs.getString("NAME"));
        if (b != null) {
          b.setCategory(rs.getString("CATEGORY"));
          b.setType(rs.getString("TYPE"));
          b.setDescription(rs.getString("DESCRIPTION"));
          b.setImage(rs.getString("IMAGE"));
          b.setActionID(rs.getInt("ACTIONID"));
          b.setDisplayOrder(rs.getInt("DISPLAYORDER"));

          ret.add(b);
        }
      }
    } catch (Exception e) {
View Full Code Here


    ArrayList<BaseUsable> ret = new ArrayList<BaseUsable>();
    try {
      String[] line = rs.readNext();
      while (line != null) {
        if (line.length == 9) {
          BaseUsable b = getUsable(Integer.valueOf(line[1]), line[8],
              line[2]);
          if (b != null) {
            b.setCategory(line[0]);
            b.setType(line[5]);
            b.setDescription(line[4]);
            b.setImage(line[3]);
            b.setActionID(Integer.valueOf(line[6]));
            b.setDisplayOrder(Integer.valueOf(line[7]));

            ret.add(b);
          }
        } else
          logger.warning("Only "+line.length+" items of 9:"+line);
View Full Code Here

  // TODO currently no differentiation of type
  private static BaseUsable getUsable( int id,
      String clientAction, String name) {

    BaseUsable b = null;
    if (clientAction != null && name != null) {
      switch (ActionTypes.valueOf(clientAction)) {
      case AttackAction:
        b = new AttackAction(id, name);
        break;
View Full Code Here

   */
  @Override
  public void drop(JMEDropTargetEvent e) {
    TransferableAction t = (TransferableAction) e.getTransferable();

    BaseUsable usable=null;
    try {
      int id =  (Integer) t.getTransferData(TransferableAction.TRANSFER_FLAVOR);
      usable = ActionManager.getInstance().getAction(id);
    } catch (Exception e1) {       
      e1.printStackTrace();
View Full Code Here

    final ShortCutPanel pan = new ShortCutPanel();

    ActionButton[] arr = new ActionButton[10];
    ArrayList<BaseUsable> used = new ArrayList<BaseUsable>();
    for(int i=0;i<arr.length;i++){
      BaseUsable b = map.get(i);
      arr[i]=new DnDSlotAction(jmeDesktop, b/*yes, can be null (empty slot)*/);
      if(b != null)//these one not null only used ones
        used.add(b);
    }
   
View Full Code Here

TOP

Related Classes of com.l2client.gui.actions.BaseUsable

Copyright © 2018 www.massapicom. 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.