Package com.l2client.gui.transparent

Examples of com.l2client.gui.transparent.TransparentInternalFrame


  public AdminTeleportJPanel displayAdminTelePanel(){

    final JDesktopPane desktopPane = jmeDesktop.getJDesktop();
    desktopPane.removeAll();

    final JInternalFrame internalFrame = new TransparentInternalFrame();

    //internalFrame.setLocation(desktopPane.getWidth()/2-100, desktopPane.getHeight()/2-90);
    final AdminTeleportJPanel pan = new AdminTeleportJPanel();
    pan.validate();
   
    internalFrame.add(pan);
    internalFrame.setSize(new java.awt.Dimension(240, 110));
    internalFrame.setVisible(true);
    internalFrame.pack();
    internalFrame.setLocation(0,0);

    desktopPane.add(internalFrame);

    wireInputSwitch(new ArrayList<BaseUsable>()/*must pass empty otherwise not overriden*/, pan);
   
View Full Code Here


  public RevivePanel displayReviveJPanel(int options, String itemtext){

    final JDesktopPane desktopPane = jmeDesktop.getJDesktop();
    desktopPane.removeAll();

    final JInternalFrame internalFrame = new TransparentInternalFrame();

    internalFrame.setLocation(desktopPane.getWidth()/2-100, desktopPane.getHeight()/2-90);
    final RevivePanel pan = new RevivePanel();
    pan.setButtonOptions(options, itemtext);
    internalFrame.add(pan, 0);
    jmeDesktop.setModalComponent(internalFrame);
    internalFrame.setVisible(true);
    internalFrame.setSize(new java.awt.Dimension(200, 180));
    internalFrame.pack();

    desktopPane.add(internalFrame);
   
    wireInputSwitch(new ArrayList<BaseUsable>()/*must pass empty otherwise not overriden*/, pan);
   
     // standard swing action:
    pan.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        // this gets executed in swing thread
        // alter swing components only in swing thread!
        jmeDesktop.setModalComponent(null);   
        internalFrame.setVisible(false);
        desktopPane.remove(internalFrame);
        Singleton.get().getClientFacade().sendGamePacket(new RequestRestartPoint(e.getID()));
      }
    });
   
View Full Code Here

  public ChatPanel displayChatJPanel(){

    final JDesktopPane desktopPane = jmeDesktop.getJDesktop();
//    desktopPane.removeAll();

    final JInternalFrame internalFrame = new TransparentInternalFrame();   
    final ChatPanel pan = new ChatPanel();
    pan.validate();
    internalFrame.add(pan);
    internalFrame.setVisible(true);
    internalFrame.setSize(new java.awt.Dimension(320, 250));
    internalFrame.pack();
    internalFrame.setLocation(0,desktopPane.getHeight()-internalFrame.getHeight());
    desktopPane.add(internalFrame);
   
    // minimize on mouse out maximize on mouse in
    MinMaxListener mima = new MinMaxListener(internalFrame, "Chatwindow", pan, desktopPane);
    pan.addMouseListener(mima);
View Full Code Here

  }
 
  //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());

    desktopPane.add(internalFrame);
   
    ArrayList<BaseUsable> acts = new ArrayList<BaseUsable>();
    acts.add(ActionManager.getInstance().getAction(2));
View Full Code Here

   * @param map  Actions to be placed in the slots, can be null for empty slots
   * @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());

    desktopPane.add(internalFrame);
   
    wireInputSwitch(used, pan);
   
