Package DisplayProject

Examples of DisplayProject.LineBorderWithColour


                TitledBorder titledBorder = (TitledBorder)border;
                Border innerBorder = titledBorder.getBorder();
                String title = titledBorder.getTitle();
                Border newBorder;
                if (innerBorder instanceof LineBorder) {
                    newBorder = new LineBorderWithColour(UIutils.forteToJavaColor(color),((LineBorder)innerBorder).getThickness());
                    c.setBorder(BorderFactory.createTitledBorder(newBorder, title));
                }
            }
            else if (border != null && (border instanceof LineBorder)) {
                c.setBorder(new LineBorderWithColour(UIutils.forteToJavaColor(color),((LineBorder)border).getThickness()));
            }
            else if (border != null) {
                c.setBorder(new LineBorderWithColour(UIutils.forteToJavaColor(color),cDEFAULT_THICKNESS));
            }
        }
    }
View Full Code Here


            case Constants.W_NONE:
                newBorder = null;
                break;
            default:
                // The lineWeightInPixels handles all the values.  CraigM: 28/01/2008.
                newBorder = new LineBorderWithColour(jc.getForeground(), UIutils.getLineWeightInPixels(this.weight));
                break;
            }
            jc.setBorder(newBorder);
        } else if (jc instanceof JLabel || jc instanceof JTextComponent){
            //PM:12/10/07
            /*
             * the borders for JLabels to match forte
             * TF:14/11/07:Extended this for JTextComponents and handled the default case
             * TF:22/11/07:TextGraphics now know how to pad themselves properly, so we no longer
             * need the padding border.
             */
            Border outsideBorder = null;
            Border newBorder = null;
            switch (this.weight){
            case Constants.W_DEFAULT:
                newBorder = BasicBorders.getTextFieldBorder();
                break;
            case Constants.W_NONE:
                newBorder = BorderFactory.createEmptyBorder(TOP_PAD, LEFT_PAD, 0, 0);
                break;
            case Constants.W_HEAVY:
            case Constants.W_MEDIUM:
            case Constants.W_ONEPIXEL:
            case Constants.W_THIN:
            case Constants.W_THREEPIXELS:
            case Constants.W_TWOPIXELS:
            case Constants.W_VERYHEAVY:
            case Constants.W_VERYTHIN:
                outsideBorder = new LineBorderWithColour(jc.getForeground(), UIutils.getLineWeightInPixels(this.weight));
                newBorder = BorderFactory.createCompoundBorder(outsideBorder, new EmptyBorder(TOP_PAD, LEFT_PAD, 0, 0));
                break;
            default:
                newBorder = BorderFactory.createCompoundBorder(BorderFactory.createEtchedBorder(), new EmptyBorder(TOP_PAD, LEFT_PAD, 0, 0));
                break;
View Full Code Here

                break;
            case Constants.W_NONE :       
                form.setBorder(null);
                break;
            case Constants.W_ONEPIXEL :   
                form.setBorder(new LineBorderWithColour(form.getForeground(), 1));
                break;
            case Constants.W_TWOPIXELS :   
                form.setBorder(new LineBorderWithColour(form.getForeground(), 2));
                break;
            case Constants.W_THREEPIXELS :   
                form.setBorder(new LineBorderWithColour(form.getForeground(), 3));
                break;
            case Constants.W_MEDIUM :   
                form.setBorder(new LineBorderWithColour(form.getForeground(), 3));
                break;
            case Constants.W_HEAVY :     
                form.setBorder(new LineBorderWithColour(form.getForeground(), 4));
                break;
            case Constants.W_THIN :   
                form.setBorder(new LineBorderWithColour(form.getForeground(), 2));
                break;
            case Constants.W_VERYTHIN :       
                form.setBorder(new LineBorderWithColour(form.getForeground(), 1));
                break;
            case Constants.W_VERYHEAVY :       
                form.setBorder(new LineBorderWithColour(form.getForeground(), 5));
                break;
            }
        }
    }
View Full Code Here

        if (form!=null){
            if (form.getBorder().equals(BorderFactory.createEtchedBorder()))
                value = Constants.W_DEFAULT ;       
            else if (form.getBorder().equals(null))
                value = Constants.W_NONE ;       
            else if (form.getBorder().equals(new LineBorderWithColour(form.getForeground(), 1)))
                value = Constants.W_ONEPIXEL ;   
            else if (form.getBorder().equals(new LineBorderWithColour(form.getForeground(), 2)))
                value = Constants.W_TWOPIXELS ;   
            else if (form.getBorder().equals(new LineBorderWithColour(form.getForeground(), 3)))
                value = Constants.W_THREEPIXELS ;   
            else if (form.getBorder().equals(new LineBorderWithColour(form.getForeground(), 3)))
                value = Constants.W_MEDIUM ;   
            else if (form.getBorder().equals(new LineBorderWithColour(form.getForeground(), 4)))
                value = Constants.W_HEAVY ;     
            else if (form.getBorder().equals(new LineBorderWithColour(form.getForeground(), 2)))
                value = Constants.W_THIN ;   
            else if (form.getBorder().equals(new LineBorderWithColour(form.getForeground(), 1)))
                value = Constants.W_VERYTHIN ;       
            else if (form.getBorder().equals(new LineBorderWithColour(form.getForeground(), 5)))
                value = Constants.W_VERYHEAVY ;       
        }

        return value;
    }
