Package com.l2client.gui.dialogs

Examples of com.l2client.gui.dialogs.ShortCutPanel


 
  //TODO save and store slot actions
  public ShortCutPanel displayShortCutPanel(){
    final JDesktopPane desktopPane = jmeDesktop.getJDesktop();
    final JInternalFrame internalFrame = new TransparentInternalFrame();
    final ShortCutPanel pan = new ShortCutPanel();

    ActionButton[] arr = new ActionButton[10];
    arr[0]=new DnDSlotAction(jmeDesktop, ActionManager.getInstance().getAction(2));
    arr[1]=new DnDSlotAction(jmeDesktop, ActionManager.getInstance().getAction(10002));
    arr[2]=new DnDSlotAction(jmeDesktop, ActionManager.getInstance().getAction(5));
    for(int i=3;i<10;i++){
      arr[i]=new DnDSlotAction(jmeDesktop, null);
    }
   
    pan.setSlots(arr);
    pan.validate();
   
    internalFrame.add(pan);
    internalFrame.setVisible(true);
    internalFrame.pack();
    internalFrame.setLocation(desktopPane.getWidth()-internalFrame.getWidth(),desktopPane.getHeight()-internalFrame.getHeight());
View Full Code Here


   * @return      the final panel
   */
  public ShortCutPanel displayShortCutPanel(HashMap<Integer, BaseUsable> map){
    final JDesktopPane desktopPane = jmeDesktop.getJDesktop();
    final JInternalFrame internalFrame = new TransparentInternalFrame();
    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);
    }
   
    pan.setSlots(arr);
    pan.validate();
   
    internalFrame.add(pan);
    internalFrame.setVisible(true);
    internalFrame.pack();
    internalFrame.setLocation(desktopPane.getWidth()-internalFrame.getWidth(),desktopPane.getHeight()-internalFrame.getHeight());
View Full Code Here

TOP

Related Classes of com.l2client.gui.dialogs.ShortCutPanel

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.