Package org.apache.pivot.wtk

Examples of org.apache.pivot.wtk.MessageType


        Image flagImage = null;
        String flagMessage = null;

        if (flag != null) {
            TerraTheme theme = (TerraTheme) Theme.getTheme();
            MessageType flagMessageType = flag.getMessageType();
            flagImage = theme.getSmallMessageIcon(flagMessageType);
            flagMessage = flag.getMessage();
        }

        flagImageView.setImage(flagImage);
View Full Code Here


                if (field.isVisible()) {
                    Form.Flag flag = Form.getFlag(field);

                    if (flag != null) {
                        if (showFlagIcons) {
                            MessageType messageType = flag.getMessageType();
                            Image flagIcon = null;

                            switch (messageType) {
                                case ERROR: {
                                    flagIcon = errorIcon;
                                    break;
                                }
                                case WARNING: {
                                    flagIcon = warningIcon;
                                    break;
                                }
                                case QUESTION: {
                                    flagIcon = questionIcon;
                                    break;
                                }
                                case INFO: {
                                    flagIcon = infoIcon;
                                    break;
                                }
                                default: {
                                    flagIcon = infoIcon;
                                    break;
                                }
                            }

                            Label label = labels.get(sectionIndex).get(fieldIndex);
                            int flagIconX = label.getX() - (flagIcon.getWidth() + flagIconOffset);
                            int flagIconY = label.getY() + (label.getHeight() - flagIcon.getHeight()) / 2;

                            graphics.translate(flagIconX, flagIconY);
                            flagIcon.paint(graphics);
                            graphics.translate(-flagIconX, -flagIconY);
                        }

                        if (showFlagHighlight) {
                            MessageType messageType = flag.getMessageType();
                            Color highlightColor = null;

                            switch (messageType) {
                                case ERROR: {
                                    highlightColor = errorHighlightColor;
View Full Code Here

                        if (field.isVisible()) {
                            Form.Flag flag = Form.getFlag(field);

                            if (flag != null) {
                                String message = flag.getMessage();
                                MessageType messageType = flag.getMessageType();
                                Color messageColor = null;
                                Color messageBackgroundColor = null;

                                switch (messageType) {
                                    case ERROR: {
View Full Code Here

                if (field.isVisible()) {
                    Form.Flag flag = Form.getFlag(field);

                    if (flag != null) {
                        if (showFlagIcons) {
                            MessageType messageType = flag.getMessageType();
                            Image flagIcon = null;

                            switch (messageType) {
                                case ERROR: {
                                    flagIcon = errorIcon;
                                    break;
                                }

                                case WARNING: {
                                    flagIcon = warningIcon;
                                    break;
                                }

                                case QUESTION: {
                                    flagIcon = questionIcon;
                                    break;
                                }

                                case INFO: {
                                    flagIcon = infoIcon;
                                    break;
                                }
                            }

                            Label label = labels.get(sectionIndex).get(fieldIndex);
                            int flagIconX = label.getX() - (flagIcon.getWidth() + flagIconOffset);
                            int flagIconY = label.getY() + (label.getHeight() - flagIcon.getHeight()) / 2;

                            graphics.translate(flagIconX, flagIconY);
                            flagIcon.paint(graphics);
                            graphics.translate(-flagIconX, -flagIconY);
                        }

                        if (showFlagHighlight) {
                            MessageType messageType = flag.getMessageType();
                            Color highlightColor = null;

                            switch (messageType) {
                                case ERROR: {
                                    highlightColor = errorHighlightColor;
View Full Code Here

                        if (field.isVisible()) {
                            Form.Flag flag = Form.getFlag(field);

                            if (flag != null) {
                                String message = flag.getMessage();
                                MessageType messageType = flag.getMessageType();
                                Color messageColor = null;
                                Color messageBackgroundColor = null;

                                switch (messageType) {
                                    case ERROR: {
View Full Code Here

                if (field.isVisible()) {
                    Form.Flag flag = Form.getFlag(field);

                    if (flag != null) {
                        if (showFlagIcons) {
                            MessageType messageType = flag.getMessageType();
                            Image flagIcon = null;

                            switch (messageType) {
                                case ERROR: {
                                    flagIcon = errorIcon;
                                    break;
                                }

                                case WARNING: {
                                    flagIcon = warningIcon;
                                    break;
                                }

                                case QUESTION: {
                                    flagIcon = questionIcon;
                                    break;
                                }

                                case INFO: {
                                    flagIcon = infoIcon;
                                    break;
                                }
                            }

                            Label label = labels.get(sectionIndex).get(fieldIndex);
                            int flagIconX = label.getX() - (flagIcon.getWidth() + flagIconOffset);
                            int flagIconY = label.getY() + (label.getHeight() - flagIcon.getHeight()) / 2;

                            graphics.translate(flagIconX, flagIconY);
                            flagIcon.paint(graphics);
                            graphics.translate(-flagIconX, -flagIconY);
                        }

                        if (showFlagHighlight) {
                            MessageType messageType = flag.getMessageType();
                            Color highlightColor = null;

                            switch (messageType) {
                                case ERROR: {
                                    highlightColor = errorHighlightColor;
View Full Code Here

                        if (field.isVisible()) {
                            Form.Flag flag = Form.getFlag(field);

                            if (flag != null) {
                                String message = flag.getMessage();
                                MessageType messageType = flag.getMessageType();
                                Color messageColor = null;
                                Color messageBackgroundColor = null;

                                switch (messageType) {
                                    case ERROR: {
View Full Code Here

                if (field.isVisible()) {
                    Form.Flag flag = Form.getFlag(field);

                    if (flag != null) {
                        if (showFlagIcons) {
                            MessageType messageType = flag.getMessageType();
                            Image flagIcon = null;

                            switch (messageType) {
                                case ERROR: {
                                    flagIcon = errorIcon;
                                    break;
                                }
                                case WARNING: {
                                    flagIcon = warningIcon;
                                    break;
                                }
                                case QUESTION: {
                                    flagIcon = questionIcon;
                                    break;
                                }
                                case INFO: {
                                    flagIcon = infoIcon;
                                    break;
                                }
                                default: {
                                    flagIcon = infoIcon;
                                    break;
                                }
                            }

                            Label label = labels.get(sectionIndex).get(fieldIndex);
                            int flagIconX = label.getX() - (flagIcon.getWidth() + flagIconOffset);
                            int flagIconY = label.getY() + (label.getHeight() - flagIcon.getHeight()) / 2;

                            graphics.translate(flagIconX, flagIconY);
                            flagIcon.paint(graphics);
                            graphics.translate(-flagIconX, -flagIconY);
                        }

                        if (showFlagHighlight) {
                            MessageType messageType = flag.getMessageType();
                            Color highlightColor = null;

                            switch (messageType) {
                                case ERROR: {
                                    highlightColor = errorHighlightColor;
View Full Code Here

                        if (field.isVisible()) {
                            Form.Flag flag = Form.getFlag(field);

                            if (flag != null) {
                                String message = flag.getMessage();
                                MessageType messageType = flag.getMessageType();
                                Color messageColor = null;
                                Color messageBackgroundColor = null;

                                switch (messageType) {
                                    case ERROR: {
View Full Code Here

                if (field.isVisible()) {
                    Form.Flag flag = Form.getFlag(field);

                    if (flag != null) {
                        if (showFlagIcons) {
                            MessageType messageType = flag.getMessageType();
                            Image flagIcon = null;

                            switch (messageType) {
                                case ERROR: {
                                    flagIcon = errorIcon;
                                    break;
                                }

                                case WARNING: {
                                    flagIcon = warningIcon;
                                    break;
                                }

                                case QUESTION: {
                                    flagIcon = questionIcon;
                                    break;
                                }

                                case INFO: {
                                    flagIcon = infoIcon;
                                    break;
                                }
                            }

                            Label label = labels.get(sectionIndex).get(fieldIndex);
                            int flagIconX = label.getX() - (flagIcon.getWidth() + flagIconOffset);
                            int flagIconY = label.getY() + (label.getHeight() - flagIcon.getHeight()) / 2;

                            graphics.translate(flagIconX, flagIconY);
                            flagIcon.paint(graphics);
                            graphics.translate(-flagIconX, -flagIconY);
                        }

                        if (showFlagHighlight) {
                            MessageType messageType = flag.getMessageType();
                            Color highlightColor = null;

                            switch (messageType) {
                                case ERROR: {
                                    highlightColor = errorHighlightColor;
View Full Code Here

TOP

Related Classes of org.apache.pivot.wtk.MessageType

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.