View Full Code Here

            case Constants.W_NONE:
                newBorder = null;
                break;
            default:
                // The lineWeightInPixels handles all the values.  CraigM: 28/01/2008.
                newBorder = new LineBorderWithColour(jc.getForeground(), UIutils.getLineWeightInPixels(this.weight));
                break;
            }
            jc.setBorder(newBorder);
        } else if (jc instanceof JLabel || jc instanceof JTextComponent){
            //PM:12/10/07
            /*
             * the borders for JLabels to match forte
             * TF:14/11/07:Extended this for JTextComponents and handled the default case
             * TF:22/11/07:TextGraphics now know how to pad themselves properly, so we no longer
             * need the padding border.
             */
            Border outsideBorder = null;
            Border newBorder = null;
            switch (this.weight){
            case Constants.W_DEFAULT:
                newBorder = BasicBorders.getTextFieldBorder();
                break;
            case Constants.W_NONE:
                newBorder = BorderFactory.createEmptyBorder(TOP_PAD, LEFT_PAD, 0, 0);
                break;
            case Constants.W_HEAVY:
            case Constants.W_MEDIUM:
            case Constants.W_ONEPIXEL:
            case Constants.W_THIN:
            case Constants.W_THREEPIXELS:
            case Constants.W_TWOPIXELS:
            case Constants.W_VERYHEAVY:
            case Constants.W_VERYTHIN:
                outsideBorder = new LineBorderWithColour(jc.getForeground(), UIutils.getLineWeightInPixels(this.weight));
                newBorder = BorderFactory.createCompoundBorder(outsideBorder, new EmptyBorder(TOP_PAD, LEFT_PAD, 0, 0));
                break;
            default:
                newBorder = BorderFactory.createCompoundBorder(BorderFactory.createEtchedBorder(), new EmptyBorder(TOP_PAD, LEFT_PAD, 0, 0));
                break;
View Full Code Here

                break;
            case Constants.W_NONE :       
                form.setBorder(null);
                break;
            case Constants.W_ONEPIXEL :   
                form.setBorder(new LineBorderWithColour(form.getForeground(), 1));
                break;
            case Constants.W_TWOPIXELS :   
                form.setBorder(new LineBorderWithColour(form.getForeground(), 2));
                break;
            case Constants.W_THREEPIXELS :   
                form.setBorder(new LineBorderWithColour(form.getForeground(), 3));
                break;
            case Constants.W_MEDIUM :   
                form.setBorder(new LineBorderWithColour(form.getForeground(), 3));
                break;
            case Constants.W_HEAVY :     
                form.setBorder(new LineBorderWithColour(form.getForeground(), 4));
                break;
            case Constants.W_THIN :   
                form.setBorder(new LineBorderWithColour(form.getForeground(), 2));
                break;
            case Constants.W_VERYTHIN :       
                form.setBorder(new LineBorderWithColour(form.getForeground(), 1));
                break;
            case Constants.W_VERYHEAVY :       
                form.setBorder(new LineBorderWithColour(form.getForeground(), 5));
                break;
            }
        }
    }
View Full Code Here

        if (form!=null){
            if (form.getBorder().equals(BorderFactory.createEtchedBorder()))
                value = Constants.W_DEFAULT ;       
            else if (form.getBorder().equals(null))
                value = Constants.W_NONE ;       
            else if (form.getBorder().equals(new LineBorderWithColour(form.getForeground(), 1)))
                value = Constants.W_ONEPIXEL ;   
            else if (form.getBorder().equals(new LineBorderWithColour(form.getForeground(), 2)))
                value = Constants.W_TWOPIXELS ;   
            else if (form.getBorder().equals(new LineBorderWithColour(form.getForeground(), 3)))
                value = Constants.W_THREEPIXELS ;   
            else if (form.getBorder().equals(new LineBorderWithColour(form.getForeground(), 3)))
                value = Constants.W_MEDIUM ;   
            else if (form.getBorder().equals(new LineBorderWithColour(form.getForeground(), 4)))
                value = Constants.W_HEAVY ;     
            else if (form.getBorder().equals(new LineBorderWithColour(form.getForeground(), 2)))
                value = Constants.W_THIN ;   
            else if (form.getBorder().equals(new LineBorderWithColour(form.getForeground(), 1)))
                value = Constants.W_VERYTHIN ;       
            else if (form.getBorder().equals(new LineBorderWithColour(form.getForeground(), 5)))
                value = Constants.W_VERYHEAVY ;       
        }

        return value;
    }
View Full Code Here

                TitledBorder titledBorder = (TitledBorder)border;
                Border innerBorder = titledBorder.getBorder();
                String title = titledBorder.getTitle();
                Border newBorder;
                if (innerBorder instanceof LineBorder) {
                    newBorder = new LineBorderWithColour(UIutils.forteToJavaColor(color),((LineBorder)innerBorder).getThickness());
                    c.setBorder(BorderFactory.createTitledBorder(newBorder, title));
                }
            }
            else if (border != null && (border instanceof LineBorder)) {
                c.setBorder(new LineBorderWithColour(UIutils.forteToJavaColor(color),((LineBorder)border).getThickness()));
            }
            else if (border != null) {
                c.setBorder(new LineBorderWithColour(UIutils.forteToJavaColor(color),cDEFAULT_THICKNESS));
            }
        }
    }
View Full Code Here

TOP

Related Classes of DisplayProject.LineBorderWithColour

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.