BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 06-28-2007, 08:06 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: India
Model: 8700g
Carrier: Airtel
Posts: 117
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default drawShadedFilledPath ... can somebody tell me where am i going wrong :(

Please Login to Remove!

Code:
int[] xpts = { 0, 0, 240, 240 };
int[] ypts = { 0, 240, 240, 0 };

private final int[] cols = new int[]Color.PINK, Color.BLACK, Color.WHITE, Color.GREEN };

private final byte[] ptTypes = new byte[]{Graphics.CURVEDPATH_END_POINT, Graphics.CURVEDPATH_CUBIC_BEZIER_CONTROL_POINT, Graphics.CURVEDPATH_QUADRATIC_BEZIER_CONTROL_POINT,
Graphics.CURVEDPATH_END_POINT};

int [] offsets = {5,10,15,20};

public Test()
    {
        super();
        LabelField titlev = new LabelField("ggfkhfkhkdhkj",LabelField.ELLIPSIS);
        LabelField titlew = new LabelField("ggfkhfkhkdhkj",LabelField.ELLIPSIS);
        LabelField titlee = new LabelField("ggfkhfkhkdhkj",LabelField.ELLIPSIS);
        VerticalFieldManager title1 = new VerticalFieldManager(VerticalFieldManager.USE_ALL_WIDTH)
        {
            public void paint(Graphics g)
            {
                g.setColor(0x00ffffff);
                g.setFont((Font.getDefault()).derive(Font.BOLD,30 ));
                int rowHeight = this.getPreferredHeight();
                System.out.println("rowHeight:"+rowHeight);
                int[] yInds = new int[]{0, 0, rowHeight,rowHeight};
                System.out.println("g.getScreenWidth():"+g.getScreenWidth());
                int[] xInds = new int[]{0, g.getScreenWidth(), g.getScreenWidth(), 0};
                  g.drawShadedFilledPath(xInds, yInds,ptTypes, cols, offsets);
                 super.paint(g);
            }
        };
        title1.add(titlev);
        title1.add(titlew);
        title1.add(titlee);
        add(title1);
     }
}
i am getting an IllegalArgumentException().

Wht am i doing wrong here.
__________________
Thanks
Meenal

Last edited by Meenal : 06-28-2007 at 08:08 AM.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

10 Ea 6 Volt Indicator Panel Light socket Audio Tube Amplifier
$16.95
10 Ea 6 Volt Indicator Panel Light socket Audio Tube Amplifier picture22 UF 450V AXIAL LEAD 35 Pieces TUBE AUDIO CAPACITOR AMPLIFIER, RADIO REPAIR
$42.75
22 UF 450V AXIAL LEAD 35 Pieces TUBE AUDIO CAPACITOR AMPLIFIER, RADIO REPAIR pictureSelema 14-NBDS-1224 140VDC DC Servo Motor Controller / Drive / Module
$49.95
Selema 14-NBDS-1224 140VDC DC Servo Motor Controller / Drive / Module pictureHP M1407-60000 LINE AMPLIFIER KIT New In Original Package
$75.0
HP M1407-60000 LINE AMPLIFIER KIT New In Original Package pictureNational 2N5904 NPN JFET Amplifier - NOS
$7.99
National 2N5904 NPN JFET Amplifier - NOS picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.