Package net.rim.device.api.ui.decor

Examples of net.rim.device.api.ui.decor.Border


        ListStyleButtonSet buttonSet = new ListStyleButtonSet();
       
        ListStyleButtonField link = new ListStyleButtonField( "BlackBerry 6 Style", _caret );
        link.setChangeListener( new FieldChangeListener( ) {
            public void fieldChanged( Field field, int context ) {
                 Border titleBorder   = BorderFactory.createBitmapBorder( new XYEdges( 4, 12, 4, 12 ), Bitmap.getBitmapResource( "fieldset2_title_border.png" ) );
                 Border contentBorder = BorderFactory.createBitmapBorder( new XYEdges( 4, 12, 4, 12 ), Bitmap.getBitmapResource( "fieldset2_body_border.png" ) );
                 pushScreen( new UIExampleFieldSetScreen( titleBorder, contentBorder ) );
            }
        } );
        buttonSet.add( link );
       
        link = new ListStyleButtonField( "Custom 1", _caret );
        link.setChangeListener( new FieldChangeListener( ) {
            public void fieldChanged( Field field, int context ) {
                Border titleBorder   = BorderFactory.createBitmapBorder( new XYEdges( 8, 9, 3, 9 ), Bitmap.getBitmapResource( "fieldset_title_border.png" ) );
                Border contentBorder = BorderFactory.createBitmapBorder( new XYEdges( 6, 9, 10, 9 ), Bitmap.getBitmapResource( "fieldset_body_border.png" ) );
                pushScreen( new UIExampleFieldSetScreen( titleBorder, contentBorder ) );
            }
        } );
        buttonSet.add( link );
View Full Code Here


        Bitmap bitmap; // Reuse this reference

        // Add an ActivityIndicatorView featuring a rounded red border
        bitmap = Bitmap.getBitmapResource("spinner.png");
        final XYEdges edges = new XYEdges(2, 2, 2, 2);
        final Border border =
                BorderFactory.createRoundedBorder(edges, Color.CRIMSON,
                        Border.STYLE_SOLID);
        _views[0] =
                ActivityIndicatorFactory.createActivityIndicator(0, bitmap, 5,
                        0, "with border", Field.FIELD_HCENTER);
View Full Code Here

        // and single solid color background.
        final RichTextField simpleField =
                new RichTextField("Solid rounded border, solid background");

        // Create border and background objects
        final Border roundedBorder =
                BorderFactory.createRoundedBorder(thickPadding,
                        Border.STYLE_SOLID);
        final Background solidBackground =
                BackgroundFactory.createSolidBackground(Color.LIGHTSTEELBLUE);

        // Set the objects for use
        simpleField.setBorder(roundedBorder);
        simpleField.setBackground(solidBackground);

        // Add the field to the screen
        add(simpleField);
        add(new RichTextField(Field.NON_FOCUSABLE));

        // Sample text field with a thick and dotted rounded border
        // and single color transparent background.
        final RichTextField transparentField =
                new RichTextField(
                        "Dotted rounded border, transparent background");
        final Border dottedBorder =
                BorderFactory.createRoundedBorder(thickPadding,
                        Border.STYLE_DOTTED);
        final Background transparentBackground =
                BackgroundFactory.createSolidTransparentBackground(
                        Color.LIGHTSTEELBLUE, 50);
        transparentField.setBorder(dottedBorder);
        transparentField.setBackground(transparentBackground);
        add(transparentField);
        add(new RichTextField(Field.NON_FOCUSABLE));

        // Sample text field with a thick and dashed border
        // and gradient background.
        final RichTextField gradientField =
                new RichTextField("Dashed simple border, gradient background");
        final Border dashedBorder =
                BorderFactory.createSimpleBorder(thickPadding, blueColors,
                        Border.STYLE_DASHED);
        final Background gradientBackground =
                BackgroundFactory.createLinearGradientBackground(Color.RED,
                        Color.GREEN, Color.BLUE, Color.WHITE);
        gradientField.setBorder(dashedBorder);
        gradientField.setBackground(gradientBackground);
        add(gradientField);
        add(new RichTextField(Field.NON_FOCUSABLE));

        // Sample text field with a no padding dotted border and no background.
        final RichTextField noPaddingField =
                new RichTextField("Dotted simple border, no padding");
        final Border noPaddingBorder =
                BorderFactory.createSimpleBorder(noPadding, oliveColors,
                        Border.STYLE_DOTTED);
        noPaddingField.setBorder(noPaddingBorder);
        add(noPaddingField);
        add(new RichTextField(Field.NON_FOCUSABLE));

        // Sample text field with a thick bevel border and bitmap background.
        final RichTextField bevelAndBitmapField =
                new RichTextField("Bevel border, bitmap background");
        final Border bevelBorder =
                BorderFactory.createBevelBorder(thickPadding, multiColors,
                        pinkColors);

        // Attempt to load a bitmap background
        try {
View Full Code Here

         */
        public ControlField(final String prefix) {
            super(loadBitmap(prefix), FOCUSABLE);

            final XYEdges borderWidths = new XYEdges(2, 2, 2, 2);
            final Border border =
                    BorderFactory.createRoundedBorder(borderWidths);
            setBorder(border);
        }
View Full Code Here

TOP

Related Classes of net.rim.device.api.ui.decor.Border

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.