Draw lines inside container

Hi ,
I have req like need to dispaly line end of application.To show the data on the UI.I have created a custom mxml component(Canvas).Inside this canvas i have created the controls inside VBox container.
I need to display 5 line before end of the application.So if user scrolls the application at the end he can see 5 lines before it end.
Please need sample code to show these line.Please help me.
I tried with below code.But its not working.Please help me.
<mx:VBox width="100%" verticalGap="5">
-----------------Other Controls--   ---------------------
       <mx:HBox id="drawStLine2" width="100%" height="100%" initialize="drawLineInit()" />
</mx:VBox>
public function drawLineInit():void {
     var myShape:Shape = new Shape(); 
       myShape = new Shape() ;
       myShape.graphics.lineStyle(5, 0x990000, .75);  
       myShape.graphics.moveTo(100, 100);   
       myShape.graphics.lineTo(500, 500);
       drawStLine1.addChild(myShape);
Thanks in advance

I have to display like this(not dottted lines) .Its a thick line.
Thanks,
Saritha

Similar Messages

  • How to count number of lines inside methods() using the Doclet API

    Wrote a custom doclet using the [Doclet API|http://java.sun.com/j2se/1.3/docs/tooldocs/javadoc/doclet/index.html ] .
    The purpose for the doclet is to load Java source files and create stubs (which are identical Java source files but do not contain any method implementation details).
    Instead, the method implementation details need to be replaced with blank lines...
    public class MyDoclet {
         private static String TAB = "\t";
         public static boolean start(RootDoc root) {
              ClassDoc[] classes = root.classes();
              // Parse through class or interface
              for (ClassDoc clazz : classes) {
                   Type superClass = clazz.superclassType();     
                   // Print Methods
                   MethodDoc[] methods = clazz.methods();
                   for (MethodDoc method : methods) {
                        Parameter[] parameters = method.parameters();
                        println();
                        if (!method.isPrivate()) {
                             print(TAB + method.modifiers() + " "
                                                    + method.returnType().simpleTypeName() + " " + method.name());
                             print("(");
                             for (int i=0; i < parameters.length; i++) {
                                  Parameter parameter = (Parameter) parameters;
                                  print(parameter.type().simpleTypeName() + " " + parameter.name());
                                  if (i != parameters.length - 1) {
                                       print(", ");
                             print(")");
                             println(" {");
                             println("\n");
                             println(TAB + "}");
              return true;
    As one can see, I am just creating the method and placing the opening and closing curly braces (along with a new \n line escape sequence, in between).
    Am not really that familiar with the Doclet API...
    Question(s):
    (1) What is the best way to figure out how many lines of code are inside each method and then use a for loop to insert the exact same number of blank lines inside the methods?
    (2) Is there a way to do it using the com.sun.javadoc.SourcePosition.line() method?
    Would really appreciate it if someone could help me because this is an important requirement (hence the 10 Duke Stars).
    Happy coding to all,
    Mike                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    This is not possible using the Doclet API, because JavaDoc does not store any information regarding implementation detail. Although MethodDoc#position will give you the line where the method is declared, there is no way to determine where the method body starts and ends.
    If you need that much information, maybe you would be better of using a tool such as Eclipse's Abstract Syntax Tree parser. AST will provide you with line numbers for each code expression, hence it is relatively easy to compute the first and last line in a method body.

  • Thin lines inside letters when overprinting

    hello all. I overprint a K area with a C one (40%C, set to multiply), both containing the same text white in the same position, plus 0.3 border in C (sort of manual supertrapping, I don't trust the printer in the case at hand). Looks fine in InDesign, but Acrobat (as well as Preview) show very fine contour like lines inside all letters, no matter what typeface (strangely, small caps are not affected). Acrobat's Output Preview even gives values for them (between 13 and 35 K).
    Profile: fogra27 // InDesign 7.0.2, Acrobat Pro 9.3.4, Mac OS X 10.6.4
    Very bizarre. Any idea would be most welcome.

    good idea. The OBS is small caps.

  • How to know the label in the same line inside the JTextPane?

    how to know the Jlabel in the same line inside the JTextPane?

    My application have two pane, the left one have some JLabel, which contain a ImageIcon. The user can drap the JLabel from the left pane and drop the it to the right pane.
    Now if the user has dropped several JLabels, I would like to know whether it is placed in the same line.

  • Drawing character inside rectangle

    Hi!
    I have the following problem. I have a string and my task is to be able to draw every character of the string in every rectangle. For example I have a string:
    String = ("GCATCGCAGAGAGT");
    So now I will have 14 characters inside 14 rectangles. My question is how to do that? Please help me to solve it.

    This is my code. There's still error in it. It can not show the rectangle and also the characters. Could you fix my code? I am still a beginner in this field
    I am sorry if my code is not formatted as well, because I am a new comer in this forum. So please help me to solve my problem, I expecting a lot from you.
    /** Here is my code **/
    package brute_force;
    import javax.swing.*;
    import javax.swing.border.Border;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Container;
    import java.awt.Font;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    * BorderLayoutDemo.java
    public class BruteForceAnimation4 extends JPanel{
              /** Variable for drawing character inside rectangle **/
              private String[] mSourceString = {"G","C","A","T","C","G","C","A","G","A","G","A","G","T"};
              private String[] mPatternString = {"G","C","A","G","A","G","A","G"};
              /** This is variables to draw the rectangle **/
              private int xPosSource = 40;
              private int yPosSource = 100;
              private int xPosPattern = 80;
              private int yPosPattern = 80;
         /** constants for predefined colors */
         private static final Color lightBlue = new Color(153, 204, 255);
         public BruteForceAnimation4()
         super();
         public static void addComponentsToPane(Container pane) {
         JLabel lblTitle = new JLabel("Brute Force String Searching
    Algorithm", SwingConstants.CENTER);
         String bruteForceCode[] = {
         "int count = 0", //0
         "int m = mPattern.length();", //1
         "int n = mSource .length();", //2
         "outer:", //3
         " for (int i = 0; i <= n - m; ++i) {", //4
         " for (int k = 0; k < m; ++k) {", //5
         " if (mPattern.charAt(k) != mSource.charAt(i + k)) {", //6
         " continue outer;", //7
         " }", //8
         " }", //9
         " ++count;", //10
         " }", //11
         " return count;", //12
         "}" //13
         JList list = new JList(bruteForceCode); // a container for pseud code
         JButton cmdRun = new JButton("Run");
         JButton cmdStep = new JButton("Step");
         //Set the title of the applet
         lblTitle.setFont(new Font("Serif", Font.BOLD, 18));
         JPanel buttons = new JPanel();
         buttons.add(cmdRun);
         buttons.add(cmdStep);
         buttons.setBackground(lightBlue);
         //Set the size and border of list (JList component)
         Border etch = BorderFactory.createEtchedBorder();
         list.setBorder(BorderFactory.createTitledBorder(etch, "Brute Force
    Code"));
         JPanel listPanel = new JPanel();
         listPanel.add(list);
         listPanel.setBackground(lightBlue);
         list.setBackground(lightBlue);
         BruteForceAnimation4 border = new BruteForceAnimation4();
              pane.add(lblTitle, BorderLayout.NORTH);
         pane.add(border, BorderLayout.CENTER);
         pane.add(listPanel, BorderLayout.EAST);
         pane.add(buttons, BorderLayout.SOUTH);
         pane.setBackground(lightBlue);
         public void paintComponent(Graphics g)
         super.paintComponent(g);
         Graphics2D g2 = (Graphics2D) g;
         setBackground(lightBlue);
         drawSourceString(g2, mSourceString);          
    /** this is the method to draw character inside rectangles **/
    /** but it still wrong **/
         public void drawSourceString(Graphics2D g2,String[] mSource)
              if (mSource == null)
                   return;
              for (int i=0; i < mSource.length; i++)
                   g2.drawRect(xPosSource, yPosSource, 60, 40);
                   g2.drawString(mSource,40,40);                              
                   xPosSource += 30;
    //This is to count the length of the the Source
                   System.out.println("Your length" +mSource.length);
         public static void main(String[] args) {
         //Create and set up the window.
         JFrame frame = new JFrame("Brute Force Algorithm");
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         //Set up the content pane.
         addComponentsToPane(frame.getContentPane());
         //Use the content pane's default BorderLayout. No need for
         //setLayout(new BorderLayout());
         //Display the window.
         frame.pack();
              frame.setSize(800, 600);
         frame.setVisible(true);

  • How do I get the top lines i my toolbar back? The top line starting with 'file' on the right and the second line which contained the refersh button as well as the search bar have disappeared. How do I get them back?

    The first two lines of my toolbar have gone. I'm left with most visited but the lines above, containing the refresh button, bookmarks and search bar and above that containing the links to files etc have gone, how do I get em back?
    == I was fiddling with the different bars and must have clicked sth I shouldn't have.

    Alt V
    T
    M
    Be sure to do this in a new blank tab.

  • How to draw line on SAP form

    Hi everyone,
    Who have a good way to draw lines on SAP form?
    I created a Wizard form, and use Rectangle (Height=0) as the two lines between title and bottom button, but I met a problem, when show another form which cover the line, after close this form, some part of lines disappear, I have tried using SAP form refresh, it still can not restore showing line completely, who have good way to workaround the problem or give me another way to draw line.
    Thanks in advance!
    Kathy

    The only way I found to get a form looking really close to a standard B1 Wizard form is to use bitmaps.  I use 3 - one each for the top, bottom and left hand side.  The bitmaps include the line drawing and appropriate pictures/background colours.  I normally define these in the XML used to create the form as in the following example:-
    <item uid="PTOP" type="117" left="0" width="566" top="0" height="80" visible="1" enabled="1" from_pane="0" to_pane="0">
            <AutoManagedAttribute/>
            <specific picture="AZU_SPC_WIZ_TOP2.bmp">
                    <databind databound="0" table="" alias=""/>
            </specific>
    </item>
    <item uid="PBOT" type="117" left="0" width="566" top="336" height="40" visible="1" enabled="1" from_pane="0" to_pane="0">
            <AutoManagedAttribute/>
            <specific picture="AZU_SPC_WIZ_BOT.bmp">
                    <databind databound="0" table="" alias=""/>
            </specific>
    </item>
    <item uid="PLEFT" type="117" left="0" width="100" top="0" height="336" visible="1" enabled="1" from_pane="1" to_pane="1">
            <AutoManagedAttribute/>
            <specific picture="AZU_SPC_WIZ9.bmp">
                    <databind databound="0" table="" alias=""/>
            </specific>
    </item>
    John.

  • Reducing PDF-size: automatic reduction of datapoints that are used to draw lines in a 2d-axis system within report

    Creating fancy pdf-files for costumers and other purposes is great. However, if the experimental data include many datapoints (>200000) a line-2d-graph ends up in a very big pdf-file. Especially when many pages need to be used.
    Explanation:
    When I use lines to show experimental data in 2d-plots the size of my PDF-file is directly influenced by the number of datapoints used. The more datapoints are used to draw lines within the graph, the bigger the exported PDF-files of the report are.
    It would be great to limit the number of points used to draw a line as it can be done with markers without using the curve transformation option. - Hence, e.g. plotting a line with the help of 200 datapoints is usually as good as showing the same line based on 200000 datapoints but the pdf-size is significantly reduced. You can imagine that when this would be done via the transformation option a long lasting script would be needed for each line to reduce the number of datapoints shown. Hence, the plotting within the report and the actualisation of data would need very long.
     

    Since a while DIAdem optimizes the size of exported PDF-files in a related way as it is suggested here. In principle the PDF-file is exported in a very high resolution, so you can display it in a reader with a very high zoom value (e. g. 6000 %) to look into details of your data. If you have a huge dataset, this could lead in fact to a bigger file size, if data points could be displayed because the high PDF-resolution. But in general, DIAdem only saves information in a PDF-file which is really necessary - but with a high resolution.

  • SmartForms - draw line in template

    Hi!
      I am new to SF, so have a question on drawing line in a template. I use template as the data is only printed out once and is static. I have many columns in my template and I would like to draw lines on the columns so that it is tidy & looks nicer.
      I double click the template & in the "output options" tab, I checked the check box "line with..", but error prompt out to stop me, saying "Boxes/Shadings are not allowed within a table".
      Does anyone know how can I draw lines in a template?
      Kindly advise.
    best regards,
    Ginnie

    Hi,
             Click on the template under the template tab, and then click on the select pattern just under the template heading , there you use lines.
    regards,
    Santosh Thorat
    Edited by: santosh thorat on Dec 26, 2007 10:09 AM

  • Draw line in illustrator cs2

    hi,
    i am new to adobe illustrator cs2.
    is there any other method to draw line other than s
    setEntirePath().
    thanks in advance,

    Hello David,
    It sounds to me like you're witnessing the double edged sword of an incredibly sharp display. The contrast and clarity of LCD displays makes it very easy to see razor-thin lines with ultra fine definition, but this comes at a cost.
    Font smoothing (a.k.a. font aliasing) is one example of where most LCDs are so sharp that most people prefer to have their text "fuzzed" up a little bit.
    A one pixel wide diagonal line is another example that you've discovered - the display is so sharp that there is no blurring around the "steps" of the line. You can see every change in gradient, because as sharp as your CRT might've been, it was blurring the line just slightly - enough to enhance the illusion that your diagonal line was a line rather than a series of adjacent "steps". No software package that I know of has bothered to implement "line smoothing" yet, probably because you need the detail for accuracy when putting lines together.
    Sort of related to this, big screen HDTV plasma and LCD monitors look amazing in the store when tuned to an HD station, but most people would be floored if they say how grainy and pixelated a standard cable signal looks on the same display. It's literally like watching an old VHS tape, because the display is so sharp it resolves detail that is invisible on a "lesser" display.
    Neat human trick: get used to working with your LCD, and then go back to the CRT if you have a chance. How does the CRT look? I thought I needed glasses the first time I switched back!
    -Shawn

  • I would like to cut and paste information from a word file onto a pdf file, as well as draw lines onto the pdf file.  How can I accomplish that task?  Is there software I can purchase?

    I would like to cut and paste information from a word file onto a pdf file, as well as draw lines onto the pdf file.  How can I accomplish that task?  Is there software I can purchase?

    Hi jgallu7382,
    The latter is easily accomplished using the Drawing Markup tools, which are available in both the free Adobe Reader, and in Acrobat. Copying/pasting text into the PDF is something that you could do using the editing tools that are available only in Acrobat. Note, however, that Acrobat isn't intended to be a text-editing application, so editing there won't be as robust as in an application designed specifically for that purpose. (It's also worth mentioning that you won't be able to alter a PDF if it has document permissions applied that would prevent you from doing so.)
    I hope that answers your questions.
    Best,
    Sara

  • Need to draw line after the 2nd line item(Smart Forms)

    Dear Friends,
    I need to draw horizontal line after the 2nd line item  and 3rd line item in smart forms.How can i achive this.
    Plz help.
    Edited by: farook shaik on May 19, 2009 8:19 AM

    This is what you need to do:
    1> In the tables->details section define two line types LT1 and LT2.
    2> Come back to tables section pressing the table painter button.
    3> Select a line type for which you want to have an underline(say LT2).
         a] If the anchor cursor does not come click the draw lines and columns button( the pencil icon nutton)
         b] select the line type ( it will become black after selection. Press and hold down ctrl to select
             multiple cells.
         c] after selection click the lower 'frame button' ( which is right at the top of box and shading).
    4> Now goto data section where you have given your internal table name and work area.
         a] in the sort criteria put your field POSNR and check the Event on Sort end chk box.
         b] you will see an extra node under the main area of the table.
         c] Create a table line with the line type LT2 in the node.
         d]Also in the Main area add another table line with LT1 as the line type.
    5> If POSNR remains unchnged LT1 will be triggered.
    6> if Posnr changes then LT2 will be triggered with the underline.
    This will suffice your requirement.

  • How can get a Graphics to draw line on screen?

    How can get a Graphics to draw line on screen?
    Now, I can get a Graphics to draw line based on component. For example JPanel, but I want to get a Graphics to draw line on screen.

    By drawing on the screen, I assume you mean drawing outside the bounds of a top-level window like
    JFrame or JDialog. You can't do that. At least, without going native and even then that's a dodgey thing
    for any platform to let you do. One thing you can do is simulate it with a robot's screen capture:
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class X {
        public static void main(String[] args) throws Exception {
            Rectangle bounds = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();
            BufferedImage image = new Robot().createScreenCapture(bounds);
            Graphics2D g2 = image.createGraphics();
            g2.setStroke(new BasicStroke(20));
            g2.setPaint(Color.RED);
            g2.drawLine(0, 0, bounds.width, bounds.height);
            g2.drawLine(bounds.width, 0, 0, bounds.height);
            g2.dispose();
            JLabel label = new JLabel(new ImageIcon(image));
            label.addMouseListener(new MouseAdapter(){
                public void mousePressed(MouseEvent evt) {
                    System.exit(0);
            JFrame f = new JFrame();
            f.setUndecorated(true);
            f.getContentPane().add(label);
            f.setBounds(bounds);
            f.setVisible(true);
    }

  • Draw line in Action Script project in Flash Builder (Gumbo).

    Hi
    I am working on drawing tool application and want to draw line and rectangle in Action Script project in Flash Builder (Gumbo). Please guide and help me with an example.
    Thanks
    Rangrajan.

    This should be helpful http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9 b90204-7dd9.html

  • Draw line in xy graph(pict​ure)

    Hi all,
    I import a picture into xy graph than i enable to annotate some indicators.
    after i put the indicator in some location in xy graph(picture) i want to draw lines between the indicators.
    can somebody help me with that? i'm using LABVIEW 8.2.1
    sorry for my english.
    Solved!
    Go to Solution.
    Attachments:
    test1.vi ‏172 KB
    test.jpg ‏14 KB

    Have a look at my example from long ago.
    Here;s a quick and diry draft modification of your VI, see if it works for you. (lines are drawn between annotations when OK is pressed).
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    test1MOD.zip ‏43 KB

Maybe you are looking for

  • Report for comparing quarter results

    In want of report that allow us to compare the Q1,2008 report with Q1, 2009 report of data related to a particular GL. I mean to say iam in need of a report that should allow me to compare the one quarter results with another quarter results related

  • Calling One program from another

    I've two java programs V1.java and v2.java. One button is placed in V1 and when I click on that I need to invok v2. In the actionListener event, I've added the code that when the button is clicked I'm creating the new instance of v2. v2 v=new v2(); B

  • Down load itab data from Debugging screen as excell file - problem

    Hi, I am using 4.6 C version. While debugg, I am not able to see spread sheet icon to down load my internal table data into excell sheet. Are there any setting I need to do OR How can I get down load my internal table data into excell sheet. Your hel

  • Why is the background of the navigation bar on firefox 4 grey? How do i make it have a clear background like the rest of the toolbars?

    okay i downloaded firefox 4 and all was good, but today and yesterday the naviagation toolbar (you know the one with the search engine home forward and back buttons) has a grey background, the buttons arent grey but the background is and it's driving

  • AT END

    Hi i have to use  command : AT END OF DATE MATDEPTH                                        ENDAT DATE IS OF DATA TYPE : DATS MATDEPTH IS OF TYPE  : CHAR all data is collected in internal table. at the moment i am just using AT END OF MATDEPTH. can i