View Full Code Here

    return pan;
  }
 
  public SkillAndActionsJPanel displaySkillAndActionsPanel(final HashMap<Integer, BaseUsable> map){
    final JDesktopPane desktopPane = jmeDesktop.getJDesktop();
    final JInternalFrame internalFrame = new TransparentInternalFrame();
    final SkillAndActionsJPanel pan = new SkillAndActionsJPanel();

    pan.validate();
    pan.addUsable(map.values().toArray(new BaseUsable[0]), jmeDesktop);
    internalFrame.add(pan);
    internalFrame.setVisible(true);
    internalFrame.pack();
    internalFrame.setLocation(desktopPane.getWidth()
        - internalFrame.getWidth(), 20);

    ArrayList<BaseUsable> acts = new ArrayList<BaseUsable>();
    acts.add(new SkillAndActionsPanelToggel(-10, "SkillAndActionsPanelToggel") {
      @Override
      public void onAction(String name, boolean isPressed, float tpf) {
        //only on release
        if (!isPressed) {
        if (internalFrame.isVisible()) {
          internalFrame.setVisible(false);
          desktopPane.remove(internalFrame);
          desktopPane.repaint();
          desktopPane.revalidate();
        } else {
          internalFrame.setVisible(true);
          desktopPane.add(internalFrame);
          desktopPane.repaint();
          desktopPane.revalidate();
        }
        }
      }
    });
    Singleton.get().getInputController().addInput(acts);

    wireInputSwitch(acts, pan);
    MoveByBackgroundListener mover = new MoveByBackgroundListener(pan, internalFrame);
    pan.addMouseListener(mover);
    pan.addMouseMotionListener(mover);
   
    internalFrame.setVisible(false);

    return pan;
  }
View Full Code Here

  }
 
 
  public SkillAndActionsJPanel displaySkillAndActionsPanel(){
    final JDesktopPane desktopPane = jmeDesktop.getJDesktop();
    final JInternalFrame internalFrame = new TransparentInternalFrame();
    final SkillAndActionsJPanel pan = new SkillAndActionsJPanel();

    pan.validate();
    pan.addUsable(ActionManager.getInstance().getActions(), jmeDesktop);
    internalFrame.add(pan);
    internalFrame.setVisible(true);
    internalFrame.pack();
    internalFrame.setLocation(desktopPane.getWidth()
        - internalFrame.getWidth(), 20);

    ArrayList<BaseUsable> acts = new ArrayList<BaseUsable>();
    acts.add(new SkillAndActionsPanelToggel(-10, "SkillAndActionsPanelToggel") {
      @Override
      public void onAction(String name, boolean isPressed, float tpf) {
        //only on release
        if (!isPressed) {
        if (internalFrame.isVisible()) {
          internalFrame.setVisible(false);
          desktopPane.remove(internalFrame);
          desktopPane.repaint();
          desktopPane.revalidate();
        } else {
          internalFrame.setVisible(true);
          desktopPane.add(internalFrame);
          desktopPane.repaint();
          desktopPane.revalidate();
        }
        }
      }
    });
    Singleton.get().getInputController().addInput(acts);

    wireInputSwitch(acts, pan);
    MoveByBackgroundListener mover = new MoveByBackgroundListener(pan, internalFrame);
    pan.addMouseListener(mover);
    pan.addMouseMotionListener(mover);
   
    internalFrame.setVisible(false);

    return pan;
  }
View Full Code Here

  public GameServerJPanel displayServerSelectionJPanel(final GameServerInfo[] serverInfos){

    final JDesktopPane desktopPane = jmeDesktop.getJDesktop();
    desktopPane.removeAll();

    final JInternalFrame internalFrame = new TransparentInternalFrame();

    internalFrame.setLocation(desktopPane.getWidth()/2-200, desktopPane.getHeight()/2-150);
    final GameServerJPanel pan = new GameServerJPanel(serverInfos);
    internalFrame.add(pan);
   
    internalFrame.setVisible(true);
    internalFrame.setSize(new java.awt.Dimension(400, 300));
    internalFrame.pack();

    desktopPane.add(internalFrame);
   
    wireInputSwitch(new ArrayList<BaseUsable>()/*must pass empty otherwise not overriden*/, pan);
   
     // standard swing action:
    pan.addCancelActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        // this gets executed in swing thread
        // alter swing components only in swing thread!
        internalFrame.setVisible(false);
        desktopPane.remove(internalFrame);
      }
    });
    pan.addSelectActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        // this gets executed in swing thread
        // alter swing components ony in swing thread!
        internalFrame.setVisible(false);
        desktopPane.remove(internalFrame);
      }
    });

    desktopPane.repaint();
View Full Code Here

TOP

Related Classes of com.l2client.gui.transparent.TransparentInternalFrame

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.