Package org.codinjutsu.tools.jenkins.model

Examples of org.codinjutsu.tools.jenkins.model.View


    @Override
    protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) {

        if (value instanceof View) {
            View view = (View) value;
            append(view.getName(), SimpleTextAttributes.REGULAR_ATTRIBUTES);

            if (value instanceof FavoriteView) {
                setIcon(FAVORITE_ICON);
            }
        }
View Full Code Here


    @Override
    protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) {

        if (value instanceof View) {
            View view = (View) value;
            if (view.hasNestedView()) {
                setEnabled(false);
                setFocusable(false);
                setBackground(Color.LIGHT_GRAY);
                append(view.getName(), SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES);
            } else {
                String viewName = view.getName();
                if (view.isNested()) {
                    append("   " + viewName, SimpleTextAttributes.REGULAR_ATTRIBUTES);
                } else {
                    append(viewName, SimpleTextAttributes.REGULAR_ATTRIBUTES);
                }
            }
View Full Code Here

    }


    @Override
    public void update(AnActionEvent e) {
        View currentSelectedView = browserPanel.getCurrentSelectedView();
        if (currentSelectedView != null) {
            myLabel.setText(currentSelectedView.getName());
        } else {
            myLabel.setText("");
        }
    }
View Full Code Here

            JBPopup popup = new PopupChooserBuilder(viewList)
                    .setMovable(false)
                    .setCancelKeyEnabled(true)
                    .setItemChoosenCallback(new Runnable() {
                        public void run() {
                            final View view = (View) viewList.getSelectedValue();
                            if (view == null || view.hasNestedView()) return;

                            browserPanel.loadView(view);
                        }
                    })
                    .createPopup();
View Full Code Here

        List<View> actualViews = jenkins.getViews();

        List<View> expectedViews = new LinkedList<View>();
        expectedViews.add(View.createView("Framework", "http://myjenkins/view/Framework/"));
        View nestedView = View.createView("NestedView", "http://myjenkins/view/NestedView/");

        nestedView.addSubView(View.createNestedView("FirstSubView", "http://myjenkins/view/NestedView/view/FirstSubView/"));
        nestedView.addSubView(View.createNestedView("SecondSubView", "http://myjenkins/view/NestedView/view/SecondSubView/"));
        expectedViews.add(nestedView);

        expectedViews.add(View.createView("Tous", "http://myjenkins/"));

        assertReflectionEquals(expectedViews, actualViews);
View Full Code Here

TOP

Related Classes of org.codinjutsu.tools.jenkins.model.View

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.