Beispiel #1
0
 private void init()
 {
     this.setLayout(new BorderLayout());
     ec.setLayout(new BorderLayout());
     ec.setPreferredSize(new Dimension(-1, 13));
     ec.setVisible(false);
     btnAdd.setToolTipText("\u8BF7\u70B9\u51FB\u9009\u62E9\u4E00\u5F20\u56FE\u7247\uFF0C\u751F" +
     		"\u6210\u5C5E\u4E8E\u60A8\u81EA\u5DF1\u98CE\u683C\u7684\u76AE\u80A4\u3002");
     btnAdd.setFocusable(false);
     btnAdd.setImage(KeeperUtil.getImage("skin_add_normal.png", true));
     btnAdd.setRolloverImage(KeeperUtil.getImage("skin_add_rollover.png", true));
     btnAdd.setPressedImage(btnAdd.getRolloverImage());
     btnAdd.setVisible(false);
     btnRemove.setToolTipText("\u5220\u9664");
     btnRemove.setPreferredSize(new Dimension(13, -1));
     btnRemove.setRolloverEnabled(false);
     btnRemove.setFocusable(false);
     btnRemove.setImage(KeeperUtil.getImage("skin_delete.png", true));
     btnRemove.setPressedImage(null);
     ec.add(btnRemove, BorderLayout.EAST);
     this.add(btnAdd, BorderLayout.CENTER);
     this.add(ec, BorderLayout.NORTH);
 }
Beispiel #2
0
        public void actionPerformed(ActionEvent e)
        {
            Object source = e.getSource();
            
            if(source == btnAdd)
            {
                KeeperUtil.switchToSystemLAFTemp(new AbstractAction()
                {
                    private static final long serialVersionUID = 5648508246819086152L;

                    public void actionPerformed(ActionEvent e)
                    {
                        skinMgr.addSkin();
                    }
                });
            }
            else if(source == btnRemove)
            {
                skinMgr.removeSkin(skin, true);
            }
        }