Package mage.client.components

Examples of mage.client.components.HoverButton


        repaint();
    }

    private HoverButton getJButtonOK() {
        if (jButtonOK == null) {
            jButtonOK = new HoverButton("", ImageManagerImpl.getInstance().getDlgAcceptButtonImage(),
                    ImageManagerImpl.getInstance().getDlgActiveAcceptButtonImage(),
                    ImageManagerImpl.getInstance().getDlgAcceptButtonImage(),
                    new Rectangle(60, 60));
            int w = getDlgParams().rect.width - 75;
            int h = getDlgParams().rect.height - 90;
View Full Code Here


        return jButtonOK;
    }

    private HoverButton getJButtonPrevPage() {
        if (jButtonPrevPage == null) {
            jButtonPrevPage = new HoverButton("", ImageManagerImpl.getInstance().getDlgPrevButtonImage(),
                    ImageManagerImpl.getInstance().getDlgActivePrevButtonImage(),
                    ImageManagerImpl.getInstance().getDlgPrevButtonImage(),
                    new Rectangle(60, 60));
            int w = getDlgParams().rect.width - 75;
            int h = getDlgParams().rect.height - 90;
View Full Code Here

     *
     * @return javax.swing.JButton
     */
    private HoverButton getJButtonNextPage() {
        if (jButtonNextPage == null) {
            jButtonNextPage = new HoverButton("", ImageManagerImpl.getInstance().getDlgNextButtonImage(),
                    ImageManagerImpl.getInstance().getDlgActiveNextButtonImage(),
                    ImageManagerImpl.getInstance().getDlgNextButtonImage(),
                    new Rectangle(60, 60));
            int w = getDlgParams().rect.width - 75;
            int h = getDlgParams().rect.height - 90;
View Full Code Here

     *
     * @return javax.swing.JButton
     */
    private HoverButton getJButtonCancel() {
        if (jButtonCancel == null) {
            jButtonCancel = new HoverButton("", ImageManagerImpl.getInstance().getDlgCancelButtonImage(),
                    ImageManagerImpl.getInstance().getDlgActiveCancelButtonImage(),
                    ImageManagerImpl.getInstance().getDlgCancelButtonImage(),
                    new Rectangle(60, 60));
            int w = getDlgParams().rect.width - 75;
            int h = getDlgParams().rect.height - 90;
View Full Code Here

        }
    }

    private HoverButton getJButtonAccept() {
        if (jButtonAccept == null) {
            jButtonAccept = new HoverButton("", ImageManagerImpl.getInstance().getDlgAcceptButtonImage(),
                    ImageManagerImpl.getInstance().getDlgActiveAcceptButtonImage(),
                    ImageManagerImpl.getInstance().getDlgAcceptButtonImage(),
                    new Rectangle(60, 60));
            int w = getDlgParams().rect.width - 90;
            int h = getDlgParams().rect.height - 90;
View Full Code Here

        return jButtonAccept;
    }

    private HoverButton getJButtonResponse() {
        if (jButtonResponse == null) {
            jButtonResponse = new HoverButton("", ImageManagerImpl.getInstance().getDlgCancelButtonImage(),
                    ImageManagerImpl.getInstance().getDlgActiveCancelButtonImage(),
                    ImageManagerImpl.getInstance().getDlgCancelButtonImage(),
                    new Rectangle(60, 60));
            int w = getDlgParams().rect.width - 90;
            int h = getDlgParams().rect.height - 90;
View Full Code Here

        jLayeredPane = new JLayeredPane();
        jPanelCenter.add(jLayeredPane, BorderLayout.CENTER);

        Image image = ImageHelper.loadImage(LEFT_PAGE_BUTTON_IMAGE_PATH);
        pageLeft = new HoverButton(null, image, image, image, new Rectangle(64, 64));
        pageLeft.setBounds(0, 0, 64, 64);
        pageLeft.setVisible(false);
        pageLeft.setObserver(new Command() {
            @Override
            public void execute() {
                currentPage--;
                if (currentPage == 0) {
                    pageLeft.setVisible(false);
                }
                pageRight.setVisible(true);
                AudioManager.playPrevPage();
                showCards();
            }
        });

        image = ImageHelper.loadImage(RIGHT_PAGE_BUTTON_IMAGE_PATH);
        pageRight = new HoverButton(null, image, image, image, new Rectangle(64, 64));
        pageRight.setBounds(conf.WIDTH - 2 * LEFT_RIGHT_PAGES_WIDTH - 64, 0, 64, 64);
        pageRight.setVisible(false);
        pageRight.setObserver(new Command() {
            @Override
            public void execute() {
View Full Code Here

        if (this.setsToDisplay.size() > 1) {
            dy = (conf.HEIGHT - 120) / (this.setsToDisplay.size() - 1) + 1;
        }
        int count = 0;
        JPanel currentPanel = jPanelLeft;
        HoverButton currentTab = null;
        for (String set : this.setsToDisplay) {
            HoverButton tab = new HoverButton(null, image, image, image, new Rectangle(39, 120));
            Image setImage = ManaSymbols.getSetSymbolImage(set);
            if (setImage != null) {
                tab.setOverlayImage(setImage);
            } else {
                System.out.println("Couldn't find: " + "/plugins/images/sets/" + set + "-C.jpg");
            }
            tab.setSet(set);
            tab.setBounds(0, y, 39, 120);
            final String _set = set;
            final int _index = count;
            tab.setObserver(new Command() {
                @Override
                public void execute() {
                    if (!currentSet.equals(_set) || currentPage != 0) {
                        AudioManager.playAnotherTab();
                        synchronized (MageBook.this) {
View Full Code Here

        }


        int i = 0;
        for (String name : hoverButtons.keySet()) {
            HoverButton hoverButton = hoverButtons.get(name);
            hoverButton.setAlignmentX(LEFT_ALIGNMENT);
            hoverButton.setBounds(X_PHASE_WIDTH - 36, i*36, 36, 36);
            jPhases.add(hoverButton);
            i++;
        }
        jPhases.addMouseListener(phasesMouseAdapter);

View Full Code Here

        }
        for (MouseListener ml :this.jPhases.getMouseListeners()) {
            this.jPhases.removeMouseListener(ml);
        }
        for (String name : hoverButtons.keySet()) {
            HoverButton hoverButton = hoverButtons.get(name);
            for (MouseListener ml :hoverButton.getMouseListeners()) {
                hoverButton.removeMouseListener(ml);
            }
        }
        for (ActionListener al :this.btnPlay.getActionListeners()) {
            this.btnPlay.removeActionListener(al);
        }
View Full Code Here

TOP

Related Classes of mage.client.components.HoverButton

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.