Package com.lightcrafts.ui.toolkit

Examples of com.lightcrafts.ui.toolkit.CoolButton


        super(BoxLayout.X_AXIS);

        ImageBrowserActions actions = browser.getActions();

        Action copyAction = actions.getCopyAction();
        JButton copy = new CoolButton(/*CoolButton.ButtonStyle.LEFT*/);
        copy.setAction(copyAction);
        copy.setIcon(ButtonFactory.getIconByName("copy"));
        copy.setToolTipText(CopyToolTip);

        Action pasteAction = actions.getPasteAction();
        JButton paste = new CoolButton(/*CoolButton.ButtonStyle.RIGHT*/);
        paste.setAction(pasteAction);
        paste.setIcon(ButtonFactory.getIconByName("paste"));
        paste.setToolTipText(PasteToolTip);

        add(copy);
        add(paste);

        ApplicationMode.maybeSetToolTip(copy);
View Full Code Here


        BufferedImage image =
            (BufferedImage) action.getValue(OpActions.IconImageKey);
        image = IconFactory.getScaledImage(image, IconFactory.StandardSize - 2);
        Icon icon = new ImageIcon(image);
       
        CoolButton button = new CoolButton(style);
        action.putValue(Action.SMALL_ICON, icon);
        button.setAction(action);
        button.setIcon(icon);

        return button;
    }
View Full Code Here

        super(BoxLayout.X_AXIS);

        ImageBrowserActions actions = browser.getActions();

        Action leftAction = actions.getLeftAction();
        JButton left = new CoolButton(/*CoolButton.ButtonStyle.LEFT*/);
        left.setAction(leftAction);
        left.setIcon(ButtonFactory.getIconByName("rotateLeft"));
        left.setToolTipText(LeftToolTip);

        Action rightAction = actions.getRightAction();
        JButton right = new CoolButton(/*CoolButton.ButtonStyle.RIGHT*/);
        right.setAction(rightAction);
        right.setIcon(ButtonFactory.getIconByName("rotateRight"));
        right.setToolTipText(RightToolTip);

        add(left);
        add(right);
    }
View Full Code Here

//                    }
//                }
//            }
//        );

        JButton asShot = new CoolButton();
        asShot.setText(LOCALE.get("AsShotButtonText"));
        asShot.addActionListener(
            new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    Map<String, Double> sliders = raw.getAsShot();
                    for (String key : sliders.keySet()) {
                        double value = sliders.get(key);
View Full Code Here

    private final static String RightTip = LOCALE.get("RotateRightToolTip");

    RotateButtons(Action leftAction, Action rightAction) {
        super(BoxLayout.X_AXIS);

        final CoolButton leftButton = new CoolButton();
        final CoolButton rightButton = new CoolButton();

        leftButton.setIcon( LeftIcon );
        rightButton.setIcon( RightIcon );

        leftButton.setToolTipText( LeftTip );
        rightButton.setToolTipText( RightTip );

        leftButton.setStyle( CoolButton.ButtonStyle.LEFT );
        rightButton.setStyle( CoolButton.ButtonStyle.RIGHT );

        leftButton.addActionListener( leftAction );
        rightButton.addActionListener( rightAction );

        add( leftButton );
        add( rightButton );
    }
View Full Code Here

    // For the no-Document display mode.
    RotateButtons() {
        super( BoxLayout.X_AXIS );

        final CoolButton leftButton = new CoolButton();
        final CoolButton rightButton = new CoolButton();

        leftButton.setIcon( LeftIcon );
        rightButton.setIcon( RightIcon );

        leftButton.setStyle( CoolButton.ButtonStyle.LEFT );
        rightButton.setStyle( CoolButton.ButtonStyle.RIGHT );

        leftButton.setEnabled( false );
        rightButton.setEnabled( false );

        add( leftButton );
        add( rightButton );
    }
View Full Code Here

            throw new RuntimeException("Couldn't initialize NavigationButtons", e);
        }
    }

    public NavigationPane(final FolderBrowserPane browser) {
        final JButton btnBack = new CoolButton(/*CoolButton.ButtonStyle.LEFT*/);
        final JButton btnForward = new CoolButton(/*CoolButton.ButtonStyle.RIGHT*/);
        final MenuButton btnPath = browser.getPathPopupMenu();

        btnBack.setIcon(ImgBack);
        btnBack.setToolTipText(LOCALE.get("BackToolTip"));
        btnBack.setEnabled(false);

        btnForward.setIcon(ImgFwd);
        btnForward.setToolTipText(LOCALE.get("ForwardToolTip"));
        btnForward.setEnabled(false);

        btnPath.setIcon(imgPath);
        // btnPath.putClientProperty(SubstanceLookAndFeel.FLAT_PROPERTY, Boolean.FALSE);
        btnPath.setToolTipText(LOCALE.get("PathToolTip"));

        btnBack.addActionListener(
            new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    browser.goBack();
                }
            }
        );
        btnForward.addActionListener(
            new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    browser.goForward();
                }
            }
        );
        browser.addSelectionListener(
            new FolderTreeListener() {
                public void folderSelectionChanged(File folder) {
                    btnBack.setEnabled(browser.isBackAvailable());
                    btnForward.setEnabled(browser.isForwardAvailable());
                }
                public void folderDropAccepted(List<File> files, File folder) {
                }
            }
        );
View Full Code Here

        layoutComponents();
        setMaximumSize(new Dimension(1000, btnPath.getHeight() + 4));
    }

    private void createComponents() {
        btnBack = new CoolButton(/*CoolButton.ButtonStyle.LEFT*/);
        btnForward = new CoolButton(/*CoolButton.ButtonStyle.RIGHT*/);
        btnPath = browser.getPathPopupMenu();
    }
View Full Code Here

    }

    static JButton createButtonByName(
        String name, CoolButton.ButtonStyle style
    ) {
        JButton button = new CoolButton(style);
        Icon icon = getIconByName(name);
        if (icon != null) {
            button.setIcon(icon);
        }
        else {
            button.setText(name);
        }
        return button;
    }
View Full Code Here

        }
        return button;
    }

    static JButton createButtonByText(String text) {
        JButton button = new CoolButton(CoolButton.ButtonStyle.NORMAL);
        button.setText(text);
        return button;
    }
View Full Code Here

TOP

Related Classes of com.lightcrafts.ui.toolkit.CoolButton

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.