Package com.lightcrafts.ui.toolkit

Examples of com.lightcrafts.ui.toolkit.WidePopupComboBox$ComboBoxRenderer


        // Don't initialize the color handling combo here; wait for
        // all the other controls to be initialized first.
    }

    private void addPrinterProfile() {
        printerProfile = new WidePopupComboBox();

        setFixedSize(printerProfile);

        List<ColorProfileInfo> profiles =
            ColorProfileInfo.arrangeForMenu(PrinterProfiles);
View Full Code Here


        super.removeNotify();
        engine.preview(null);
    }

    private void initPrinterProfile() {
        printerProfile = new WidePopupComboBox();
        printerProfile.setFocusable(false);

        final List<ColorProfileInfo> profiles =
            ColorProfileInfo.arrangeForMenu(PrinterProfiles);
        for (ColorProfileInfo profile : profiles) {
View Full Code Here

            }
        );
    }

    private void initRenderingIntent() {
        renderingIntent = new WidePopupComboBox();
        renderingIntent.setFocusable(false);

        RenderingIntent[] intents = RenderingIntent.getAll();
        for (RenderingIntent intent : intents) {
            renderingIntent.addItem(intent);
View Full Code Here

            addPpiControl();
        }
    }

    private void addColorControl() {
        final WidePopupComboBox combo = new WidePopupComboBox();
        List<ColorProfileInfo> profiles =
            ColorProfileInfo.arrangeForMenu(Profiles);
        Set<String> names = new HashSet<String>();
        for (ColorProfileInfo info : profiles) {
            if (info != null) {
                String name = info.getName();
                combo.addItem(name);
                names.add(name);
            }
            else {
                combo.addItem(null);
            }
        }
        // Set the default color profile from the current options:
        ColorProfileOption defaultOption = options.colorProfile;
        String name = defaultOption.getValue();
        if (! names.contains(name)) {
            combo.addItem(name);
        }
        combo.setSelectedItem(name);

        combo.addItemListener(
            new ItemListener() {
                public void itemStateChanged(ItemEvent event) {
                    if (event.getStateChange() == ItemEvent.SELECTED) {
                        String selected = (String) combo.getSelectedItem();
                        options.colorProfile.setValue(selected);
                    }
                }
            }
        );
View Full Code Here

        controls.add(Box.createHorizontalGlue());
        addLabelledControl("Pixels per inch", controls);
    }

    private void addRenderingIntentControl() {
        WidePopupComboBox renderingIntent = new WidePopupComboBox();
        renderingIntent.setFocusable(false);

        RenderingIntent[] intents = RenderingIntent.getAll();
        for (RenderingIntent intent : intents) {
            renderingIntent.addItem(intent);
        }
        int code = options.renderingIntent.getValue();
        boolean bpc = options.blackPointCompensation.getValue();
        RenderingIntent intent = convertIntToRenderingIntent(code, bpc);
        renderingIntent.setSelectedItem(intent);

        renderingIntent.addItemListener(
            new ItemListener() {
                public void itemStateChanged(ItemEvent e) {
                    if (e.getStateChange() == ItemEvent.SELECTED) {
                        WidePopupComboBox combo =
                            (WidePopupComboBox) e.getSource();
                        RenderingIntent intent =
                            (RenderingIntent) combo.getSelectedItem();
                        int code = convertRenderingIntentToInt(intent);
                        boolean bpc = convertRenderingIntentToBPC(intent);
                        options.renderingIntent.setValue(code);
                        options.blackPointCompensation.setValue(bpc);
                    }
View Full Code Here

TOP

Related Classes of com.lightcrafts.ui.toolkit.WidePopupComboBox$ComboBoxRenderer

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.