Package net.sourceforge.processdash.ui.lib

Examples of net.sourceforge.processdash.ui.lib.WrappingText


        recalculateEnablement();
    }

    protected void buildMainPanelContents() {
        String chooseFilePrompt = getString("Choose_File");
        add(indentedComponent(2, new WrappingText(chooseFilePrompt)));
        add(verticalSpace(1));
        file = new FileChooser();
        file.getDocument().addDocumentListener(
                (DocumentListener) EventHandler.create(DocumentListener.class,
                        this, "updateInstruction"));
        add(indentedComponent(4, file));

        add(verticalSpace(2));
        String choosePathsPrompt = getString("Choose_Paths");
        add(indentedComponent(2, new WrappingText(choosePathsPrompt)));
        add(verticalSpace(1));
        ProcessDashboard dashboard = ExportManager.getInstance()
                .getProcessDashboard();
        paths = new SelectableHierarchyTree(dashboard.getHierarchy(), instr
                .getPaths());
        paths.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                if (!e.getValueIsAdjusting())
                    updateInstruction();
            }});
        JScrollPane scrollPane = new JScrollPane(paths);
        scrollPane.setPreferredSize(new Dimension(999, 300));
        add(indentedComponent(4, scrollPane));

        if (fromManagePanel == false) {
            add(verticalSpace(2));
            String makeAutomaticPrompt = getString("Make_Automatic");
            add(indentedComponent(2, new WrappingText(makeAutomaticPrompt)));
            makeAutomatic = new ButtonGroup();

            Box autoButtonBox = Box.createHorizontalBox();
            autoButtonBox.add(createAutomaticButton("Yes"));
            autoButtonBox.add(createAutomaticButton("No"));
            add(indentedComponent(4, autoButtonBox));
        }

        add(verticalSpace(4));
        error = new WrappingText("X");
        error.setMinimumSize(error.getPreferredSize());
        error.setText("");
        error.setForeground(Color.red);
        add(error);
    }
View Full Code Here


            add(indentedComponent(2, radioButton));
            add(verticalSpace(1));

            if (description != null) {
                add(indentedComponent(6, new WrappingText(description)));
            }
        }
    }
View Full Code Here

        DocumentListener listener = (DocumentListener) EventHandler.create(
                DocumentListener.class, this, "updateInstruction");

        if (instr.isUrlOnly()) {
            String chooseUrlPrompt = getString("Choose_URL");
            add(indentedComponent(2, new WrappingText(chooseUrlPrompt)));
            add(verticalSpace(1));
            url = new JTextField(instr.getURL());
            url.getDocument().addDocumentListener(listener);
            add(indentedComponent(4, url));

        } else {
            String chooseDirectoryPrompt = getString("Choose_Directory");
            add(indentedComponent(2, new WrappingText(chooseDirectoryPrompt)));
            add(verticalSpace(1));
            directory = new DirectoryChooser();
            directory.getDocument().addDocumentListener(listener);
            add(indentedComponent(4, directory));
        }

        add(verticalSpace(2));
        String choosePrefixPrompt = getString("Choose_Prefix");
        add(indentedComponent(2, new WrappingText(choosePrefixPrompt)));
        add(verticalSpace(1));
        prefix = new JTextField(instr.getPrefix());
        prefix.getDocument().addDocumentListener(listener);
        add(indentedComponent(4, prefix));

        if (fromManagePanel == false) {
            add(verticalSpace(2));
            String makeAutomaticPrompt = getString("Make_Automatic");
            add(indentedComponent(2, new WrappingText(makeAutomaticPrompt)));
            makeAutomatic = new ButtonGroup();

            Box autoButtonBox = Box.createHorizontalBox();
            autoButtonBox.add(createAutomaticButton("Yes"));
            autoButtonBox.add(createAutomaticButton("No"));
            add(indentedComponent(4, autoButtonBox));
        }

        add(verticalSpace(4));
        error = new WrappingText("");
        error.setForeground(Color.red);
        add(error);
    }
View Full Code Here

        add(indentedComponent(0, promptLabel));
        add(verticalSpace(2));

        String header = getOptionalRelativeString("Header");
        if (header != null) {
            add(indentedComponent(2, new WrappingText(header)));
            add(verticalSpace(2));
        }

        buildMainPanelContents();

        add(verticalSpace(2));

        String footer = getOptionalRelativeString("Footer");
        if (footer != null) {
            add(indentedComponent(2, new WrappingText(footer)));
            add(verticalSpace(2));
        }

        add(createButtonBox());
    }
View Full Code Here

            } catch (Throwable e) {
                logger.log(Level.SEVERE,
                    "Unexpected error when displaying EV snippet widget with id '"
                            + id + "'", e);
                WrappingText label = new WrappingText(resources
                        .getString("Widget_Error"));
                label.setFont(label.getFont().deriveFont(Font.ITALIC));
               
                Box b = Box.createVerticalBox();
                b.add(Box.createVerticalGlue());
                b.add(label);
                b.add(Box.createVerticalGlue());
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.ui.lib.WrappingText

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.