Package com.lightcrafts.ui.browser.view

Examples of com.lightcrafts.ui.browser.view.ImageBrowserActions


    }

    private void addBrowserActions() {
        ComboFrame frame = getComboFrame();
        AbstractImageBrowser browser = frame.getBrowser();
        ImageBrowserActions actions = browser.getActions();

        add(actions.getLeftAction());
        add(actions.getRightAction());
        addRatingMenu();
        addSeparator();
        add(actions.getSelectLatestAction());
        add(actions.getSelectAllAction());
        add(actions.getSelectNoneAction());
        addSeparator();
        add(actions.getEditAction());
        add(actions.getShowFileInFolderAction());
        add(actions.getRenameAction());
        add(actions.getTrashAction());
        addSeparator();
        add(actions.getCopyAction());
        add(actions.getPasteAction());
        addTemplatesMenu();
        addSeparator();
        add(new BrowserExportMenuItem(frame));
        add(new BrowserPrintMenuItem(frame));
        addSeparator();
        add(actions.getRefreshAction());
        add(new RescanMenuItem(frame));
        addSeparator();
        add(actions.getShowHideTypesAction());
    }
View Full Code Here


    }

    private void addRatingMenu() {
        ComboFrame frame = getComboFrame();
        AbstractImageBrowser browser = frame.getBrowser();
        ImageBrowserActions actions = browser.getActions();

        JMenu menu = MenuFactory.createMenu("Rate");
        for (Action action : actions.getRatingActions()) {
            JMenuItem item = menu.add(action);
            String name = (String) action.getValue(Action.NAME);
            // On Windogs only the core fonts seem to see stars
            if (Platform.getType() == Platform.Windows) {
                char star = '\u2605';
                if (name.length() > 0 && name.charAt(0) == star)
                    item.setFont(new Font("Serif", Font.PLAIN, 14));
            }
        }
//        menu.addSeparator();
//        for (Action action : actions.getRatingAdvanceActions()) {
//            menu.add(action);
//        }
        menu.addSeparator();
        menu.add(actions.getClearRatingAction());
        // menu.add(actions.getClearRatingAdvanceAction());
        add(menu);
    }
View Full Code Here

    private final static String ToolTip = LOCALE.get("SelectLatestToolTip");

    private final static Icon icon = ButtonFactory.getIconByName("recent");

    public SelectLatestButton(AbstractImageBrowser browser) {
        ImageBrowserActions actions = browser.getActions();
        Action action = actions.getSelectLatestAction();
        setAction(action);
        // String name = (String) action.getValue(Action.NAME);
        // setText(name);
        setToolTipText(ToolTip);
        setIcon(icon);
View Full Code Here

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

    public CopyPasteButtons(AbstractImageBrowser browser) {
        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);

View Full Code Here

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

    public RotateButtons(AbstractImageBrowser browser) {
        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);

View Full Code Here

        ApplicationMode.maybeSetToolTip(this);

        popup = new JPopupMenu();
       
        ImageBrowserActions actions = browser.getActions();
        List<Action> rateActions = actions.getRatingActions();
        for (Action rateAction : rateActions) {
            JMenuItem item = new JMenuItem(rateAction);
            // On Windogs only the core fonts seem to see stars
            if (Platform.getType() == Platform.Windows)
                item.setFont(new Font("Serif", Font.PLAIN, 14));
            item.setAccelerator(null);
            popup.add(item);
        }
        popup.addSeparator();
       
        Action clearAction = actions.getClearRatingAction();
        JMenuItem item = new JMenuItem(clearAction);
        item.setAccelerator(null);
        popup.add(item);
       
        // Show the popup on mouse-pressed, not on action-performed.
View Full Code Here

public class TrashButton extends CoolButton {

    private final static String ToolTip = LOCALE.get("TrashToolTip");

    public TrashButton(AbstractImageBrowser browser) {
        ImageBrowserActions actions = browser.getActions();
        Action action = actions.getTrashAction();
        setAction(action);
        setIcon(ButtonFactory.getIconByName("trash"));
        setText(null);
        setToolTipText(ToolTip);
View Full Code Here

TOP

Related Classes of com.lightcrafts.ui.browser.view.ImageBrowserActions

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.